diff options
author | Eric Sandeen <sandeen@redhat.com> | 2008-07-24 00:30:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:31 -0400 |
commit | 982363c97f8cad7aea4c3d2cfebffc1cc2d2f166 (patch) | |
tree | 63459c8ea40c1f45f7a4e14b0630829ab2a43afc /fs/ecryptfs/main.c | |
parent | 6c4c17b073cd4a5a61bc04329561632870bb21fc (diff) |
ecryptfs: propagate key errors up at mount time
Mounting with invalid key signatures should probably fail, if they were
specifically requested but not available.
Also fix case checks in process_request_key_err() for the right sign of
the errnos, as spotted by Jan Tluka.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jan Tluka <jtluka@redhat.com>
Acked-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index f36ab2feea28..8876fe7c76e2 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -248,10 +248,11 @@ static int ecryptfs_init_global_auth_toks( | |||
248 | "session keyring for sig specified in mount " | 248 | "session keyring for sig specified in mount " |
249 | "option: [%s]\n", global_auth_tok->sig); | 249 | "option: [%s]\n", global_auth_tok->sig); |
250 | global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID; | 250 | global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID; |
251 | rc = 0; | 251 | goto out; |
252 | } else | 252 | } else |
253 | global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID; | 253 | global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID; |
254 | } | 254 | } |
255 | out: | ||
255 | return rc; | 256 | return rc; |
256 | } | 257 | } |
257 | 258 | ||
@@ -416,7 +417,6 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options) | |||
416 | printk(KERN_WARNING "One or more global auth toks could not " | 417 | printk(KERN_WARNING "One or more global auth toks could not " |
417 | "properly register; rc = [%d]\n", rc); | 418 | "properly register; rc = [%d]\n", rc); |
418 | } | 419 | } |
419 | rc = 0; | ||
420 | out: | 420 | out: |
421 | return rc; | 421 | return rc; |
422 | } | 422 | } |