Skip to content

Provide better error message when given a locked regular file#396

Merged
ebiggers merged 1 commit intomasterfrom
locked-regular-file
Dec 12, 2023
Merged

Provide better error message when given a locked regular file#396
ebiggers merged 1 commit intomasterfrom
locked-regular-file

Conversation

@ebiggers
Copy link
Copy Markdown
Collaborator

@ebiggers ebiggers commented Dec 9, 2023

Since opening an encrypted regular file that is locked fails with ENOKEY, getting the encryption policy of such a file is not possible. As a result, 'fscrypt status' and 'fscrypt lock' fail on such files. Provide a better error message that tries to explain what is going on.

Resolves #393

Copy link
Copy Markdown
Member

@josephlr josephlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for fixing the message.

Since opening an encrypted regular file that is locked fails with
ENOKEY, getting the encryption policy of such a file is not possible.
As a result, 'fscrypt status' and 'fscrypt lock' fail on such files.
Provide a better error message that tries to explain what is going on.

Resolves #393
@ebiggers ebiggers force-pushed the locked-regular-file branch from 6ab2ef3 to f4a0004 Compare December 12, 2023 03:30
@ebiggers ebiggers merged commit a6c5029 into master Dec 12, 2023
@ebiggers ebiggers deleted the locked-regular-file branch December 12, 2023 03:33
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.

How to unlock encrypted regular files located in an unencrypted directory?

2 participants