Skip to content

Commit

Permalink
SELinux: change sbsec->behavior to short
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Paris committed Jul 25, 2013
1 parent cfca030 commit f936c6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion security/selinux/include/objsec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion security/selinux/include/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ int security_genfs_sid(const char *fstype,
*/
int security_fs_use(
const char *fstype,
unsigned int *behavior,
short unsigned int *behavior,
u32 *sid)
{
int rc = 0;
Expand Down

0 comments on commit f936c6e

Please sign in to comment.