Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-11-12 18:51:11 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-11-12 18:51:11 +0300
commit7a11fe607eab33a7f10f7927c3922305561798b7 (patch)
treeeadac72b0f1a686f9a4118ac3274be688c12ba29 /winsup/cygwin/syscalls.cc
parentbc612556a86599090fc390fe0a4b77c84d87704a (diff)
* syscalls.cc (chmod): Simplify conditional.
* sec_helper (cygsid::getfromstr): Reorganize to remove calls to strcpy and strtok_r. (cygsid::getfromgr): Change type to __uid32_t instead of int. Keep only the allow_ntsec branch. Never call LookupAccountSid which calls PDCs, simply return -1 in case of failure. Use cygsid == instead of calling EqualSid and remove test for NULL psid. * security.h: Declare cygsid::getfromgr as __uid32_t.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index bfc45e722..1c2a18ba9 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -964,12 +964,9 @@ chmod (const char *path, mode_t mode)
if (!SetFileAttributes (win32_path, win32_path))
__seterrno ();
- else
- {
- /* Correct NTFS security attributes have higher priority */
- if (res == 0 || !allow_ntsec)
- res = 0;
- }
+ else if (!allow_ntsec)
+ /* Correct NTFS security attributes have higher priority */
+ res = 0;
}
done: