Research
.
Skip Search Box

SELinux Mailing List

Re: [ PATCH ] X clients cleanup patch #2

From: Russell Coker <russell_at_coker.com.au>
Date: Tue, 29 Mar 2005 12:12:30 +1100


On Monday 28 March 2005 11:16, Ivan Gyurdiev <ivg2@cornell.edu> wrote:
> Question 1: X has the following rules:
>
> allow $1_$2_t self:unix_dgram_socket create_socket_perms;
> allow $1_$2_t self:unix_stream_socket { connectto
> create_stream_socket_perms };
>
> Removing them seems to affect most (all?) X clients.
> Are those related to establishing a connection to X,
> or are they just common frequently used rules?

If DISPLAY=:0.0 then all X clients will need such access. DISPLAY=:0.0 is the default for a local X login so we should assume that every system that has X will need such access.

In any case "self" access isn't a security issue.

> Question 2:
>
> games, mozilla, and gift want to read /etc/mtab, and /etc/nsswitch.conf.
> Why is that neessary, and do those rules always go together?

nsswitch.conf is used for any program that does a UID->name or name->UID lookup. So any operation comparable to "ls -l" will need it. Mozilla will probably call getuid() and then getpwuid() to get the Unix account name for various things (including temporary file names I think).

/etc/mtab is unrelated. Lots of programs read it. For example programs that want to know how much disk space is free often read /etc/mtab. Usually such access is not strictly necessary (the program could perform the same tasks without it) but sometimes the program will not be written well in this regard and will fail without such access. /etc/mtab doesn't contain any secret data so there's no harm. /proc/mounts is a better source of such data anyway so any program that can read proc_t:lnk_file and self:file can get the same data from a more authoritative source.

-- 
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Wed 30 Mar 2005 - 00:34:05 EST
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service