summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-03-21 09:46:00 (GMT)
committervincentdarley <vincentdarley>2006-03-21 09:46:00 (GMT)
commitd13045d5f4f8b28861b4c1af3c4ceaa21331c173 (patch)
tree2ea7e54209dfc3bd2a5b8b93fc2a1bba8bbb6d10 /win
parentad8d1bbaf10f6e4dda828b24c98f9a3c269985bd (diff)
downloadtcl-d13045d5f4f8b28861b4c1af3c4ceaa21331c173.zip
tcl-d13045d5f4f8b28861b4c1af3c4ceaa21331c173.tar.gz
tcl-d13045d5f4f8b28861b4c1af3c4ceaa21331c173.tar.bz2
fix to permissions setting
Diffstat (limited to 'win')
-rw-r--r--win/tclWinTest.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index d77d1e6..6925866 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinTest.c,v 1.15 2006/03/19 22:44:17 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinTest.c,v 1.16 2006/03/21 09:46:00 vincentdarley Exp $
*/
#define USE_COMPAT_CONST
@@ -512,7 +512,6 @@ TestplatformChmod(CONST char *nativePath, int pmode)
static getSidLengthRequiredDef getSidLengthRequiredProc;
static initializeSidDef initializeSidProc;
static getSidSubAuthorityDef getSidSubAuthorityProc;
- static const char everyoneBuf[] = "EVERYONE";
static const SECURITY_INFORMATION infoBits = OWNER_SECURITY_INFORMATION
| GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION;
static const DWORD readOnlyMask = FILE_DELETE_CHILD | FILE_ADD_FILE
@@ -537,7 +536,6 @@ TestplatformChmod(CONST char *nativePath, int pmode)
SID *userSid = 0;
DWORD userDomainLen = 32;
TCHAR *userDomain = 0;
- SID_NAME_USE userSidUse;
DWORD attr;
@@ -665,24 +663,10 @@ TestplatformChmod(CONST char *nativePath, int pmode)
}
}
- /* Get the "Everyone" SID */
+ /* Get the World SID */
userSid = (SID*) ckalloc(getSidLengthRequiredProc(1));
initializeSidProc( userSid, &userSidAuthority, 1);
*(getSidSubAuthorityProc( userSid, 0)) = SECURITY_WORLD_RID;
- userDomain = (TCHAR *) ckalloc(userDomainLen);
- if (!lookupAccountNameProc(NULL, everyoneBuf, userSid, &userSidLen,
- userDomain, &userDomainLen, &userSidUse)) {
- if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
- ckfree((char *)userSid);
- userSid = (SID *) ckalloc(userSidLen);
- ckfree(userDomain);
- userDomain = (TCHAR *) ckalloc(userDomainLen);
- if (!lookupAccountNameProc(NULL, everyoneBuf, userSid,
- &userSidLen, userDomain, &userDomainLen, &userSidUse))
- goto done;
- } else
- goto done;
- }
/* If curAclPresent == false then curAcl and curAclDefaulted not valid */
if (!getSecurityDescriptorDaclProc(secDesc, &curAclPresent,