* [PATCH] KEYS: Reinstate lost passing of process keyring ID in call_sbin_request_key()
[not found] <1277861297-13824-1-git-send-email-justinmattock@gmail.com>
@ 2010-06-30 9:39 ` David Howells
2010-07-01 0:19 ` James Morris
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2010-06-30 9:39 UTC (permalink / raw)
To: linux-security-module
Cc: keyrings, linux-kernel, Justin P. Mattock, David Howells
From: Justin P. Mattock <justinmattock@gmail.com>
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>
---
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 f5ec9ac..0d26f68 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,
prkey = 0;
if (cred->tgcred->process_keyring)
prkey = cred->tgcred->process_keyring->serial;
+ sprintf(keyring_str[1], "%d", prkey);
rcu_read_lock();
session = rcu_dereference(cred->tgcred->session_keyring);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] KEYS: Reinstate lost passing of process keyring ID in call_sbin_request_key()
2010-06-30 9:39 ` [PATCH] KEYS: Reinstate lost passing of process keyring ID in call_sbin_request_key() David Howells
@ 2010-07-01 0:19 ` James Morris
0 siblings, 0 replies; 2+ messages in thread
From: James Morris @ 2010-07-01 0:19 UTC (permalink / raw)
To: David Howells
Cc: linux-security-module, keyrings, linux-kernel, Justin P. Mattock
On Wed, 30 Jun 2010, David Howells wrote:
> From: Justin P. Mattock <justinmattock@gmail.com>
>
> 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>
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next
--
James Morris
<jmorris@namei.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-01 0:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1277861297-13824-1-git-send-email-justinmattock@gmail.com>
2010-06-30 9:39 ` [PATCH] KEYS: Reinstate lost passing of process keyring ID in call_sbin_request_key() David Howells
2010-07-01 0:19 ` James Morris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®