Skip to content

Commit

Permalink
audit: define audit_is_compat in kernel internal header
Browse files Browse the repository at this point in the history
We were exposing a function based on kernel config options to userspace.
This is wrong.  Move it to the audit internal header.

Suggested-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
  • Loading branch information
Eric Paris committed Mar 24, 2014
1 parent e231d54 commit 356750e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ struct filename;

extern void audit_log_session_info(struct audit_buffer *ab);

#ifdef CONFIG_COMPAT
#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
#else
#define audit_is_compat(arch) false
#endif

#ifdef CONFIG_AUDITSYSCALL
/* These are defined in auditsc.c */
/* Public API */
Expand Down
6 changes: 0 additions & 6 deletions include/uapi/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,6 @@ enum {
#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)

#ifdef CONFIG_COMPAT
#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
#else
#define audit_is_compat(arch) false
#endif

#define AUDIT_PERM_EXEC 1
#define AUDIT_PERM_WRITE 2
#define AUDIT_PERM_READ 4
Expand Down

0 comments on commit 356750e

Please sign in to comment.