]> asedeno.scripts.mit.edu Git - linux.git/commit
fscrypt: use ENOPKG when crypto API support missing
authorEric Biggers <ebiggers@google.com>
Wed, 24 Jul 2019 18:08:00 +0000 (11:08 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 13 Aug 2019 02:04:44 +0000 (19:04 -0700)
commit29a98c1caf7b37b12a79eee7f839bf2924593c1c
tree4e5142ce44508cfbb74f7ef4f3efeeac25daaf1d
parenta4d14e915bcb86e13b45231cd4fe2ce19bd9ba86
fscrypt: use ENOPKG when crypto API support missing

Return ENOPKG rather than ENOENT when trying to open a file that's
encrypted using algorithms not available in the kernel's crypto API.

This avoids an ambiguity, since ENOENT is also returned when the file
doesn't exist.

Note: this is the same approach I'm taking for fs-verity.

Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/keyinfo.c