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:
@ -1759,15 +1759,7 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice)
|
||||
wsym_type = WSYM_lnk;
|
||||
/* AFS only supports native symlinks. */
|
||||
else if (win32_newpath.fs_is_afs ())
|
||||
{
|
||||
/* Bail out if OS doesn't support native symlinks. */
|
||||
if (wincap.max_sys_priv () < SE_CREATE_SYMBOLIC_LINK_PRIVILEGE)
|
||||
{
|
||||
set_errno (EPERM);
|
||||
__leave;
|
||||
}
|
||||
wsym_type = WSYM_nativestrict;
|
||||
}
|
||||
wsym_type = WSYM_nativestrict;
|
||||
/* Don't try native symlinks on FSes not supporting reparse points. */
|
||||
else if ((wsym_type == WSYM_native || wsym_type == WSYM_nativestrict)
|
||||
&& !(win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS))
|
||||
|
Reference in New Issue
Block a user