Skip to content

Commit

Permalink
audit: Fix possible return value truncation in audit_get_context()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pcmoore authored and Al Viro committed Apr 5, 2009
1 parent 55ad2f8 commit 6d208da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/auditsc.c
Expand Up @@ -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;

Expand Down

0 comments on commit 6d208da

Please sign in to comment.