eCryptfs: write lock requested keys
A requested key is write locked in order to prevent modifications on the authentication token while it is being used. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
This commit is contained in:
committed by
Tyler Hicks
parent
950983fc04
commit
b5695d0463
@@ -254,8 +254,10 @@ static int ecryptfs_init_global_auth_toks(
|
||||
"option: [%s]\n", global_auth_tok->sig);
|
||||
global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID;
|
||||
goto out;
|
||||
} else
|
||||
} else {
|
||||
global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID;
|
||||
up_write(&(global_auth_tok->global_auth_tok_key)->sem);
|
||||
}
|
||||
}
|
||||
out:
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user