by jattila40 » Wed Jun 08, 2011 5:23 am
It's nice!
Just another problem:
I tried to stop RBAC during shutdown, and put an interactive shellscript into init.d directory to stop RBAC (interactive means: "# X-Interactive : true" line in the LSB header of the script, and the script name in the <interactive> section of /etc/insserv.conf file. Its purpose is, to enable gradm -D to prompt for a password). I want to stop RBAC immediately after all users logging off, but before daemons shutting down (as in the reverse order of enabling RBAC). It almost works correctly, but before prompting for the password, i get the folowing error message:
Jun 7 14:48:42 jeneidebian kernel: [ 105.620391] grsec: (root:U:/sbin/gradm) use of CAP_SYS_TTY_CONFIG denied for /sbin/gradm[gradm:1911] uid/euid:0/0 gid/egid:0/0, parent /etc/init.d/shutdownrbac[shutdownrbac:1909] uid/euid:0/0 gid/egid:0/0
four times. I tried to give gradm the CAP_SYS_TTY_CONFIG capability something like this:
subject /etc/init.d/shutdownrbac
/sbin/gradm rxi
-CAP_ALL
+CAP_SYS_TTY_CONFIG
+CAP_IPC_LOCK
This is not good, because /sbin/gradm looses all its objects given in built-in /sbin/gradm subject (it is invisibly added to policy by specifying G flag for the involving role). One solution would be to repeat all objects from invisible gradm subject, but this is not a good idea, because i don't want to let shutdownrbac script to access all the objects what gradm accesses to. Another solution would be not to replace the objects of gradm subject with objects of shutdownrbac subject (i flag is given to gradm object), but adding to them. So my question is: how can i add objects to invisible gradm subject? Or if i could see the gradm subject, i would simply add my objects to it, end the G role flag should be removed (has the G flag any other special functionality, then adding invisible gradm subject to the role?). Can you present the exact invisible gradm subject to me?
Thanks: Attila