All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: tmpfs_t
@ 2003-01-27 13:20 Stephen D. Smalley
  2003-02-01 22:51 ` tmpfs_t Russell Coker
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen D. Smalley @ 2003-01-27 13:20 UTC (permalink / raw)
  To: selinux, russell


> I have been looking into using tmpfs as /tmp .
> 
> Currently tmpfs is labeled tmpfs_t and there is no policy for allowing file 
> creation under it.  So I have experimented with labelling it as tmp_t and 
> changing the tmp_domain() macro to have the following rule:
> allow $1_tmp_t tmp_t:filesystem associate;
> 
> To do this properly I would also have to change every
> allow whatever fs_t:filesystem getattr;
> to:
> allow whatever { fs_t tmp_t }:filesystem getattr;
> 
> Or should I instead leave the tmpfs filesystem labelled as tmpfs_t and add 
> appropriate file_type_auto_trans() rules for it?

The problem is that tmpfs is also used for the kernel internal mount
for System V shared memory and shared anonymous mappings.  The current
fs_use configuration and the existing $1_tmpfs_t types and rules are
oriented toward that usage of tmpfs.  Distinguishing different instances
of tmpfs mounts and providing different labeling behaviors and contexts
for those different instances would require further changes to SELinux. 

--
Stephen Smalley, NSA
sds@epoch.ncsc.mil


--
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] 8+ messages in thread
* Re: SELinux question?
@ 2003-02-04 17:21 Stephen D. Smalley
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen D. Smalley @ 2003-02-04 17:21 UTC (permalink / raw)
  To: tom, dwalsh, russell; +Cc: selinux

>So they did it because it was easier to wrap the application then to 
>change the code, correct?

See selinux/utils/spasswd/README.  Originally, spasswd was only a
wrapper that served as a "gate" for allowing ordinary users to change
their own passwords while preventing the superuser from arbitrarily
changing other user's passwords.  At that time, the functionality was
easily provided by a wrapper, and there was still a case where direct
execution of the ordinary passwd program was legitimate (execution by
an authorized administrator in sysadm_t to change another user's password).

The wrapper was later extended by Russell Coker to also relabel
/etc/passwd and /etc/shadow after an update in order to support
different security contexts on /etc/passwd and /etc/shadow.  With this
change, it became necessary for authorized administrators to also run
wrapper programs (sadminpasswd, svipw, sadduser, etc) in order to also
preserve these contexts.  

As noted in the README, it would be preferable to modify the base
utilities to use the _secure interfaces to create each file with its
proper context rather than relying on a wrapper to relabel them after
the transaction.  Otherwise, there is a window in which the /etc/passwd
file is left in a more restricted context than desired in order to
preserve the protection of /etc/shadow.

--
Stephen Smalley, NSA
sds@epoch.ncsc.mil


--
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] 8+ messages in thread

end of thread, other threads:[~2003-02-04 18:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-27 13:20 tmpfs_t Stephen D. Smalley
2003-02-01 22:51 ` tmpfs_t Russell Coker
2003-02-04  7:58   ` SELinux question? Daniel J Walsh
2003-02-04 14:46     ` Tom
2003-02-04 15:49       ` Daniel J Walsh
2003-02-04 16:31         ` Russell Coker
2003-02-04 16:51     ` Frank Mayer
  -- strict thread matches above, loose matches on Subject: below --
2003-02-04 17:21 Stephen D. 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.