X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 9 Nov 2012 10:08:59 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problem with setuid/execv on Cygwin/Windows 7 Message-ID: <20121109090859.GA31762@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1352451558 DOT 7009 DOT YahooMailNeo AT web133201 DOT mail DOT ir2 DOT yahoo DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1352451558.7009.YahooMailNeo@web133201.mail.ir2.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Nov 9 08:59, Laurent Cocault wrote: > Hi Cygwin community, > > I am currently facing a problem with the combination of setuid/execv on a Cygwin/Windows 7. > [...] > char* args[1]; > args[0] = NULL; > status = execv("/bin/bash", args); This is wrong. You should at least set args[0] since that what becomes argv[0] in the child process: char* args[2]; args[1] = "bash"; args[2] = NULL; status = execv("/bin/bash", args); Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple