Skip to contentSkip to conversation

kde (users) requires read permission to /var/spool/cups(/certs/0)

DISCUSSION Luke Kenneth Casson Leighton 2 participants 3 messages Jun 13, 2004 – Jun 18, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

hi there,

don't exactly know what this is about, but if i boot in non-enforcing mode then i can add a local cupsys-managed printer WITHOUT having to type in a password (a desirable thing for a single user home office system), and i get this in the audit logs:

allow user_t print_spool_t:dir { search };
#EXE=/usr/bin/kdeinit NAME=cups : search

allow user_t print_spool_t:file { getattr read };
#EXE=/usr/bin/kdeinit NAME=0 : read
#EXE=/usr/bin/kdeinit
PATH=/var/spool/cups/certs/0 : getattr

(i also get that damn pam system_chkpwd_t unix_verify thing but
i can deal with that).

the file contexts are as follows:

	sez:~# ls -altr --context /var/spool/cups/certs/
	drwx--x---  root     lpadmin  system_u:object_r:print_spool_t  ..
	-r--r-----  root     lpadmin  system_u:object_r:print_spool_t  0
	drwx--x--x  root     lpadmin  system_u:object_r:print_spool_t  .

i _have_ added my single user to the lpadmin group.

as you can see, the cups developers have made an effort to provide some sort of unixy security by removing read permission from the certs directory and only granting read permission to the cert file.

the thing is that the only way i can imagine a workable SE/Linux parallel to be is to have tunable.te "users_can_print_manage" thing.

or to have a staff_printadmin_r role in a similar manner to that which windows NT security has, matching the capability of the lpadmin unix group.

alternatively i just create a new file context cups_spool_cert_t, and add read-permission for users to get to it.

neither approach makes me very happy.

ideas anyone?

find out what program is really doing that spool access and provide a domain_auto_trans to print_spool_t for it?

l.

Signature · 14 lines
-- 
Information I post is with honesty, integrity, and the expectation that
you will take full responsibility if acting on the information contained,
and that, should you find it to be flawed or even mildly useful, you
will act with both honesty and integrity in return - and tell me.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 8 lines · Luke Kenneth Casson Leighton

don't exactly know what this is about, but if i boot in non-enforcing mode then i can add a local cupsys-managed printer WITHOUT having to type in a password (a desirable thing for a single user home office system), and i get this in the audit logs:

	allow user_t print_spool_t:dir { search };
			#EXE=/usr/bin/kdeinit  NAME=cups   :  search

On my system that directory is more 0700 so a user can't search it anyway. Are you sure that kde is doing the right thing?

Signature · 9 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 7 lines · Russell Coker
Quoted 6 lines · Luke Kenneth Casson Leighton

don't exactly know what this is about, but if i boot in non-enforcing mode then i can add a local cupsys-managed printer WITHOUT having to type in a password (a desirable thing for a single user home office system), and i get this in the audit logs:

Quoted 5 lines
Quoted 2 lines
	allow user_t print_spool_t:dir { search };
			#EXE=/usr/bin/kdeinit  NAME=cups   :  search

On my system that directory is more 0700 so a user can't search it anyway. Are you sure that kde is doing the right thing?

... and therefore, if you add a printer, you get asked for a username / password, yes?

however, if you add the user to the lpadmin group, and you then also allow that user to access that directory (perms 0750, perhaps? ) then i think you will find that you do not get asked for a username or a password.

for the system that i am setting up, this is a desirable scenario [not being asked for user/pass] because i will not BE giving out usernames or passwords - very much a WYSIWYG philosophy.

l.

Signature · 14 lines
-- 
Information I post is with honesty, integrity, and the expectation that
you will take full responsibility if acting on the information contained,
and that, should you find it to be flawed or even mildly useful, you
will act with both honesty and integrity in return - and tell me.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:[email protected]"> [email protected] </a> <br />


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.