summaryrefslogtreecommitdiffstats
path: root/init/init_task.c
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2018-05-12 21:58:19 -0400
committerPaul Moore <paul@paul-moore.com>2018-05-14 15:56:35 -0400
commitf0b752168d7091f38e7d61a80de2542e8b71d266 (patch)
treeac6396e791a3c8e200eda5489344158529d4e5cb /init/init_task.c
parent326bee0286d7f6b0d780f5b75a35ea9fe489a802 (diff)
downloadlinux-f0b752168d7091f38e7d61a80de2542e8b71d266.tar.bz2
audit: convert sessionid unset to a macro
Use a macro, "AUDIT_SID_UNSET", to replace each instance of initialization and comparison to an audit session ID. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'init/init_task.c')
-rw-r--r--init/init_task.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init/init_task.c b/init/init_task.c
index 3ac6e754cf64..74f60baa2799 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/mm.h>
+#include <linux/audit.h>
#include <asm/pgtable.h>
#include <linux/uaccess.h>
@@ -119,7 +120,7 @@ struct task_struct init_task
.thread_node = LIST_HEAD_INIT(init_signals.thread_head),
#ifdef CONFIG_AUDITSYSCALL
.loginuid = INVALID_UID,
- .sessionid = (unsigned int)-1,
+ .sessionid = AUDIT_SID_UNSET,
#endif
#ifdef CONFIG_PERF_EVENTS
.perf_event_mutex = __MUTEX_INITIALIZER(init_task.perf_event_mutex),