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:04:53 +0200 [thread overview]
Message-ID: <20031015190453.GA24248@suse.de> (raw)
In-Reply-To: <1066243290.7399.120.camel@moss-spartans.epoch.ncsc.mil>
On Wed, Oct 15, Stephen Smalley wrote:
> On Wed, 2003-10-15 at 14:31, Thorsten Kukuk wrote:
> > Ok, since I copy always all attributes if I modify /etc/passwd and
> > /etc/shadow (to make sure to preserve ACLs and security attributes),
> > I don't need it.
>
> The problem with simply preserving attributes via setxattr is that you
> cannot create the new file immediately with the desired attributes, so
> there is a window where the new file exists with the default attribute
> value, typically inherited from the parent directory. Note that this is
> particularly a concern for /etc/passwd and /etc/shadow, since they live
> in the same parent directory but have differing protection requirements.
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.
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.
Thorsten
--
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:04 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 [this message]
2003-10-15 19:16 ` Stephen Smalley
2003-10-15 19:30 ` Thorsten Kukuk
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=20031015190453.GA24248@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.