summaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorPaul Moore2009-04-01 21:47:27 +0200
committerAl Viro2009-04-05 19:46:19 +0200
commit6d208da89aabee8502debe842832ca0ab298d16d (patch)
tree3ed68e7cab94ac7887dcd1d03f1b1fd9a927a001 /kernel/auditsc.c
parentaudit: ignore terminating NUL in AUDIT_USER_TTY messages (diff)
downloadkernel-qcow2-linux-6d208da89aabee8502debe842832ca0ab298d16d.tar.gz
kernel-qcow2-linux-6d208da89aabee8502debe842832ca0ab298d16d.tar.xz
kernel-qcow2-linux-6d208da89aabee8502debe842832ca0ab298d16d.zip
audit: Fix possible return value truncation in audit_get_context()
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>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index b344b86557a2..e821d626dfe6 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -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;