* userdom_unpriv_user_template use errors and creating new roles
@ 2010-03-22 15:53 Andy Warner
0 siblings, 0 replies; only message in thread
From: Andy Warner @ 2010-03-22 15:53 UTC (permalink / raw)
To: SE-Linux
[-- Attachment #1: Type: text/plain, Size: 3874 bytes --]
Using FC12, fully updated. I have two basic, but possibly related
questions. The first is regarding a change to the targeted policy that
resulted in an install error for our Trusted RUBIX policy when using the
userdom_unpriv_user_template interface, as off the last targeted policy
update. The second are denials I now receive after changing our policy
to use a different interface.
First issue:
Our policy had been declaring a custom role (rubix_dbadm_r in this case)
using the following:
userdom_unpriv_user_template(rubix_dbadm)
corecmd_exec_shell(rubix_dbadm_t)
Originally, this worked for its intended purposes with no selinux
denials. As of installing policy update:
Name : selinux-policy-targeted
Arch : noarch
Version : 3.6.32
Release : 103.fc12
When we build our policy we received the following errors:
rubix-dev.te:175: Warning: xserver_user_client() has been deprecated,
please use xserver_user_x_domain_template instead.
Installing rubix-dev-targeted policy
libsepol.print_missing_requirements: rubix-dev's global requirements
were not met: type/attribute xdrawable_type (No such file or directory).
libsemanage.semanage_link_sandbox: Link packages failed (No such file or
directory).
semodule: Failed!
I had been receiving the depreciated warning a while (ignoring at my own
peril), the link error was new to this targeted policy version. I also
received errors while installing selinux-policy-targeted rpm itself,
stating a different requirement not being met in the then installed
rubix-dev policy. I do not recall the exact error message, but remember
it was an X related type that was missing.
Noting the X connection between the depreciated function and the link
error, I traced the reference to the depreciated 'xserver_user_client'
interface to 'userdom_unpriv_user_template'. I did not call
'xserver_user_client' directly. I replaced the call to
'userdom_unpriv_user_template' with a call to
'userdom_restricted_user_template' and my then policy installed properly.
But using the 'userdom_restricted_user_template ' interface, now I
notice some selinux denials during a call to newrole, which is my second
question below. I am not sure that the change to the new interface is
the cause of the denials, I am just now noticing them.
Should the 'userdom_unpriv_user_template' interface either be fixed or
removed from the userdom *.if file?
Second issue:
The rubix_dbadm_r role is now created with:
userdom_restricted_user_template(rubix_dbadm)
corecmd_exec_shell(rubix_dbadm_t)
When I perform a newrole, I receive denials as follows (note, I am in
permissive mode so the newrole succeeds):
$ id -Z
rxdev_u:staff_r:staff_t:s0-s0:c0.c1023
$ ls -Z `tty`
crw--w----. warner tty rxdev_u:object_r:user_devpts_t:s0 /dev/pts/4
$ newrole -r rubix_dbadm_r
Password:
$
Note: I am a bit surprised that the tty type is user_devpts_t and not
staff_devpts_t, though I am very unfamiliar with this.
Mar 22 11:04:03 localhost setroubleshoot: SELinux is preventing
/usr/bin/newrole "write" access on /var/run/dbus/system_bus_socket. For
complete SELinux messages. run sealert -l
95fc56ee-8711-460c-874b-6ddb91cc9add
Mar 22 11:04:03 localhost setroubleshoot: SELinux is preventing
/usr/bin/newrole "write" access on /var/run/dbus/system_bus_socket. For
complete SELinux messages. run sealert -l
95fc56ee-8711-460c-874b-6ddb91cc9add
# more securetty_types
sysadm_tty_device_t
user_tty_device_t
staff_tty_device_t
user_devpts_t
devpts_t
#
Are these denials related to how I create the rubix_dbadm_r role? Is
there a proper way to create a role suitable for auser to transition
into and as a potential default logon user role?
I fully admit my choice of creating a role was through observation of
other policy code and trail and error. It would be nice to have a
definitive word on it.
Thanks,
Andy
[-- Attachment #2: Type: text/html, Size: 5006 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-22 15:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 15:53 userdom_unpriv_user_template use errors and creating new roles Andy Warner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.