ifdef struct task_struct::security
authorAlexey Dobriyan <adobriyan@gmail.com>
Wed, 17 Oct 2007 06:31:35 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:07 +0000 (08:43 -0700)
For those who don't care about CONFIG_SECURITY.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sched.h
kernel/fork.c

index 774cb435c7d85afcb1d2642cb5c56318300ca78d..3de5aa210feb5fabf434a82d936d5b1f66c5e3b4 100644 (file)
@@ -1044,8 +1044,9 @@ struct task_struct {
        int (*notifier)(void *priv);
        void *notifier_data;
        sigset_t *notifier_mask;
-       
+#ifdef CONFIG_SECURITY
        void *security;
+#endif
        struct audit_context *audit_context;
        seccomp_t seccomp;
 
index 3e764f6f2be1995363309c732c06387ad686b3f7..490495a39c7e65cb0eb239b2b6474ce5d58b718b 100644 (file)
@@ -1079,7 +1079,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
        do_posix_clock_monotonic_gettime(&p->start_time);
        p->real_start_time = p->start_time;
        monotonic_to_bootbased(&p->real_start_time);
+#ifdef CONFIG_SECURITY
        p->security = NULL;
+#endif
        p->io_context = NULL;
        p->io_wait = NULL;
        p->audit_context = NULL;