mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
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>
This commit is contained in:
parent
6c4c17b073
commit
982363c97f
2 changed files with 6 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue