From 67fd2101ab764dff2a9ce919a59d09108ae09281 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 15 Dec 2015 16:34:40 +0100 Subject: 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 --- winsup/cygwin/path.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index eb4fc08ec..4ca8e0872 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -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)) -- cgit v1.2.3