SEL_DISABLE /* disable SELinux until next reboot */
};
-static ssize_t sel_read_enforce(struct file *filp, char *buf,
+static ssize_t sel_read_enforce(struct file *filp, char __user *buf,
size_t count, loff_t *ppos)
{
char *page;
}
#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
-static ssize_t sel_write_enforce(struct file * file, const char * buf,
+static ssize_t sel_write_enforce(struct file * file, const char __user * buf,
size_t count, loff_t *ppos)
{
};
#ifdef CONFIG_SECURITY_SELINUX_DISABLE
-static ssize_t sel_write_disable(struct file * file, const char * buf,
+static ssize_t sel_write_disable(struct file * file, const char __user * buf,
size_t count, loff_t *ppos)
{
.write = sel_write_disable,
};
-static ssize_t sel_read_policyvers(struct file *filp, char *buf,
+static ssize_t sel_read_policyvers(struct file *filp, char __user *buf,
size_t count, loff_t *ppos)
{
char *page;
/* declaration for sel_write_load */
static int sel_make_bools(void);
-static ssize_t sel_read_mls(struct file *filp, char *buf,
+static ssize_t sel_read_mls(struct file *filp, char __user *buf,
size_t count, loff_t *ppos)
{
char *page;
.read = sel_read_mls,
};
-static ssize_t sel_write_load(struct file * file, const char * buf,
+static ssize_t sel_write_load(struct file * file, const char __user * buf,
size_t count, loff_t *ppos)
{
};
-static ssize_t sel_write_context(struct file * file, const char * buf,
+static ssize_t sel_write_context(struct file * file, const char __user * buf,
size_t count, loff_t *ppos)
{
* possibly a read which collects the result - which is stored in a
* file-local buffer.
*/
-static ssize_t TA_write(struct file *file, const char *buf, size_t size, loff_t *pos)
+static ssize_t TA_write(struct file *file, const char __user *buf, size_t size, loff_t *pos)
{
ino_t ino = file->f_dentry->d_inode->i_ino;
struct argresp *ar;
return rv;
}
-static ssize_t TA_read(struct file *file, char *buf, size_t size, loff_t *pos)
+static ssize_t TA_read(struct file *file, char __user *buf, size_t size, loff_t *pos)
{
struct argresp *ar;
ssize_t rv = 0;
#define BOOL_INO_OFFSET 30
-static ssize_t sel_read_bool(struct file *filep, char *buf,
+static ssize_t sel_read_bool(struct file *filep, char __user *buf,
size_t count, loff_t *ppos)
{
char *page = NULL;
return ret;
}
-static ssize_t sel_write_bool(struct file *filep, const char *buf,
+static ssize_t sel_write_bool(struct file *filep, const char __user *buf,
size_t count, loff_t *ppos)
{
char *page = NULL;
goto out;
}
page = (char*)__get_free_page(GFP_KERNEL);
- if (!page)
- return -ENOMEM;
+ if (!page) {
+ length = -ENOMEM;
+ goto out;
+ }
memset(page, 0, PAGE_SIZE);
if (copy_from_user(page, buf, count))
.write = sel_write_bool,
};
-static ssize_t sel_commit_bools_write(struct file *filep, const char *buf,
+static ssize_t sel_commit_bools_write(struct file *filep,
+ const char __user *buf,
size_t count, loff_t *ppos)
{
char *page = NULL;
goto out;
}
page = (char*)__get_free_page(GFP_KERNEL);
- if (!page)
- return -ENOMEM;
+ if (!page) {
+ length = -ENOMEM;
+ goto out;
+ }
memset(page, 0, PAGE_SIZE);