mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
selinux: place open in the common file perms
kernel can dynamically remap perms. Drop the open lookup table and put open in the common file perms. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Stephen D. Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
b782e0a68d
commit
49b7b8de46
2 changed files with 11 additions and 28 deletions
|
@ -2,7 +2,8 @@
|
|||
"getattr", "setattr", "lock", "relabelfrom", "relabelto", "append"
|
||||
|
||||
#define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \
|
||||
"rename", "execute", "swapon", "quotaon", "mounton", "audit_access"
|
||||
"rename", "execute", "swapon", "quotaon", "mounton", "audit_access", \
|
||||
"open"
|
||||
|
||||
#define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \
|
||||
"listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \
|
||||
|
@ -43,22 +44,22 @@ struct security_class_mapping secclass_map[] = {
|
|||
"quotaget", NULL } },
|
||||
{ "file",
|
||||
{ COMMON_FILE_PERMS,
|
||||
"execute_no_trans", "entrypoint", "execmod", "open", NULL } },
|
||||
"execute_no_trans", "entrypoint", "execmod", NULL } },
|
||||
{ "dir",
|
||||
{ COMMON_FILE_PERMS, "add_name", "remove_name",
|
||||
"reparent", "search", "rmdir", "open", NULL } },
|
||||
"reparent", "search", "rmdir", NULL } },
|
||||
{ "fd", { "use", NULL } },
|
||||
{ "lnk_file",
|
||||
{ COMMON_FILE_PERMS, NULL } },
|
||||
{ "chr_file",
|
||||
{ COMMON_FILE_PERMS,
|
||||
"execute_no_trans", "entrypoint", "execmod", "open", NULL } },
|
||||
"execute_no_trans", "entrypoint", "execmod", NULL } },
|
||||
{ "blk_file",
|
||||
{ COMMON_FILE_PERMS, "open", NULL } },
|
||||
{ COMMON_FILE_PERMS, NULL } },
|
||||
{ "sock_file",
|
||||
{ COMMON_FILE_PERMS, "open", NULL } },
|
||||
{ COMMON_FILE_PERMS, NULL } },
|
||||
{ "fifo_file",
|
||||
{ COMMON_FILE_PERMS, "open", NULL } },
|
||||
{ COMMON_FILE_PERMS, NULL } },
|
||||
{ "socket",
|
||||
{ COMMON_SOCK_PERMS, NULL } },
|
||||
{ "tcp_socket",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue