Skip to content

cmd/fscrypt: fix isDirUnlockedHeuristic() on latest kernels#263

Merged
ebiggers merged 1 commit intogoogle:masterfrom
ebiggers:fix-dir-unlocked-heuristic
Nov 7, 2020
Merged

cmd/fscrypt: fix isDirUnlockedHeuristic() on latest kernels#263
ebiggers merged 1 commit intogoogle:masterfrom
ebiggers:fix-dir-unlocked-heuristic

Conversation

@ebiggers
Copy link
Collaborator

@ebiggers ebiggers commented Nov 7, 2020

On an "incompletely locked" directory, isDirUnlockedHeuristic() is
supposed to return true, but on Linux v5.10-rc1 and later it returns
false since now creating a subdirectory fails rather than succeeds.
This change was intentional, so make isDirUnlockedHeuristic() apply a
second heuristic too: also return true if any filenames in the directory
don't appear to be valid no-key names.

This fixes cli-tests/t_v1_encrypt on Linux v5.10-rc1 and later.

On an "incompletely locked" directory, isDirUnlockedHeuristic() is
supposed to return true, but on Linux v5.10-rc1 and later it returns
false since now creating a subdirectory fails rather than succeeds.
This change was intentional, so make isDirUnlockedHeuristic() apply a
second heuristic too: also return true if any filenames in the directory
don't appear to be valid no-key names.

This fixes cli-tests/t_v1_encrypt on Linux v5.10-rc1 and later.
@ebiggers ebiggers merged commit b68d603 into google:master Nov 7, 2020
@ebiggers ebiggers deleted the fix-dir-unlocked-heuristic branch November 7, 2020 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant