diff options
-rw-r--r-- | kernel/audit.h | 13 | ||||
-rw-r--r-- | kernel/auditfilter.c | 5 | ||||
-rw-r--r-- | kernel/auditsc.c | 6 |
3 files changed, 13 insertions, 11 deletions
diff --git a/kernel/audit.h b/kernel/audit.h index 3cfc54ee3e1f..9d6717412fec 100644 --- a/kernel/audit.h +++ b/kernel/audit.h | |||
@@ -74,6 +74,11 @@ struct audit_entry { | |||
74 | struct audit_krule rule; | 74 | struct audit_krule rule; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | #ifdef CONFIG_AUDIT | ||
78 | extern int audit_enabled; | ||
79 | extern int audit_ever_enabled; | ||
80 | #endif | ||
81 | |||
77 | extern int audit_pid; | 82 | extern int audit_pid; |
78 | 83 | ||
79 | #define AUDIT_INODE_BUCKETS 32 | 84 | #define AUDIT_INODE_BUCKETS 32 |
@@ -104,6 +109,9 @@ struct audit_netlink_list { | |||
104 | int audit_send_list(void *); | 109 | int audit_send_list(void *); |
105 | 110 | ||
106 | struct inotify_watch; | 111 | struct inotify_watch; |
112 | /* Inotify handle */ | ||
113 | extern struct inotify_handle *audit_ih; | ||
114 | |||
107 | extern void audit_free_parent(struct inotify_watch *); | 115 | extern void audit_free_parent(struct inotify_watch *); |
108 | extern void audit_handle_ievent(struct inotify_watch *, u32, u32, u32, | 116 | extern void audit_handle_ievent(struct inotify_watch *, u32, u32, u32, |
109 | const char *, struct inode *); | 117 | const char *, struct inode *); |
@@ -111,6 +119,7 @@ extern int selinux_audit_rule_update(void); | |||
111 | 119 | ||
112 | extern struct mutex audit_filter_mutex; | 120 | extern struct mutex audit_filter_mutex; |
113 | extern void audit_free_rule_rcu(struct rcu_head *); | 121 | extern void audit_free_rule_rcu(struct rcu_head *); |
122 | extern struct list_head audit_filter_list[]; | ||
114 | 123 | ||
115 | #ifdef CONFIG_AUDIT_TREE | 124 | #ifdef CONFIG_AUDIT_TREE |
116 | extern struct audit_chunk *audit_tree_lookup(const struct inode *); | 125 | extern struct audit_chunk *audit_tree_lookup(const struct inode *); |
@@ -137,6 +146,10 @@ extern void audit_put_tree(struct audit_tree *); | |||
137 | 146 | ||
138 | extern char *audit_unpack_string(void **, size_t *, size_t); | 147 | extern char *audit_unpack_string(void **, size_t *, size_t); |
139 | 148 | ||
149 | extern pid_t audit_sig_pid; | ||
150 | extern uid_t audit_sig_uid; | ||
151 | extern u32 audit_sig_sid; | ||
152 | |||
140 | #ifdef CONFIG_AUDITSYSCALL | 153 | #ifdef CONFIG_AUDITSYSCALL |
141 | extern int __audit_signal_info(int sig, struct task_struct *t); | 154 | extern int __audit_signal_info(int sig, struct task_struct *t); |
142 | static inline int audit_signal_info(int sig, struct task_struct *t) | 155 | static inline int audit_signal_info(int sig, struct task_struct *t) |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index af3ae91c47b1..bcf1fb7c7f32 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -89,14 +89,9 @@ struct list_head audit_filter_list[AUDIT_NR_FILTERS] = { | |||
89 | 89 | ||
90 | DEFINE_MUTEX(audit_filter_mutex); | 90 | DEFINE_MUTEX(audit_filter_mutex); |
91 | 91 | ||
92 | /* Inotify handle */ | ||
93 | extern struct inotify_handle *audit_ih; | ||
94 | |||
95 | /* Inotify events we care about. */ | 92 | /* Inotify events we care about. */ |
96 | #define AUDIT_IN_WATCH IN_MOVE|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF | 93 | #define AUDIT_IN_WATCH IN_MOVE|IN_CREATE|IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF |
97 | 94 | ||
98 | extern int audit_enabled; | ||
99 | |||
100 | void audit_free_parent(struct inotify_watch *i_watch) | 95 | void audit_free_parent(struct inotify_watch *i_watch) |
101 | { | 96 | { |
102 | struct audit_parent *parent; | 97 | struct audit_parent *parent; |
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 0072b1d8b258..e128adcb33c2 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -68,9 +68,6 @@ | |||
68 | 68 | ||
69 | #include "audit.h" | 69 | #include "audit.h" |
70 | 70 | ||
71 | extern struct list_head audit_filter_list[]; | ||
72 | extern int audit_ever_enabled; | ||
73 | |||
74 | /* AUDIT_NAMES is the number of slots we reserve in the audit_context | 71 | /* AUDIT_NAMES is the number of slots we reserve in the audit_context |
75 | * for saving names from getname(). */ | 72 | * for saving names from getname(). */ |
76 | #define AUDIT_NAMES 20 | 73 | #define AUDIT_NAMES 20 |
@@ -2361,9 +2358,6 @@ int __audit_signal_info(int sig, struct task_struct *t) | |||
2361 | struct audit_aux_data_pids *axp; | 2358 | struct audit_aux_data_pids *axp; |
2362 | struct task_struct *tsk = current; | 2359 | struct task_struct *tsk = current; |
2363 | struct audit_context *ctx = tsk->audit_context; | 2360 | struct audit_context *ctx = tsk->audit_context; |
2364 | extern pid_t audit_sig_pid; | ||
2365 | extern uid_t audit_sig_uid; | ||
2366 | extern u32 audit_sig_sid; | ||
2367 | 2361 | ||
2368 | if (audit_pid && t->tgid == audit_pid) { | 2362 | if (audit_pid && t->tgid == audit_pid) { |
2369 | if (sig == SIGTERM || sig == SIGHUP || sig == SIGUSR1) { | 2363 | if (sig == SIGTERM || sig == SIGHUP || sig == SIGUSR1) { |