Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1872981b authored by Eric Paris's avatar Eric Paris Committed by James Morris
Browse files

SELinux: cleanup on isle selinuxfs.c



Why would anyone just clean up white space all day?  Because they were
out too late last night and don't want to think for a day.  So here is a
nice clean selinuxfs.c patch.

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 2ced3dfd
Loading
Loading
Loading
Loading
+57 −55
Original line number Diff line number Diff line
@@ -74,17 +74,17 @@ __setup("selinux_compat_net=", selinux_compat_net_setup);
static DEFINE_MUTEX(sel_mutex);

/* global data for booleans */
static struct dentry *bool_dir = NULL;
static int bool_num = 0;
static struct dentry *bool_dir;
static int bool_num;
static char **bool_pending_names;
static int *bool_pending_values = NULL;
static int *bool_pending_values;

/* global data for classes */
static struct dentry *class_dir = NULL;
static struct dentry *class_dir;
static unsigned long last_class_ino;

/* global data for policy capabilities */
static struct dentry *policycap_dir = NULL;
static struct dentry *policycap_dir;

extern void selnl_notify_setenforce(int val);

@@ -873,7 +873,8 @@ static ssize_t sel_read_bool(struct file *filep, char __user *buf,
		ret = -EINVAL;
		goto out;
	}
	if (!(page = (char*)get_zeroed_page(GFP_KERNEL))) {
	page = (char *)get_zeroed_page(GFP_KERNEL);
	if (!page) {
		ret = -ENOMEM;
		goto out;
	}
@@ -992,9 +993,8 @@ static ssize_t sel_commit_bools_write(struct file *filep,
	if (sscanf(page, "%d", &new_value) != 1)
		goto out;

	if (new_value && bool_pending_values) {
	if (new_value && bool_pending_values)
		security_set_bools(bool_num, bool_pending_values);
	}

	length = count;

@@ -1056,7 +1056,8 @@ static int sel_make_bools(void)

	sel_remove_entries(dir);

	if (!(page = (char*)get_zeroed_page(GFP_KERNEL)))
	page = (char *)get_zeroed_page(GFP_KERNEL);
	if (!page)
		return -ENOMEM;

	ret = security_get_bools(&num, &names, &values);
@@ -1084,7 +1085,8 @@ static int sel_make_bools(void)
			goto err;
		}
		isec = (struct inode_security_struct *)inode->i_security;
		if ((ret = security_genfs_sid("selinuxfs", page, SECCLASS_FILE, &sid)))
		ret = security_genfs_sid("selinuxfs", page, SECCLASS_FILE, &sid);
		if (ret)
			goto err;
		isec->sid = sid;
		isec->initialized = 1;
@@ -1112,7 +1114,7 @@ err:

#define NULL_FILE_NAME "null"

struct dentry *selinux_null = NULL;
struct dentry *selinux_null;

static ssize_t sel_read_avc_cache_threshold(struct file *filp, char __user *buf,
					    size_t count, loff_t *ppos)