All of lore.kernel.org
 help / color / mirror / Atom feed
* re: id -Z subsumed by secon?
@ 2006-08-08 18:58 Daniel J Walsh
  2006-08-09 13:19 ` Janak Desai
  2006-08-09 13:55 ` Karl MacMillan
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel J Walsh @ 2006-08-08 18:58 UTC (permalink / raw)
  To: Jim Meyering, SE Linux

>
>
> James Antill <james.antill@redhat.com> wrote:
>   
>> >  No, what Steven was saying is that the label for execcon will be reset
>> > on exec (after doing it's thing). To see this visually use "secon
>> > --self-exec" instead of id.
>> >
>> > % secon
>> > user: user_u
>>     
> ...
>
> Thanks for the example.
>
> By the way, doesn't secon make id's -Z option unnecessary?
> I'm planning not to include the 'id -Z' patches upstream,
> Instead, runcon (with neither CONTEXT nor COMMAND) will
> print the current security context -- to be analogous to how nice(1)
> works if you don't give it a command.
>
> Any objection?
>
>
>   
Yes I would like to maintain the idea of "-Z" being the way to view 
contexts.  This makes it easy for
a user to figure out how to see what context is being used.  ls -Z, ps 
-Z, netstat -Z ...


--
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] 6+ messages in thread
* setexeccon vs. setfscreatecon
@ 2006-08-08 13:16 Jim Meyering
  2006-08-08 15:21 ` Stephen Smalley
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Meyering @ 2006-08-08 13:16 UTC (permalink / raw)
  To: selinux

I see that setexeccon sets the context to be used for next execve call.
And then there's setfscreatecon.  I want something similar that sets
the fscreate context for the next execve call.  Does such a function exist?
Is there some other way to do what I want?

In case you're wondering, here's my motivation: I'm merging some
coreutils selinux changes into upstream and noticed that they would break
thread-safety in coreutils' copying engine, src/copy.c -- because they
introduce calls to setfscreatecon.  From reading the man page for that
function, I gather that the fscreate-context is a per-process attribute.
As such (like umask and cwd), changing it affects all threads, and its
use should be avoided in library-esque code.

What I would like to do is merge the context-printing and
context-preserving parts of that patch, but not the context-setting
parts (--context=CTX in cp, mkdir, mkfifo, mknod, install).  Instead,
I'm trying to add an option to runcon that would let me also set the
fscreate context for the process it runs.  Then, all of the individual
context-setting options would be unnecessary.

Does this sound reasonable?  Feasible?

Thanks,

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

end of thread, other threads:[~2006-08-09 14:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08 18:58 id -Z subsumed by secon? Daniel J Walsh
2006-08-09 13:19 ` Janak Desai
2006-08-09 14:03   ` stat's -Z/--context option is gone [Re: " Jim Meyering
2006-08-09 13:55 ` Karl MacMillan
2006-08-09 14:05   ` Jim Meyering
  -- strict thread matches above, loose matches on Subject: below --
2006-08-08 13:16 setexeccon vs. setfscreatecon Jim Meyering
2006-08-08 15:21 ` Stephen Smalley
2006-08-08 15:57   ` Jim Meyering
2006-08-08 16:20     ` James Antill
     [not found]       ` <878xlzcflx.fsf_-_@rho.meyering.net>
2006-08-08 17:32         ` id -Z subsumed by secon? 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.