Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / include / linux / init_task.h
index 243e287..b24c287 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _LINUX__INIT_TASK_H
 #define _LINUX__INIT_TASK_H
 
-#include <linux/file.h>
+#include <linux/fdtable.h>
 #include <linux/rcupdate.h>
 #include <linux/irqflags.h>
 #include <linux/utsname.h>
@@ -9,6 +9,7 @@
 #include <linux/ipc.h>
 #include <linux/pid_namespace.h>
 #include <linux/user_namespace.h>
+#include <linux/securebits.h>
 #include <net/net_namespace.h>
 
 #define INIT_FDTABLE \
@@ -67,9 +68,6 @@
        .posix_timers    = LIST_HEAD_INIT(sig.posix_timers),            \
        .cpu_timers     = INIT_CPU_TIMERS(sig.cpu_timers),              \
        .rlim           = INIT_RLIMITS,                                 \
-       .pgrp           = 0,                                            \
-       .tty_old_pgrp   = NULL,                                         \
-       { .__session      = 0},                                         \
 }
 
 extern struct nsproxy init_nsproxy;
@@ -94,9 +92,6 @@ extern struct group_info init_groups;
 
 #define INIT_STRUCT_PID {                                              \
        .count          = ATOMIC_INIT(1),                               \
-       .nr             = 0,                                            \
-       /* Don't put this struct pid in pid_hash */                     \
-       .pid_chain      = { .next = NULL, .pprev = NULL },              \
        .tasks          = {                                             \
                { .first = &init_task.pids[PIDTYPE_PID].node },         \
                { .first = &init_task.pids[PIDTYPE_PGID].node },        \
@@ -120,6 +115,25 @@ extern struct group_info init_groups;
        .pid = &init_struct_pid,                                \
 }
 
+#ifdef CONFIG_AUDITSYSCALL
+#define INIT_IDS \
+       .loginuid = -1, \
+       .sessionid = -1,
+#else
+#define INIT_IDS
+#endif
+
+#ifdef CONFIG_SECURITY_FILE_CAPABILITIES
+/*
+ * Because of the reduced scope of CAP_SETPCAP when filesystem
+ * capabilities are in effect, it is safe to allow CAP_SETPCAP to
+ * be available in the default configuration.
+ */
+# define CAP_INIT_BSET  CAP_FULL_SET
+#else
+# define CAP_INIT_BSET  CAP_INIT_EFF_SET
+#endif
+
 /*
  *  INIT_TASK is used to set up the first task table, touch at
  * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -138,9 +152,14 @@ extern struct group_info init_groups;
        .cpus_allowed   = CPU_MASK_ALL,                                 \
        .mm             = NULL,                                         \
        .active_mm      = &init_mm,                                     \
-       .run_list       = LIST_HEAD_INIT(tsk.run_list),                 \
-       .ioprio         = 0,                                            \
-       .time_slice     = HZ,                                           \
+       .se             = {                                             \
+               .group_node     = LIST_HEAD_INIT(tsk.se.group_node),    \
+       },                                                              \
+       .rt             = {                                             \
+               .run_list       = LIST_HEAD_INIT(tsk.rt.run_list),      \
+               .time_slice     = HZ,                                   \
+               .nr_cpus_allowed = NR_CPUS,                             \
+       },                                                              \
        .tasks          = LIST_HEAD_INIT(tsk.tasks),                    \
        .ptrace_children= LIST_HEAD_INIT(tsk.ptrace_children),          \
        .ptrace_list    = LIST_HEAD_INIT(tsk.ptrace_list),              \
@@ -153,7 +172,8 @@ extern struct group_info init_groups;
        .cap_effective  = CAP_INIT_EFF_SET,                             \
        .cap_inheritable = CAP_INIT_INH_SET,                            \
        .cap_permitted  = CAP_FULL_SET,                                 \
-       .keep_capabilities = 0,                                         \
+       .cap_bset       = CAP_INIT_BSET,                                \
+       .securebits     = SECUREBITS_DEFAULT,                           \
        .user           = INIT_USER,                                    \
        .comm           = "swapper",                                    \
        .thread         = INIT_THREAD,                                  \
@@ -177,6 +197,7 @@ extern struct group_info init_groups;
                [PIDTYPE_SID]  = INIT_PID_LINK(PIDTYPE_SID),            \
        },                                                              \
        .dirties = INIT_PROP_LOCAL_SINGLE(dirties),                     \
+       INIT_IDS                                                        \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
 }