]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Make keyctl(KEYCTL_JOIN_SESSION_KEYRING) use the correct arg
authorDavid Howells <dhowells@redhat.com>
Fri, 25 Feb 2005 06:17:30 +0000 (22:17 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 25 Feb 2005 06:17:30 +0000 (22:17 -0800)
The attached patch makes keyctl() use the correct argument when invoking
the KEYCTL_JOIN_SESSION_KEYRING function.

I'm not sure how this evaded testing before, but I suspect the compiler was
kind and made both argument registers hold the same value.

Thanks to Kevin Coffman <kwc@citi.umich.edu> for spotting this.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
security/keys/compat.c
security/keys/keyctl.c

index 17c038c241ea703fae3b0e2a7110c53e3a582f66..aff8b22dcb5c7c9dcfbc412a95bb2c0be3e8092e 100644 (file)
@@ -31,7 +31,7 @@ asmlinkage long compat_sys_keyctl(u32 option,
                return keyctl_get_keyring_ID(arg2, arg3);
 
        case KEYCTL_JOIN_SESSION_KEYRING:
-               return keyctl_join_session_keyring(compat_ptr(arg3));
+               return keyctl_join_session_keyring(compat_ptr(arg2));
 
        case KEYCTL_UPDATE:
                return keyctl_update_key(arg2, compat_ptr(arg3), arg4);
index 4d95fdb75bce4c542e54115a73a653394043d674..dc0011b3fac92e8a8c623a0f8d92696d8052a241 100644 (file)
@@ -923,7 +923,7 @@ asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3,
                                             (int) arg3);
 
        case KEYCTL_JOIN_SESSION_KEYRING:
-               return keyctl_join_session_keyring((const char __user *) arg3);
+               return keyctl_join_session_keyring((const char __user *) arg2);
 
        case KEYCTL_UPDATE:
                return keyctl_update_key((key_serial_t) arg2,