All of lore.kernel.org
 help / color / mirror / Atom feed
* does mv need a --context=CTX (-Z) option, too?
@ 2006-08-10 10:13 Jim Meyering
  2006-08-10 13:51 ` kmacmillan
  2006-08-10 13:54 ` Stephen Smalley
  0 siblings, 2 replies; 16+ messages in thread
From: Jim Meyering @ 2006-08-10 10:13 UTC (permalink / raw)
  To: selinux

It might make sense to add a --context=CTX (-Z) option to mv.  Currently,
cp, install, mkdir, mknod, mkfifo all have that option, but not mv.
Most of the time, mv would have no need, since it simply calls rename.
But when that fails, it reverts to using the very same copying code
(copy.c) that cp uses.  It is trivial to add this option to mv, with the
understanding that it'd take effect solely for e.g., cross-device moves.
I.e., if you want to simulate a cross device move, you'd have to use
cp -pr and rm -rf, so if it makes sense for cp to have the --context=CTX
(-Z) option, then it follows that mv must accept it as well.

This brings up another minor inconsistency: should the other
named-file-creation programs (dd, ln, link, touch) in coreutils also
accept the --context=CTX (-Z) option?

With that only partly rhetorical question, you should see why I'd like
an selinux/kernel hook that'd let me set the default fscreate context
for the upcoming execve.  Then I could simply add one option to runcon
and forget about all of these "-Z CTX" options.  IMHO, requiring all of
these tools to add an option like "-Z CTX" to perform the same simple
function is almost prohibitively onerous.

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

end of thread, other threads:[~2006-08-10 22:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-10 10:13 does mv need a --context=CTX (-Z) option, too? Jim Meyering
2006-08-10 13:51 ` kmacmillan
2006-08-10 15:15   ` Jim Meyering
2006-08-10 16:00     ` James Antill
2006-08-10 16:01     ` Karl MacMillan
2006-08-10 17:39       ` Jim Meyering
2006-08-10 13:54 ` Stephen Smalley
2006-08-10 14:27   ` Jim Meyering
2006-08-10 14:41     ` Daniel J Walsh
2006-08-10 15:47       ` Casey Schaufler
2006-08-10 15:53         ` Daniel J Walsh
2006-08-10 16:01           ` Casey Schaufler
2006-08-10 16:03       ` Karl MacMillan
2006-08-10 17:35       ` Jim Meyering
2006-08-10 22:56         ` Russell Coker
2006-08-10 16:18   ` James Antill

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.