diff options
author | vincentdarley <vincentdarley@noemail.net> | 2003-12-09 14:57:17 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2003-12-09 14:57:17 (GMT) |
commit | 76a0110bb9d76a00382c2f0807336f1cb4c947f1 (patch) | |
tree | 1db7931db750fecc4df0e506dcdd4d1ec45f3795 /win | |
parent | 9141e48d783cb4f9a070fe436d407e4eece0596b (diff) | |
download | tcl-76a0110bb9d76a00382c2f0807336f1cb4c947f1.zip tcl-76a0110bb9d76a00382c2f0807336f1cb4c947f1.tar.gz tcl-76a0110bb9d76a00382c2f0807336f1cb4c947f1.tar.bz2 |
NT file permissions fix and tests
FossilOrigin-Name: a6a450bd88146b6c8e48b26a2e8e35da40339fd7
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinFile.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index f787669..548fd65 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.55 2003/10/13 16:48:07 vincentdarley Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.56 2003/12/09 14:57:18 vincentdarley Exp $ */ //#define _WIN32_WINNT 0x0500 @@ -1413,22 +1413,24 @@ NativeAccess(nativePath, mode) goto accessError; } (*tclWinProcs->revertToSelfProc)(); + memset (&genMap, 0x00, sizeof (GENERIC_MAPPING)); + /* - * Fill GenericMask type according to access priveleges - * we are checking. + * Setup desiredAccess according to the access priveleges we + * are checking. */ genMap.GenericAll = 0; if (mode & R_OK) { - genMap.GenericRead = FILE_GENERIC_READ; + desiredAccess |= FILE_GENERIC_READ; } if (mode & W_OK) { - genMap.GenericWrite = FILE_GENERIC_WRITE; + desiredAccess |= FILE_GENERIC_WRITE; } if (mode & X_OK) { - genMap.GenericExecute = FILE_GENERIC_EXECUTE; + desiredAccess |= FILE_GENERIC_EXECUTE; } - (*tclWinProcs->mapGenericMaskProc)(&desiredAccess, &genMap); + /* * Perform access check using the token. */ |