Переглянути джерело

SELinux: allow seek operations on the file exposing policy

sesearch uses:
lseek(3, 0, SEEK_SET)                   = -1 ESPIPE (Illegal seek)

Make that work.

Signed-off-by: Eric Paris <eparis@redhat.com>
Eric Paris 13 роки тому
батько
коміт
47a93a5bcb
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      security/selinux/selinuxfs.c

+ 1 - 0
security/selinux/selinuxfs.c

@@ -496,6 +496,7 @@ static const struct file_operations sel_policy_ops = {
 	.read		= sel_read_policy,
 	.read		= sel_read_policy,
 	.mmap		= sel_mmap_policy,
 	.mmap		= sel_mmap_policy,
 	.release	= sel_release_policy,
 	.release	= sel_release_policy,
+	.llseek		= generic_file_llseek,
 };
 };
 
 
 static ssize_t sel_write_load(struct file *file, const char __user *buf,
 static ssize_t sel_write_load(struct file *file, const char __user *buf,