From: Pedro Alves <palves@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yao@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Return argv0-symlink.exp early if gdb can't load symlink
Date: Thu, 03 Apr 2014 12:12:00 -0000 [thread overview]
Message-ID: <533D500F.5050706@redhat.com> (raw)
In-Reply-To: <83ha6bbqc3.fsf@gnu.org>
On 04/02/2014 06:20 PM, Eli Zaretskii wrote:
>> Date: Wed, 02 Apr 2014 17:53:59 +0100
>> From: Pedro Alves <palves@redhat.com>
>> CC: Yao Qi <yao@codesourcery.com>, 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.
>
prev parent reply other threads:[~2014-04-03 12:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 8:46 Yao Qi
2014-04-02 8:59 ` Yao Qi
2014-04-02 10:47 ` Pedro Alves
2014-04-02 14:06 ` Yao Qi
2014-04-02 16:44 ` Pedro Alves
2014-04-02 16:47 ` Eli Zaretskii
2014-04-10 13:19 ` Yao Qi
2014-04-02 16:14 ` Eli Zaretskii
2014-04-02 16:54 ` Pedro Alves
2014-04-02 17:20 ` Eli Zaretskii
2014-04-03 12:12 ` Pedro Alves [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533D500F.5050706@redhat.com \
--to=palves@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox