Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Nov 2000 09:09:34 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: changing a running process's credentials
Message-ID:  <20001115090934.A830@fw.wintelcom.net>
In-Reply-To: <20001115190135.E309@ringworld.oblivion.bg>; from roam@orbitel.bg on Wed, Nov 15, 2000 at 07:01:35PM %2B0200
References:  <20001115161316.C309@ringworld.oblivion.bg> <20001115084722.I29448@fw.wintelcom.net> <20001115190135.E309@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
* Peter Pentchev <roam@orbitel.bg> [001115 09:02] wrote:
> > 
> > Well there's setuid for you.
> 
> Hmm..  I've also received two private mails so far, pointing me to setuid().
> The problem is, I want to force a new UID on *another* process without
> its knowledge.  setuid() only works on the process invoking it, so
> both the 'force' and the 'without its knowledge' part fall by the wayside :(
> 
> > What comes to mind is using the cmsg stuff that's normally used to
> > pass file descriptors and authentication information to pass the
> > ability to setuid over to another application over a unix domain
> > pipe.  The recieving process would read using recvmsg determine if
> > the passed uid is 'ok' (the kernel would hold it in the proc struct
> > in a temporary), if it 'wanted' this uid it could then call some
> > variation of setuid to switch to this recieved uid.
> 
> Yeah; problem is, as I said above, I do not want the receiving process
> to do anything special - just to wake up with a shiny new uid (this
> would probably surprise the hell out of most programs, but oh well :)

Unless this syscall was restricted to root, or a small subset of
uid's it would cause some severe security issues from my point
of view.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001115090934.A830>