diff options
author | Justin P. Mattock <justinmattock@gmail.com> | 2010-06-30 05:39:11 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:34:56 -0400 |
commit | 5ad18a0d59ba9e65b3c8b2b489fd23bc6b3daf94 (patch) | |
tree | 9de21bbe321012bd8e51d9d8ed09b81785cfcbec /security | |
parent | 94fd8405ea62bd2d4a40f3013e8e6935b6643235 (diff) |
KEYS: Reinstate lost passing of process keyring ID in call_sbin_request_key()
In commit bb952bb98a7e479262c7eb25d5592545a3af147d there was the accidental
deletion of a statement from call_sbin_request_key() to render the process
keyring ID to a text string so that it can be passed to /sbin/request-key.
With gcc 4.6.0 this causes the following warning:
CC security/keys/request_key.o
security/keys/request_key.c: In function 'call_sbin_request_key':
security/keys/request_key.c:102:15: warning: variable 'prkey' set but not used
This patch reinstates that statement.
Without this statement, /sbin/request-key will get some random rubbish from the
stack as that parameter.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/request_key.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/keys/request_key.c b/security/keys/request_key.c index f5ec9ac5d57c..0d26f689bd77 100644 --- a/security/keys/request_key.c +++ b/security/keys/request_key.c | |||
@@ -144,6 +144,7 @@ static int call_sbin_request_key(struct key_construction *cons, | |||
144 | prkey = 0; | 144 | prkey = 0; |
145 | if (cred->tgcred->process_keyring) | 145 | if (cred->tgcred->process_keyring) |
146 | prkey = cred->tgcred->process_keyring->serial; | 146 | prkey = cred->tgcred->process_keyring->serial; |
147 | sprintf(keyring_str[1], "%d", prkey); | ||
147 | 148 | ||
148 | rcu_read_lock(); | 149 | rcu_read_lock(); |
149 | session = rcu_dereference(cred->tgcred->session_keyring); | 150 | session = rcu_dereference(cred->tgcred->session_keyring); |