]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
audit: Fix possible return value truncation in audit_get_context()
authorPaul Moore <paul.moore@hp.com>
Wed, 1 Apr 2009 19:47:27 +0000 (15:47 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 5 Apr 2009 17:46:19 +0000 (13:46 -0400)
The audit subsystem treats syscall return codes as type long, unfortunately
the audit_get_context() function mistakenly converts the return code to an
int type in the parameters which could cause problems on systems where the
sizeof(int) != sizeof(long).

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/auditsc.c

index b344b86557a25ceb84ade763feaa46df14f7f3b6..e821d626dfe6a2e7928e1299c6409d7f9448970f 100644 (file)
@@ -752,7 +752,7 @@ static void audit_set_auditable(struct audit_context *ctx)
 
 static inline struct audit_context *audit_get_context(struct task_struct *tsk,
                                                      int return_valid,
-                                                     int return_code)
+                                                     long return_code)
 {
        struct audit_context *context = tsk->audit_context;