9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Novice question - run as other
@ 2004-03-17 12:43 David Presotto
  2004-03-17 17:03 ` ron minnich
  0 siblings, 1 reply; 22+ messages in thread
From: David Presotto @ 2004-03-17 12:43 UTC (permalink / raw)
  To: dvd, 9fans

[-- Attachment #1: Type: text/plain, Size: 102 bytes --]

It worked, I believe you just didn't notice.  The echo process became
none and then immediately died.

[-- Attachment #2: Type: message/rfc822, Size: 2997 bytes --]

From: David Tolpin <dvd@davidashen.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Novice question - run as other
Date: Wed, 17 Mar 2004 12:54:46 +0400 (AMT)
Message-ID: <200403170854.i2H8sk2J083766@adat.davidashen.net>

> >> > a program from a shell script and change the user it runs as.
> >>
> >> The security model doesn't allow this. Perhaps by running it as a service
> >> on a cpu.  Check /sys/src/cmd/auth/cron.c and cap(3).  For somethings
> >> you can cpu over and change to a different uid:
> > 
> > The following works:
> ...
> > 	fd>=0 && (write(fd,"none",strlen("none"))!=-1)
>
> That's not what you asked.
>

? Is none not user?

cpu% grep none /adm/users
0:none:adm

cpu% none
cat /env/user
none

I want a program to run as a different user. From C, it means opening
'#c/user' and writing the user's name there. The security model is
a separate issue, the call either succeeds or fails, 
but it is a consequence of security limitations, and not of the API.

My question was how to do the same from rc. 

@{echo -n none > '#c/user' ; while() {sleep 1} }

succeeds but does not change the owner of the process. Why?

Dav id

^ permalink raw reply	[flat|nested] 22+ messages in thread
* [9fans] unsuscribe
@ 2009-07-27 19:36 root
  2009-07-27 20:15 ` Jason Catena
  0 siblings, 1 reply; 22+ messages in thread
From: root @ 2009-07-27 19:36 UTC (permalink / raw)
  To: 9fans

unsuscribe



^ permalink raw reply	[flat|nested] 22+ messages in thread
* [9fans] unsuscribe
@ 2021-08-31 19:09 Luciano Hillcoat
  0 siblings, 0 replies; 22+ messages in thread
From: Luciano Hillcoat @ 2021-08-31 19:09 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

unsuscribe

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T88ad5b26ba9eae73-M195e82c7b1f7a5615d5b84c7
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 693 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-08-31 19:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 12:43 [9fans] Novice question - run as other David Presotto
2004-03-17 17:03 ` ron minnich
2004-03-17 17:13   ` rog
2004-03-17 17:13     ` David Presotto
2004-03-17 18:00   ` David Tolpin
2004-03-17 18:12     ` ron minnich
2004-03-17 18:14     ` David Presotto
2004-03-17 19:34     ` rog
2004-03-17 19:43       ` [9fans] unsuscribe Jose timofonic
2004-03-17 19:52       ` [9fans] Novice question - run as other Russ Cox
2004-03-17 19:58         ` rog
2004-03-18  4:21     ` Martin C.Atkins
2009-07-27 19:36 [9fans] unsuscribe root
2009-07-27 20:15 ` Jason Catena
2009-07-27 20:32   ` David Leimbach
2009-07-27 23:40     ` J.R. Mauro
2009-07-28  3:03       ` Jason Catena
2009-07-28  5:26         ` andrey mirtchovski
2009-07-28  5:59           ` Federico G. Benavento
2009-07-28  9:22             ` Ethan Grammatikidis
2009-07-28  5:28       ` Skip Tavakkolian
2021-08-31 19:09 Luciano Hillcoat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).