This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Wed, 02 Apr 2014 17:53:59 +0100
- Subject: Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink
- Authentication-results: sourceware.org; auth=none
- References: <1396428218-31822-1-git-send-email-yao at codesourcery dot com> <533BD0D5 dot 4000408 at codesourcery dot com> <83txabbtdl dot fsf at gnu dot org>
On 04/02/2014 05:15 PM, Eli Zaretskii wrote:
>> Date: Wed, 2 Apr 2014 16:56:53 +0800
>> From: Yao Qi <yao@codesourcery.com>
>>
>> Looks native windows symlinks are created on some versions of windows
>> with some features turned on, so we can't skip this test by checking
>> triplet of host.
>> http://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks
>
> 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. Cygwin's docs of winsymlinks:nativestrict,
at least don't suggest any prompt. They say the symlink(2) system call
will fail immediately if Cygwin fails to create a native symlink for some reason.
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].
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.
--
Pedro Alves