From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2829 invoked by alias); 3 Apr 2014 12:12:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2816 invoked by uid 89); 3 Apr 2014 12:12:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Apr 2014 12:12:08 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s33CC2mi005523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Apr 2014 08:12:03 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s33CBxSp028671; Thu, 3 Apr 2014 08:12:00 -0400 Message-ID: <533D500F.5050706@redhat.com> Date: Thu, 03 Apr 2014 12:12:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eli Zaretskii CC: yao@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink References: <1396428218-31822-1-git-send-email-yao@codesourcery.com> <533BD0D5.4000408@codesourcery.com> <83txabbtdl.fsf@gnu.org> <533C40A7.1040502@redhat.com> <83ha6bbqc3.fsf@gnu.org> In-Reply-To: <83ha6bbqc3.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-04/txt/msg00048.txt.bz2 On 04/02/2014 06:20 PM, Eli Zaretskii wrote: >> Date: Wed, 02 Apr 2014 17:53:59 +0100 >> From: Pedro Alves >> CC: Yao Qi , gdb-patches@sourceware.org >> >>> Creating native symlinks generally require elevation on Windows. So >>> unless Cygwin somehow managed to work around this (I didn't try, so I >>> don't know), you will get UAC prompts when you try creating symlinks. >>> >>> Therefore, I don't recommend to go there. >>> >> >> I suspect it's the specific tool (mklink, perhaps?) that tries to create >> symlinks that somehow runs a UAC prompt. > > mklink just invokes the CreateSymbolicLink API. And if you need more > data points, I see the same behavior in Emacs, when I invoke the > make-symbolic-link function on Windows. Okay. If that happens in console subsystem apps too, it should still be possible to see if one has SeCreateSymbolicLinkPrivilege permissions before calling CreateSymbolicLink somehow. I'd guess Cygwin might be already doing that, but I really don't know. Thanks, -- Pedro Alves > >> On the permissions, according to: >> >> http://cygwin.com/ml/cygwin/2011-04/msg00088.html >> >>> They don't require administrator privilege per se: just SeCreateSymbolicLinkPrivilege, >>> which can be granted to normal user accounts via local security policy. The easiest way to >>> grant SeCreateSymbolicLinkPrivilege is to start gpedit.msc, go down to >>> "Windows Settings"->"Security Settings"->"Local Policies"->"User Rights Assignment", >>> then find "Create symbolic links" and add whatever users and groups you want[1]. > > That is correct, and matches my experience, but the problem is that > most Windows users are local admins on their machines, in which case > adding SeCreateSymbolicLinkPrivilege doesn't work, because members of > the Administrators group are treated specially when privileges are > concerned. Thus the "normal user account" in the above is really a > crucial part. > >> Assuming not having the permissions doesn't cause prompts resulting in >> testsuite run hangs, I think it's OK. If the user doesn't have the >> permissions, the symlink fails to be created and the tests require symlinks >> end up UNRESOLVED or UNTESTED. > > If you are OK with that, so am I. >