fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / security / selinux / include / objsec.h
index 9401788..06ef840 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/fs.h>
 #include <linux/binfmts.h>
 #include <linux/in.h>
+#include <linux/spinlock.h>
 #include "flask.h"
 #include "avc.h"
 
@@ -34,7 +35,6 @@ struct task_security_struct {
        u32 create_sid;      /* fscreate SID */
        u32 keycreate_sid;   /* keycreate SID */
        u32 sockcreate_sid;  /* fscreate SID */
-       u32 ptrace_sid;      /* SID of ptrace parent */
 };
 
 struct inode_security_struct {
@@ -44,7 +44,7 @@ struct inode_security_struct {
        u32 sid;             /* SID of this object */
        u16 sclass;       /* security class of this object */
        unsigned char initialized;     /* initialization flag */
-       struct semaphore sem;
+       struct mutex lock;
        unsigned char inherit;         /* inherit SID from parent entry */
 };
 
@@ -63,7 +63,7 @@ struct superblock_security_struct {
        unsigned int behavior;          /* labeling behavior */
        unsigned char initialized;      /* initialization flag */
        unsigned char proc;             /* proc fs */
-       struct semaphore sem;
+       struct mutex lock;
        struct list_head isec_head;
        spinlock_t isec_lock;
 };
@@ -99,7 +99,17 @@ struct netif_security_struct {
 
 struct sk_security_struct {
        struct sock *sk;                /* back pointer to sk object */
+       u32 sid;                        /* SID of this object */
        u32 peer_sid;                   /* SID of peer */
+#ifdef CONFIG_NETLABEL
+       u16 sclass;                     /* sock security class */
+       enum {                          /* NetLabel state */
+               NLBL_UNSET = 0,
+               NLBL_REQUIRE,
+               NLBL_LABELED,
+       } nlbl_state;
+       spinlock_t nlbl_lock;           /* protects nlbl_state */
+#endif
 };
 
 struct key_security_struct {