summaryrefslogtreecommitdiffstats
path: root/win/tclWinTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinTest.c')
-rw-r--r--win/tclWinTest.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index f6eb2b1..0f65268 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -422,7 +422,7 @@ TestplatformChmod(
const char *nativePath,
int pmode)
{
- /*
+ /*
* Note FILE_DELETE_CHILD missing from dirWriteMask because we do
* not want overriding of child's delete setting when testing
*/
@@ -430,7 +430,7 @@ TestplatformChmod(
FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA |
FILE_ADD_FILE | FILE_ADD_SUBDIRECTORY | STANDARD_RIGHTS_WRITE | DELETE |
SYNCHRONIZE;
- static const DWORD dirReadMask =
+ static const DWORD dirReadMask =
FILE_READ_ATTRIBUTES | FILE_READ_EA | FILE_LIST_DIRECTORY |
STANDARD_RIGHTS_READ | SYNCHRONIZE;
/* Note - default user privileges allow ignoring TRAVERSE setting */
@@ -440,7 +440,7 @@ TestplatformChmod(
static const DWORD fileWriteMask =
FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_WRITE_DATA |
FILE_APPEND_DATA | STANDARD_RIGHTS_WRITE | DELETE | SYNCHRONIZE;
- static const DWORD fileReadMask =
+ static const DWORD fileReadMask =
FILE_READ_ATTRIBUTES | FILE_READ_EA | FILE_READ_DATA |
STANDARD_RIGHTS_READ | SYNCHRONIZE;
static const DWORD fileExecuteMask =
@@ -449,7 +449,6 @@ TestplatformChmod(
DWORD attr, newAclSize;
PACL newAcl = NULL;
int res = 0;
- SID_IDENTIFIER_AUTHORITY worldAuthority = SECURITY_WORLD_SID_AUTHORITY;
HANDLE hToken = NULL;
int i;
@@ -475,13 +474,13 @@ TestplatformChmod(
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) {
goto done;
}
-
+
/* Get process SID */
if (!GetTokenInformation(hToken, TokenUser, NULL, 0, &dw) &&
GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
goto done;
}
- pTokenUser = ckalloc(dw);
+ pTokenUser = (TOKEN_USER *)ckalloc(dw);
if (!GetTokenInformation(hToken, TokenUser, pTokenUser, dw, &dw)) {
goto done;
}
@@ -493,7 +492,7 @@ TestplatformChmod(
ckfree(aceEntry[nSids].pSid); /* Since we have not ++'ed nSids */
goto done;
}
- /*
+ /*
* Always include DACL modify rights so we don't get locked out
*/
aceEntry[nSids].mask = READ_CONTROL | WRITE_DAC | WRITE_OWNER | SYNCHRONIZE |
@@ -523,7 +522,7 @@ TestplatformChmod(
GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
goto done;
}
- pTokenGroup = ckalloc(dw);
+ pTokenGroup = (TOKEN_PRIMARY_GROUP *)ckalloc(dw);
if (!GetTokenInformation(hToken, TokenPrimaryGroup, pTokenGroup, dw, &dw)) {
ckfree(pTokenGroup);
goto done;
@@ -590,7 +589,7 @@ TestplatformChmod(
newAclSize +=
offsetof(ACCESS_ALLOWED_ACE, SidStart) + aceEntry[i].sidLen;
}
- newAcl = ckalloc(newAclSize);
+ newAcl = (PACL)ckalloc(newAclSize);
if (!InitializeAcl(newAcl, newAclSize, ACL_REVISION)) {
goto done;
}