This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: lnn, a native symlink wrapper script (Was: fstab not automounting...)
- From: Warren Young <warren at etr-usa dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 18 Oct 2013 11:55:59 -0600
- Subject: Re: lnn, a native symlink wrapper script (Was: fstab not automounting...)
- Authentication-results: sourceware.org; auth=none
- References: <21087 dot 31348 dot 870054 dot 516829 at consult dot pretender> <20131017093846 dot GA26304 at calimero dot vinschen dot de> <21087 dot 64099 dot 660195 dot 262020 at consult dot pretender> <20131017151929 dot GR18358 at calimero dot vinschen dot de> <21088 dot 45642 dot 198102 dot 464479 at consult dot pretender> <20131018074744 dot GD23477 at calimero dot vinschen dot de>
On 10/18/2013 01:47, Corinna Vinschen wrote:
$ CYGWIN=winsymlinks:native ln -s /path/to/your/fstab /etc/fstab
I've wrapped that in a shell script called lnn ("link native"):
#!/bin/sh
CYGWIN=winsymlinks:native ln "$@"
Perhaps Eric Blake will add this to coreutils so we can use the shortcut
in replies to list questions.
I tried to add a test for the SeCreateSymbolicLinkPrivilege capability
before attempting to create the link, but this command doesn't DTRT:
`cygpath -S`/whoami /priv
It doesn't output a line for SeCreateSymbolicLinkPrivilege at all.
The native whoami.exe has an /all flag that *does* show this privilege,
but you only get a line for the symlink priv when you run it as
Administrator! How very medieval: you can't ask Windows what privileges
you have unless you have lots of privileges already.
Complicating the matter is that whoami claims this privilege is *unset*
on this machine, though that may be because I asked the question as
Administrator. Maybe the privilege doesn't need to be set as admin.
Another oddity is that the /all flag complains when run as non-admin:
ERROR: Unable to get user claims information.
...but only when run from a Bash shell. It runs without complaint --
though it still remains silent about the symlink priv -- when run from
cmd.exe or PowerShell.
--
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