summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-03-21 09:45:46 (GMT)
committervincentdarley <vincentdarley>2006-03-21 09:45:46 (GMT)
commit199a049b28fd752673ab45cde3740ec09680f34c (patch)
tree011519f4a34cd99dbb3503aace534e9ab163bb67 /win
parent00b1a8979ad1c8e2583413ee6e4819a2c3832694 (diff)
downloadtcl-199a049b28fd752673ab45cde3740ec09680f34c.zip
tcl-199a049b28fd752673ab45cde3740ec09680f34c.tar.gz
tcl-199a049b28fd752673ab45cde3740ec09680f34c.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 d9e5a8a..c220aa6 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.8.2.3 2006/03/19 22:34:56 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinTest.c,v 1.8.2.4 2006/03/21 09:45:46 vincentdarley Exp $
*/
#define USE_COMPAT_CONST
@@ -529,7 +529,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
@@ -554,7 +553,6 @@ TestplatformChmod(CONST char *nativePath, int pmode)
SID *userSid = 0;
DWORD userDomainLen = 32;
TCHAR *userDomain = 0;
- SID_NAME_USE userSidUse;
DWORD attr;
@@ -682,24 +680,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,