mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
security: add a secctx_to_secid() hook
Add a secctx_to_secid() LSM hook to go along with the existing secid_to_secctx() LSM hook. This patch also includes the SELinux implementation for this hook. Signed-off-by: Paul Moore <[email protected]> Acked-by: Stephen Smalley <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
c43e259cc7
commit
63cb344923
4 changed files with 31 additions and 0 deletions
|
|
@ -946,6 +946,11 @@ static int dummy_secid_to_secctx(u32 secid, char **secdata, u32 *seclen)
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int dummy_secctx_to_secid(char *secdata, u32 seclen, u32 *secid)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static void dummy_release_secctx(char *secdata, u32 seclen)
|
||||
{
|
||||
}
|
||||
|
|
@ -1106,6 +1111,7 @@ void security_fixup_ops (struct security_operations *ops)
|
|||
set_to_dummy_if_null(ops, getprocattr);
|
||||
set_to_dummy_if_null(ops, setprocattr);
|
||||
set_to_dummy_if_null(ops, secid_to_secctx);
|
||||
set_to_dummy_if_null(ops, secctx_to_secid);
|
||||
set_to_dummy_if_null(ops, release_secctx);
|
||||
#ifdef CONFIG_SECURITY_NETWORK
|
||||
set_to_dummy_if_null(ops, unix_stream_connect);
|
||||
|
|
|
|||
Loading…
Reference in a new issue