aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2014-03-24 12:13:48 -0400
committerEric Paris <eparis@redhat.com>2014-03-24 12:13:48 -0400
commit356750e35e86485c464704c0a32c1d8dc77590d7 (patch)
tree70fd9632eb8ce934e69510abdf884f0663283c91
parente231d54c1239ccf31aaee311bed0c4d1937cae2c (diff)
audit: define audit_is_compat in kernel internal header
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>
-rw-r--r--include/linux/audit.h6
-rw-r--r--include/uapi/linux/audit.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 4b2983e25ce0..611a59a56f1a 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -102,6 +102,12 @@ struct filename;
102 102
103extern void audit_log_session_info(struct audit_buffer *ab); 103extern void audit_log_session_info(struct audit_buffer *ab);
104 104
105#ifdef CONFIG_COMPAT
106#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
107#else
108#define audit_is_compat(arch) false
109#endif
110
105#ifdef CONFIG_AUDITSYSCALL 111#ifdef CONFIG_AUDITSYSCALL
106/* These are defined in auditsc.c */ 112/* These are defined in auditsc.c */
107 /* Public API */ 113 /* Public API */
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 9af01d77dc44..4315ee99b967 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -362,12 +362,6 @@ enum {
362#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT) 362#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
363#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) 363#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
364 364
365#ifdef CONFIG_COMPAT
366#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
367#else
368#define audit_is_compat(arch) false
369#endif
370
371#define AUDIT_PERM_EXEC 1 365#define AUDIT_PERM_EXEC 1
372#define AUDIT_PERM_WRITE 2 366#define AUDIT_PERM_WRITE 2
373#define AUDIT_PERM_READ 4 367#define AUDIT_PERM_READ 4