# HG changeset patch # User penk # Date 1103324585 -3600 # Node ID c5b62518d233d23a1201dfeee5cc4bd907cba84a # Parent 66e7d5922ae970506032ed862a71820064641944 changed security attributes - does not make a difference diff -r 66e7d5922ae9 -r c5b62518d233 Win32OperatingSystem.st --- a/Win32OperatingSystem.st Thu Dec 16 12:21:17 2004 +0100 +++ b/Win32OperatingSystem.st Sat Dec 18 00:03:05 2004 +0100 @@ -3001,6 +3001,7 @@ STARTUPINFO lpsiStartInfo; PROCESS_INFORMATION lppiProcInfo; SECURITY_ATTRIBUTES sa; + SECURITY_DESCRIPTOR sd; if (__isString(dirName)) { dir = __stringVal(dirName); @@ -3058,10 +3059,16 @@ /* * create descriptors as req'd */ + memset(&sa, 0, sizeof (sa)); sa.nLength = sizeof( sa ); sa.lpSecurityDescriptor = NULL; sa.bInheritHandle = TRUE; - + if (__isWinNT) { + InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); + SetSecurityDescriptorDacl(&sd, -1, 0, 0); + + sa.lpSecurityDescriptor = &sd; + } memset(&lppiProcInfo, 0, sizeof (lppiProcInfo)); memset(&lpsiStartInfo, 0, sizeof (lpsiStartInfo)); @@ -3149,7 +3156,7 @@ #endif if (CreateProcess( cmdPath, cmdLine, - &sa, &sa, /* sec-attribs */ + &sa, NULL /* &sa */, /* sec-attribs */ sa.bInheritHandle, /* inherit handles */ fdwCreate, NULL, /* env */ @@ -5111,13 +5118,14 @@ HANDLE pipeRead = (HANDLE)0; HANDLE pipeWrite = (HANDLE)0; - SECURITY_ATTRIBUTES process; - - process.nLength = sizeof( process ); - process.lpSecurityDescriptor = NULL; - process.bInheritHandle = TRUE; - - if( ! CreatePipe( &pipeRead, &pipeWrite, &process, 0 ) ) { + SECURITY_ATTRIBUTES sa; + + ZeroMemory(&sa, sizeof(SECURITY_ATTRIBUTES)); + sa.nLength = sizeof(SECURITY_ATTRIBUTES); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; + + if( ! CreatePipe( &pipeRead, &pipeWrite, &sa, 0 ) ) { @global(LastErrorNumber) = __MKSMALLINT( __WIN32_ERR(GetLastError()) ); RETURN ( nil ); } @@ -9207,7 +9215,7 @@ ! version - ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.169 2004-12-15 10:27:54 penk Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.170 2004-12-17 23:03:05 penk Exp $' ! ! !Win32OperatingSystem::Win32FILEHandle methodsFor:'release'! @@ -9234,7 +9242,7 @@ ! version - ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.169 2004-12-15 10:27:54 penk Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.170 2004-12-17 23:03:05 penk Exp $' ! ! !Win32OperatingSystem::Win32Handle methodsFor:'io'! @@ -9619,7 +9627,7 @@ !Win32OperatingSystem class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.169 2004-12-15 10:27:54 penk Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.170 2004-12-17 23:03:05 penk Exp $' ! ! Win32OperatingSystem initialize!