aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/main.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2008-07-23 21:30:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 10:47:31 -0700
commit982363c97f8cad7aea4c3d2cfebffc1cc2d2f166 (patch)
tree63459c8ea40c1f45f7a4e14b0630829ab2a43afc /fs/ecryptfs/main.c
parent6c4c17b073cd4a5a61bc04329561632870bb21fc (diff)
downloadkernel_samsung_smdk4412-982363c97f8cad7aea4c3d2cfebffc1cc2d2f166.zip
kernel_samsung_smdk4412-982363c97f8cad7aea4c3d2cfebffc1cc2d2f166.tar.gz
kernel_samsung_smdk4412-982363c97f8cad7aea4c3d2cfebffc1cc2d2f166.tar.bz2
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index f36ab2f..8876fe7 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -248,10 +248,11 @@ static int ecryptfs_init_global_auth_toks(
"session keyring for sig specified in mount "
"option: [%s]\n", global_auth_tok->sig);
global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID;
- rc = 0;
+ goto out;
} else
global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID;
}
+out:
return rc;
}
@@ -416,7 +417,6 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
printk(KERN_WARNING "One or more global auth toks could not "
"properly register; rc = [%d]\n", rc);
}
- rc = 0;
out:
return rc;
}