All of lore.kernel.org
 help / color / mirror / Atom feed
* stripped mount point
@ 2002-08-20 13:51 Timothy Wood
  2002-08-20 14:08 ` Stephen Smalley
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy Wood @ 2002-08-20 13:51 UTC (permalink / raw)
  To: SELinux

I just relabeled the files on my system and now my apache processes can
not read from the doc root nor can they append to the logs.  Now I
noticed when I relabeled the fs that each mount point was done
independently whereas before it would just label everything as being
under / (eg it labeled /, then it labeled /var, then /tmp, etc., etc.).
The files are all labeled correctly but the avc messages have the mount
points stripped from the path section (eg apache isn't denied access to
/var/www/html it is denied access to /www/html).  Now I can see how this
is causing a problem the question is why is it doing this?

Timothy,

avc:  denied  { read } for  pid=1598 exe=/usr/sbin/httpd
path=/www/html/index.php dev=03:08 ino=60255
scontext=system_u:system_r:initrc_t
tcontext=system_u:object_r:httpd_sys_content_t tclass=file

avc:  denied  { append } for  pid=1598 exe=/usr/sbin/httpd
path=/log/httpd/access_log dev=03:08 ino=50210
scontext=system_u:system_r:initrc_t
tcontext=system_u:object_r:httpd_log_files_t tclass=file



--
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: stripped mount point
  2002-08-20 13:51 stripped mount point Timothy Wood
@ 2002-08-20 14:08 ` Stephen Smalley
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2002-08-20 14:08 UTC (permalink / raw)
  To: Timothy Wood; +Cc: SELinux


On 20 Aug 2002, Timothy Wood wrote:

> I just relabeled the files on my system and now my apache processes can
> not read from the doc root nor can they append to the logs.  Now I
> noticed when I relabeled the fs that each mount point was done
> independently whereas before it would just label everything as being
> under / (eg it labeled /, then it labeled /var, then /tmp, etc., etc.).
> The files are all labeled correctly but the avc messages have the mount
> points stripped from the path section (eg apache isn't denied access to
> /var/www/html it is denied access to /www/html).  Now I can see how this
> is causing a problem the question is why is it doing this?

>From your audit logs, you can see that httpd is running in the wrong
domain (initrc_t rather than httpd_t).  This suggests that /usr/sbin/httpd
is not labeled with httpd_exec_t and needs to be relabeled.  After
relabeling /usr/sbin/httpd (either by running chcon directly or by running
'make relabel' again), run 'run_init /etc/init.d/httpd restart' to restart
the daemon in the correct domain.

With regard to the relabeling, setfiles is always applied to each
filesystem (partition) in turn, since each filesystem must contain its own
persistent label mapping.  You are presumably seeing a change because you
now have multiple partitions whereas you must have previously only had
one.

With regard to auditing, the audit path is expected to be relative to the
root of each filesystem, since we cannot reliably reconstruct any kind of
"absolute" pathname from many of the locations in the kernel where a
permission check is performed.  However, the audit path is not relevant to
the access control enforcement - SELinux is inode-based, not path-based.
The audit path is merely intended to assist in understanding the audit
message.

--
Stephen D. Smalley, NAI Labs
ssmalley@nai.com





--
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-20 14:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-20 13:51 stripped mount point Timothy Wood
2002-08-20 14:08 ` Stephen Smalley

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.