Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a6926cc9
Commit
a6926cc9
authored
May 06, 2016
by
James Morris
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'stable-4.7' of
git://git.infradead.org/users/pcmoore/selinux
into next
parents
0250abcd
c2316dbf
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
61 deletions
+128
-61
net/netlabel/netlabel_kapi.c
net/netlabel/netlabel_kapi.c
+1
-1
security/selinux/hooks.c
security/selinux/hooks.c
+102
-42
security/selinux/include/classmap.h
security/selinux/include/classmap.h
+19
-11
security/selinux/include/conditional.h
security/selinux/include/conditional.h
+1
-1
security/selinux/include/objsec.h
security/selinux/include/objsec.h
+2
-3
security/selinux/ss/services.c
security/selinux/ss/services.c
+3
-3
No files found.
net/netlabel/netlabel_kapi.c
View file @
a6926cc9
...
...
@@ -677,7 +677,7 @@ int netlbl_catmap_setrng(struct netlbl_lsm_catmap **catmap,
u32
spot
=
start
;
while
(
rc
==
0
&&
spot
<=
end
)
{
if
(((
spot
&
(
BITS_PER_LONG
-
1
))
!
=
0
)
&&
if
(((
spot
&
(
BITS_PER_LONG
-
1
))
=
=
0
)
&&
((
end
-
spot
)
>
BITS_PER_LONG
))
{
rc
=
netlbl_catmap_setlong
(
catmap
,
spot
,
...
...
security/selinux/hooks.c
View file @
a6926cc9
This diff is collapsed.
Click to expand it.
security/selinux/include/classmap.h
View file @
a6926cc9
...
...
@@ -12,6 +12,18 @@
#define COMMON_IPC_PERMS "create", "destroy", "getattr", "setattr", "read", \
"write", "associate", "unix_read", "unix_write"
#define COMMON_CAP_PERMS "chown", "dac_override", "dac_read_search", \
"fowner", "fsetid", "kill", "setgid", "setuid", "setpcap", \
"linux_immutable", "net_bind_service", "net_broadcast", \
"net_admin", "net_raw", "ipc_lock", "ipc_owner", "sys_module", \
"sys_rawio", "sys_chroot", "sys_ptrace", "sys_pacct", "sys_admin", \
"sys_boot", "sys_nice", "sys_resource", "sys_time", \
"sys_tty_config", "mknod", "lease", "audit_write", \
"audit_control", "setfcap"
#define COMMON_CAP2_PERMS "mac_override", "mac_admin", "syslog", \
"wake_alarm", "block_suspend", "audit_read"
/*
* Note: The name for any socket class should be suffixed by "socket",
* and doesn't contain more than one substr of "socket".
...
...
@@ -32,16 +44,9 @@ struct security_class_mapping secclass_map[] = {
"setsockcreate"
,
NULL
}
},
{
"system"
,
{
"ipc_info"
,
"syslog_read"
,
"syslog_mod"
,
"syslog_console"
,
"module_request"
,
NULL
}
},
"syslog_console"
,
"module_request"
,
"module_load"
,
NULL
}
},
{
"capability"
,
{
"chown"
,
"dac_override"
,
"dac_read_search"
,
"fowner"
,
"fsetid"
,
"kill"
,
"setgid"
,
"setuid"
,
"setpcap"
,
"linux_immutable"
,
"net_bind_service"
,
"net_broadcast"
,
"net_admin"
,
"net_raw"
,
"ipc_lock"
,
"ipc_owner"
,
"sys_module"
,
"sys_rawio"
,
"sys_chroot"
,
"sys_ptrace"
,
"sys_pacct"
,
"sys_admin"
,
"sys_boot"
,
"sys_nice"
,
"sys_resource"
,
"sys_time"
,
"sys_tty_config"
,
"mknod"
,
"lease"
,
"audit_write"
,
"audit_control"
,
"setfcap"
,
NULL
}
},
{
COMMON_CAP_PERMS
,
NULL
}
},
{
"filesystem"
,
{
"mount"
,
"remount"
,
"unmount"
,
"getattr"
,
"relabelfrom"
,
"relabelto"
,
"associate"
,
"quotamod"
,
...
...
@@ -150,12 +155,15 @@ struct security_class_mapping secclass_map[] = {
{
"memprotect"
,
{
"mmap_zero"
,
NULL
}
},
{
"peer"
,
{
"recv"
,
NULL
}
},
{
"capability2"
,
{
"mac_override"
,
"mac_admin"
,
"syslog"
,
"wake_alarm"
,
"block_suspend"
,
"audit_read"
,
NULL
}
},
{
COMMON_CAP2_PERMS
,
NULL
}
},
{
"kernel_service"
,
{
"use_as_override"
,
"create_files_as"
,
NULL
}
},
{
"tun_socket"
,
{
COMMON_SOCK_PERMS
,
"attach_queue"
,
NULL
}
},
{
"binder"
,
{
"impersonate"
,
"call"
,
"set_context_mgr"
,
"transfer"
,
NULL
}
},
{
"cap_userns"
,
{
COMMON_CAP_PERMS
,
NULL
}
},
{
"cap2_userns"
,
{
COMMON_CAP2_PERMS
,
NULL
}
},
{
NULL
}
};
security/selinux/include/conditional.h
View file @
a6926cc9
...
...
@@ -17,6 +17,6 @@ int security_get_bools(int *len, char ***names, int **values);
int
security_set_bools
(
int
len
,
int
*
values
);
int
security_get_bool_value
(
int
bool
);
int
security_get_bool_value
(
int
index
);
#endif
security/selinux/include/objsec.h
View file @
a6926cc9
...
...
@@ -38,9 +38,8 @@ struct task_security_struct {
};
enum
label_initialized
{
LABEL_MISSING
,
/* not initialized */
LABEL_INITIALIZED
,
/* inizialized */
LABEL_INVALID
/* invalid */
LABEL_INVALID
,
/* invalid or not initialized */
LABEL_INITIALIZED
/* initialized */
};
struct
inode_security_struct
{
...
...
security/selinux/ss/services.c
View file @
a6926cc9
...
...
@@ -2696,7 +2696,7 @@ int security_set_bools(int len, int *values)
return
rc
;
}
int
security_get_bool_value
(
int
bool
)
int
security_get_bool_value
(
int
index
)
{
int
rc
;
int
len
;
...
...
@@ -2705,10 +2705,10 @@ int security_get_bool_value(int bool)
rc
=
-
EFAULT
;
len
=
policydb
.
p_bools
.
nprim
;
if
(
bool
>=
len
)
if
(
index
>=
len
)
goto
out
;
rc
=
policydb
.
bool_val_to_struct
[
bool
]
->
state
;
rc
=
policydb
.
bool_val_to_struct
[
index
]
->
state
;
out:
read_unlock
(
&
policy_rwlock
);
return
rc
;
...
...
Write
Preview
Markdown
is supported
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