Drop max_sys_priv wincap
Convert sys_privs to const struct with TOKEN_PRIVILEGES layout. Drop function get_system_priv_list. Just use pointer to sys_privs. Dropping max_sys_priv from wincaps requires to make sure that the bitfield is 8 byte aligned on x86_64, otherwise gcc (5.3 only?) apparently breaks access to the bitfield (off by 4 bytes). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -83,21 +83,8 @@ set_winsymlinks (const char *buf)
|
||||
allow_winsymlinks = WSYM_lnk;
|
||||
/* Make sure to try native symlinks only on systems supporting them. */
|
||||
else if (ascii_strncasematch (buf, "native", 6))
|
||||
{
|
||||
if (wincap.max_sys_priv () < SE_CREATE_SYMBOLIC_LINK_PRIVILEGE)
|
||||
{
|
||||
if (!user_shared->warned_nonativesyms)
|
||||
{
|
||||
small_printf ("\"winsymlinks:%s\" option detected in CYGWIN environment variable.\n"
|
||||
"Native symlinks are not supported on Windows versions prior to\n"
|
||||
"Windows Vista/Server 2008. This option will be ignored.\n", buf);
|
||||
user_shared->warned_nonativesyms = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
allow_winsymlinks = ascii_strcasematch (buf + 6, "strict")
|
||||
? WSYM_nativestrict : WSYM_native;
|
||||
}
|
||||
allow_winsymlinks = ascii_strcasematch (buf + 6, "strict")
|
||||
? WSYM_nativestrict : WSYM_native;
|
||||
}
|
||||
|
||||
/* The structure below is used to set up an array which is used to
|
||||
|
Reference in New Issue
Block a user