summaryrefslogtreecommitdiffstats
path: root/win/tclWinTest.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-03-21 09:45:46 (GMT)
committervincentdarley <vincentdarley>2006-03-21 09:45:46 (GMT)
commit429d1d1c96179a7128fbaa793274ba3186c2fd6c (patch)
tree011519f4a34cd99dbb3503aace534e9ab163bb67 /win/tclWinTest.c
parent65445fd58393fa26379df62078124e7ca893bb75 (diff)
downloadtcl-429d1d1c96179a7128fbaa793274ba3186c2fd6c.zip
tcl-429d1d1c96179a7128fbaa793274ba3186c2fd6c.tar.gz
tcl-429d1d1c96179a7128fbaa793274ba3186c2fd6c.tar.bz2
fix to permissions setting
Diffstat (limited to 'win/tclWinTest.c')
-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,