From: Thorsten Kukuk <kukuk@suse.de>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: SELinux Mailinglist <selinux@tycho.nsa.gov>
Subject: Re: Question about chsh/chfn/passwd patches
Date: Wed, 15 Oct 2003 21:30:05 +0200 [thread overview]
Message-ID: <20031015193005.GA18974@suse.de> (raw)
In-Reply-To: <1066245388.7399.158.camel@moss-spartans.epoch.ncsc.mil>
On Wed, Oct 15, Stephen Smalley wrote:
> On Wed, 2003-10-15 at 15:04, Thorsten Kukuk wrote:
> > Ok, I think it is trivial to do a getfscreatecon, call setfscreatecon
> > with the permissions of the passwd file and restore the original
> > fscreate values afterwards.
>
> Actually, this would be getfilecon() and then setfscreatecon().
No, I mean at first getfscreatecon. You cannot assume that a program
calling a library modifying /etc/passwd does not create any other files.
And in the later case it could be that we don't wish that this files
will be created with the passwd context. Only think about useradd and
creating home directories.
So you have to backup the original values at first and restore them
afterwards.
> > But it would be interesting to know how somebody could be able to do
> > something forbidden with the following:
> >
> > Create temporary file with mkstemp, mode 0600, owner root:root.
> > Copy EA attributes.
>
> You're assuming that root is god. Not so with a mandatory access
> control scheme like SELinux.
No, I don't assume that root is god.
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Deutschherrnstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
--
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.
next prev parent reply other threads:[~2003-10-15 19:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-15 3:44 Question about chsh/chfn/passwd patches Thorsten Kukuk
2003-10-15 18:03 ` Stephen Smalley
2003-10-15 18:31 ` Thorsten Kukuk
2003-10-15 18:41 ` Stephen Smalley
2003-10-15 19:04 ` Thorsten Kukuk
2003-10-15 19:16 ` Stephen Smalley
2003-10-15 19:30 ` Thorsten Kukuk [this message]
2003-10-15 19:35 ` Stephen Smalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031015193005.GA18974@suse.de \
--to=kukuk@suse.de \
--cc=sds@epoch.ncsc.mil \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.