]> git.baikalelectronics.ru Git - kernel.git/commit
selinux: export validatetrans decisions
authorAndrew Perepechko <anserper@ya.ru>
Thu, 24 Dec 2015 16:09:41 +0000 (11:09 -0500)
committerPaul Moore <pmoore@redhat.com>
Thu, 24 Dec 2015 16:09:41 +0000 (11:09 -0500)
commitcd828a1eac112fc27d135537798a442f659e33e8
treebed3081497a3b7a628fe77f919514e01650d4d8a
parent5feda76933e180af62d77f7407626c7ff38c07bf
selinux: export validatetrans decisions

Make validatetrans decisions available through selinuxfs.
"/validatetrans" is added to selinuxfs for this purpose.
This functionality is needed by file system servers
implemented in userspace or kernelspace without the VFS
layer.

Writing "$oldcontext $newcontext $tclass $taskcontext"
to /validatetrans is expected to return 0 if the transition
is allowed and -EPERM otherwise.

Signed-off-by: Andrew Perepechko <anserper@ya.ru>
CC: andrew.perepechko@seagate.com
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
security/selinux/include/classmap.h
security/selinux/include/security.h
security/selinux/selinuxfs.c
security/selinux/ss/services.c