diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-12-15 18:34:40 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-06-24 22:00:04 +0300 |
commit | 67fd2101ab764dff2a9ce919a59d09108ae09281 (patch) | |
tree | f80310de6d87d15ff9329d213514173def013533 /winsup/cygwin/path.cc | |
parent | b15d129559cad52b13cb6c54fbe19a78031b7411 (diff) |
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>
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 10 |
1 files changed, 1 insertions, 9 deletions
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)) |