Skip to content

Commit

Permalink
linux/audit.h: move ptrace.h include to kernel header
Browse files Browse the repository at this point in the history
While the kernel internals want pt_regs (and so it includes
linux/ptrace.h), the user version of audit.h does not need it.  So move
the include out of the uapi version.

This avoids issues where people want the audit defines and userland
ptrace api.  Including both the kernel ptrace and the userland ptrace
headers can easily lead to failure.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Jan 11, 2013
1 parent 8291991 commit c0a3a20
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define _LINUX_AUDIT_H_

#include <linux/sched.h>
#include <linux/ptrace.h>
#include <uapi/linux/audit.h>

struct audit_sig_info {
Expand Down
1 change: 0 additions & 1 deletion include/uapi/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#include <linux/types.h>
#include <linux/elf-em.h>
#include <linux/ptrace.h>

/* The netlink messages for the audit system is divided into blocks:
* 1000 - 1099 are for commanding the audit system
Expand Down

0 comments on commit c0a3a20

Please sign in to comment.