All of lore.kernel.org
 help / color / mirror / Atom feed
* justifying --context=CTX (-Z) for upstream coreutils, like mkdir
@ 2006-08-11 13:58 Jim Meyering
  2006-08-11 14:58 ` Karl MacMillan
  2006-08-16 17:05 ` James Antill
  0 siblings, 2 replies; 32+ messages in thread
From: Jim Meyering @ 2006-08-11 13:58 UTC (permalink / raw)
  To: selinux; +Cc: Russell Coker

Hello again,

With clear agreement that neither cp nor mv needs the --context=CTX (-Z)
option, I am nearly convinced that the this option does not belong in any
other program in upstream coreutils.  [of course, I expect it to remain
in RHEL and probably in Fedora for some time]  Upstream coreutils will
display contexts (stat, ls, uname), and preserve them (cp, mv, install?),
and add chcon+runcon, but that's all.

For a little context on why, ...
I'm also considering the xattr patch that's been floating around for
years.  Currently it's part of SuSE's coreutils patch set.  It ensures
that mv and cp -p preserve any (selected) XATTR attributes.  There is
no option to let install(1) apply XATTR attributes.  Nor mkdir, mkfifo,
mknod.  Similarly for the ACL support that's widely available, there is
no option to let those programs apply a specified ACL.  Why should
SELinux security contexts be treated differently?

I do understand the race condition argument, but any sysadmin who is
silly enough to create new files in such a way that those races matter,
deserves whatever s/he gets.  If a destination file really must be in a
vulnerable place, it's not so hard to create it first in a safe place,
apply any necessary context via chcon, and then `install' them via rename.

Am I missing some justification for why e.g., mkdir should have the
option?  Yes, it does accept --mode=M (-m), but is that enough to
justify the SELinux---ACL/XATTR dichotomy?  Not to me.  But I'm
willing to be educated :)

BTW, what makes install so special that it needs to call matchpathcon?
Can it accomplish the same goal via "chcon ...;
install --preserve-context ..."?

Thanks for your feedback,

Jim

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

end of thread, other threads:[~2006-08-29 19:11 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-11 13:58 justifying --context=CTX (-Z) for upstream coreutils, like mkdir Jim Meyering
2006-08-11 14:58 ` Karl MacMillan
2006-08-11 15:23   ` Stephen Smalley
2006-08-11 15:46   ` Casey Schaufler
2006-08-11 16:45   ` Jim Meyering
2006-08-12 17:43     ` Daniel J Walsh
2006-08-18 10:37       ` install vs. matchpathcon(8) [Re: justifying --context=CTX (-Z) Jim Meyering
2006-08-28 19:14         ` Stephen Smalley
2006-08-14 14:56     ` justifying --context=CTX (-Z) for upstream coreutils, like mkdir Karl MacMillan
2006-08-14 15:53       ` Jim Meyering
2006-08-14 16:02         ` Karl MacMillan
2006-08-14 17:18           ` Jim Meyering
     [not found]             ` <1155581090.28766.217.camel@moss-spartans.epoch.ncsc.mil>
2006-08-21 15:58               ` Jim Meyering
2006-08-21 17:40                 ` Christopher J. PeBenito
2006-08-21 21:31                   ` Jim Meyering
2006-08-22 13:12                     ` Joshua Brindle
2006-08-22 16:03                       ` Jim Meyering
2006-08-22 16:23                         ` Joshua Brindle
2006-08-22 17:16                           ` Jim Meyering
2006-08-23  0:27                             ` James Antill
2006-08-23 10:43                               ` Jim Meyering
2006-08-28 12:23                                 ` Joshua Brindle
2006-08-28 20:24                                   ` Stephen Smalley
2006-08-29 19:11                                     ` Stephen Smalley
2006-08-28 19:05                                 ` Stephen Smalley
2006-08-23 11:52                               ` Joshua Brindle
2006-08-21 17:58                 ` Karl MacMillan
2006-08-21 21:15                   ` Jim Meyering
2006-08-16 17:05 ` James Antill
2006-08-16 21:18   ` Jim Meyering
2006-08-28 20:00     ` Stephen Smalley
2006-08-28 20:10       ` 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.