summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley@noemail.net>2006-03-21 09:45:45 (GMT)
committervincentdarley <vincentdarley@noemail.net>2006-03-21 09:45:45 (GMT)
commit68ac1b5f9ac73333aad30755b17f9eed063b8e35 (patch)
tree011519f4a34cd99dbb3503aace534e9ab163bb67 /win
parent47f9133f93451d5faf966342a1ef1c1b0f88fb4f (diff)
downloadtcl-68ac1b5f9ac73333aad30755b17f9eed063b8e35.zip
tcl-68ac1b5f9ac73333aad30755b17f9eed063b8e35.tar.gz
tcl-68ac1b5f9ac73333aad30755b17f9eed063b8e35.tar.bz2
fix to permissions setting
FossilOrigin-Name: 7f5123f5a6002200085cae26b638a1a8afc65b7f
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,