]> Pileus Git - ~andy/linux/commitdiff
SELinux: change sbsec->behavior to short
authorEric Paris <eparis@redhat.com>
Wed, 10 Oct 2012 14:38:47 +0000 (10:38 -0400)
committerEric Paris <eparis@redhat.com>
Thu, 25 Jul 2013 17:03:09 +0000 (13:03 -0400)
We only have 6 options, so char is good enough, but use a short as that
packs nicely.  This shrinks the superblock_security_struct just a little
bit.

Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/include/objsec.h
security/selinux/include/security.h
security/selinux/ss/services.c

index fe99f64a1d545bee52a0307ca1c100e101256a1d..b1dfe104945078ead53647c247c46aa6134fac2e 100644 (file)
@@ -58,7 +58,7 @@ struct superblock_security_struct {
        u32 sid;                        /* SID of file system superblock */
        u32 def_sid;                    /* default SID for labeling */
        u32 mntpoint_sid;               /* SECURITY_FS_USE_MNTPOINT context for files */
-       unsigned int behavior;          /* labeling behavior */
+       unsigned short behavior;        /* labeling behavior */
        unsigned short flags;           /* which mount options were specified */
        struct mutex lock;
        struct list_head isec_head;
index 9c424d8bd2e05d501e8c79b62c7abd9fafdbfb9d..20830be6b61f46ae0fef03c47bd92cd0d7d860f5 100644 (file)
@@ -171,7 +171,7 @@ int security_get_allow_unknown(void);
 #define SECURITY_FS_USE_NONE           5 /* no labeling support */
 #define SECURITY_FS_USE_MNTPOINT       6 /* use mountpoint labeling */
 
-int security_fs_use(const char *fstype, unsigned int *behavior,
+int security_fs_use(const char *fstype, short unsigned int *behavior,
        u32 *sid);
 
 int security_genfs_sid(const char *fstype, char *name, u16 sclass,
index b4feecc3fe0110d10bbdc183c369a03ab8495a6c..603c638434bbcd579230c2cdf97eea14faf33159 100644 (file)
@@ -2329,7 +2329,7 @@ out:
  */
 int security_fs_use(
        const char *fstype,
-       unsigned int *behavior,
+       short unsigned int *behavior,
        u32 *sid)
 {
        int rc = 0;