Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 7 Jun 2003 11:52:08 +0200 From: Corinna Vinschen To: "'cygwin AT cygwin DOT com'" Subject: Re: 1.3.22: child real uid gets parent's effective uid Message-ID: <20030607095208.GC18350@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: "'cygwin AT cygwin DOT com'" References: <4C37CF2D8DF07E4CA6357BAD5EB9A5D705B05A27 AT oh0012itsa1 DOT cb DOT lucent DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C37CF2D8DF07E4CA6357BAD5EB9A5D705B05A27@oh0012itsa1.cb.lucent.com> User-Agent: Mutt/1.4.1i On Fri, Jun 06, 2003 at 04:20:43PM -0400, Snively, John P (John) wrote: > > I changed the effective uid of my app's process using seteuid, and printed > out the real and effective uid's obtained via getuid and geteuid. No > surprises, until I tested running a child process via system() and printing > ITS real and effective uid's. The effective AND real uid of the child are > set to the effective uid of the parent -- ouch: > > before changing euid: > child: euid: 25313 ruid: 25313 > parent: euid: 25313 ruid: 25313 > > setting euid to 500 > child: euid: 500 ruid: 500 > parent: euid: 500 ruid: 25313 > > Any way around this? Not easily. The difference between real and effective uid is just plain fake. Windows doesn't support that difference, there's just one uid (better: owner SID) attached to a process. So each new process begins its life with euid == ruid. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/