diff options
author | Eric Paris <eparis@redhat.com> | 2010-07-23 11:44:09 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-02 01:35:08 -0400 |
commit | 49b7b8de46d293113a0a0bb026ff7bd833c73367 (patch) | |
tree | ff29778c49a8ac1511249cc268ddbb2c6ddb86a9 /security/selinux/include | |
parent | b782e0a68d17894d9a618ffea55b33639faa6bb4 (diff) |
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>
Diffstat (limited to 'security/selinux/include')
-rw-r--r-- | security/selinux/include/classmap.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/security/selinux/include/classmap.h b/security/selinux/include/classmap.h index d64603e10dbe..41990cbba760 100644 --- a/security/selinux/include/classmap.h +++ b/security/selinux/include/classmap.h | |||
@@ -2,7 +2,8 @@ | |||
2 | "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append" | 2 | "getattr", "setattr", "lock", "relabelfrom", "relabelto", "append" |
3 | 3 | ||
4 | #define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \ | 4 | #define COMMON_FILE_PERMS COMMON_FILE_SOCK_PERMS, "unlink", "link", \ |
5 | "rename", "execute", "swapon", "quotaon", "mounton", "audit_access" | 5 | "rename", "execute", "swapon", "quotaon", "mounton", "audit_access", \ |
6 | "open" | ||
6 | 7 | ||
7 | #define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \ | 8 | #define COMMON_SOCK_PERMS COMMON_FILE_SOCK_PERMS, "bind", "connect", \ |
8 | "listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \ | 9 | "listen", "accept", "getopt", "setopt", "shutdown", "recvfrom", \ |
@@ -43,22 +44,22 @@ struct security_class_mapping secclass_map[] = { | |||
43 | "quotaget", NULL } }, | 44 | "quotaget", NULL } }, |
44 | { "file", | 45 | { "file", |
45 | { COMMON_FILE_PERMS, | 46 | { COMMON_FILE_PERMS, |
46 | "execute_no_trans", "entrypoint", "execmod", "open", NULL } }, | 47 | "execute_no_trans", "entrypoint", "execmod", NULL } }, |
47 | { "dir", | 48 | { "dir", |
48 | { COMMON_FILE_PERMS, "add_name", "remove_name", | 49 | { COMMON_FILE_PERMS, "add_name", "remove_name", |
49 | "reparent", "search", "rmdir", "open", NULL } }, | 50 | "reparent", "search", "rmdir", NULL } }, |
50 | { "fd", { "use", NULL } }, | 51 | { "fd", { "use", NULL } }, |
51 | { "lnk_file", | 52 | { "lnk_file", |
52 | { COMMON_FILE_PERMS, NULL } }, | 53 | { COMMON_FILE_PERMS, NULL } }, |
53 | { "chr_file", | 54 | { "chr_file", |
54 | { COMMON_FILE_PERMS, | 55 | { COMMON_FILE_PERMS, |
55 | "execute_no_trans", "entrypoint", "execmod", "open", NULL } }, | 56 | "execute_no_trans", "entrypoint", "execmod", NULL } }, |
56 | { "blk_file", | 57 | { "blk_file", |
57 | { COMMON_FILE_PERMS, "open", NULL } }, | 58 | { COMMON_FILE_PERMS, NULL } }, |
58 | { "sock_file", | 59 | { "sock_file", |
59 | { COMMON_FILE_PERMS, "open", NULL } }, | 60 | { COMMON_FILE_PERMS, NULL } }, |
60 | { "fifo_file", | 61 | { "fifo_file", |
61 | { COMMON_FILE_PERMS, "open", NULL } }, | 62 | { COMMON_FILE_PERMS, NULL } }, |
62 | { "socket", | 63 | { "socket", |
63 | { COMMON_SOCK_PERMS, NULL } }, | 64 | { COMMON_SOCK_PERMS, NULL } }, |
64 | { "tcp_socket", | 65 | { "tcp_socket", |