mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
selinux: opened file can't have NULL or negative ->f_path.dentry
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
d895cb1af1
commit
45e09bd51b
1 changed files with 0 additions and 9 deletions
|
@ -3135,11 +3135,6 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case F_SETFL:
|
case F_SETFL:
|
||||||
if (!file->f_path.dentry || !file->f_path.dentry->d_inode) {
|
|
||||||
err = -EINVAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) {
|
if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) {
|
||||||
err = file_has_perm(cred, file, FILE__WRITE);
|
err = file_has_perm(cred, file, FILE__WRITE);
|
||||||
break;
|
break;
|
||||||
|
@ -3162,10 +3157,6 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
|
||||||
case F_SETLK64:
|
case F_SETLK64:
|
||||||
case F_SETLKW64:
|
case F_SETLKW64:
|
||||||
#endif
|
#endif
|
||||||
if (!file->f_path.dentry || !file->f_path.dentry->d_inode) {
|
|
||||||
err = -EINVAL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
err = file_has_perm(cred, file, FILE__LOCK);
|
err = file_has_perm(cred, file, FILE__LOCK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue