Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Ruderich
passt-mac
Commits
51fc8293
Commit
51fc8293
authored
Apr 11, 2016
by
Lukas Braun
Committed by
Simon Ruderich
Aug 29, 2016
Browse files
slsm: passtfs: remove unused profiles_read()
parent
909976f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
security/slsm/passtfs.c
View file @
51fc8293
...
...
@@ -74,52 +74,6 @@ static ssize_t profiles_write(struct file *f, const char __user *buf, size_t siz
}
/**
* profiles_read - called when user reads profiles file
* TODO: dump tree when slsm_dump_tree works
*
* @file:
* @buf: userland buffer
* @count: size of buf
* @ppos: position in file
*/
static
ssize_t
profiles_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
#if 0
char *dump_buf;
loff_t pos = *ppos;
loff_t len;
dump_buf = kmalloc(count, GFP_KERNEL);
if (!dump_buf) {
printk(KERN_ERR "slsm: faild to alloc memory for tree dumping \n");
return -ENOMEM;
}
len = slsm_dump_tree(dump_buf, count);
if (!count || pos > count) {
kfree(dump_buf);
return 0;
}
len -= pos;
if (count < len)
len = count;
if (copy_to_user(buf, dump_buf, len)) {
kfree(dump_buf);
return -EFAULT;
}
*ppos += len;
kfree(dump_buf);
return bytes_read;
#endif
return
-
EPERM
;
}
/** profiles_release - called when profiles file is closed
* resets device_open flag.i and kicks off the tree build
*
...
...
@@ -147,7 +101,6 @@ int profiles_release(struct inode *inode, struct file *file)
static
const
struct
file_operations
fs_fops_profiles
=
{
.
owner
=
THIS_MODULE
,
.
open
=
profiles_open
,
.
read
=
profiles_read
,
.
write
=
profiles_write
,
.
release
=
profiles_release
,
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment