From owner-freebsd-hackers Wed Nov 15 9: 9:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 96C0037B4E5 for ; Wed, 15 Nov 2000 09:09:35 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eAFH9Ye00983 for freebsd-hackers@FreeBSD.ORG; Wed, 15 Nov 2000 09:09:34 -0800 (PST) Date: Wed, 15 Nov 2000 09:09:34 -0800 From: Alfred Perlstein To: freebsd-hackers@FreeBSD.ORG Subject: Re: changing a running process's credentials Message-ID: <20001115090934.A830@fw.wintelcom.net> References: <20001115161316.C309@ringworld.oblivion.bg> <20001115084722.I29448@fw.wintelcom.net> <20001115190135.E309@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001115190135.E309@ringworld.oblivion.bg>; from roam@orbitel.bg on Wed, Nov 15, 2000 at 07:01:35PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Peter Pentchev [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