dmitry Tue Feb 27 15:15:56 2007 UTC Modified files: (Branch: PHP_4_4) /php-src/sapi/cgi/libfcgi fcgiapp.c os_win32.c /php-src/sapi/cgi/libfcgi/include fcgios.h Log: reverted impersonation fix because of 4.4.6 release process http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/libfcgi/fcgiapp.c?r1=1.1.4.3.2.1&r2=1.1.4.3.2.2&diff_format=u Index: php-src/sapi/cgi/libfcgi/fcgiapp.c diff -u php-src/sapi/cgi/libfcgi/fcgiapp.c:1.1.4.3.2.1 php-src/sapi/cgi/libfcgi/fcgiapp.c:1.1.4.3.2.2 --- php-src/sapi/cgi/libfcgi/fcgiapp.c:1.1.4.3.2.1 Tue Feb 27 11:05:56 2007 +++ php-src/sapi/cgi/libfcgi/fcgiapp.c Tue Feb 27 15:15:56 2007 @@ -11,7 +11,7 @@ * */ #ifndef lint -static const char rcsid[] = "$Id: fcgiapp.c,v 1.1.4.3.2.1 2007/02/27 11:05:56 dmitry Exp $"; +static const char rcsid[] = "$Id: fcgiapp.c,v 1.1.4.3.2.2 2007/02/27 15:15:56 dmitry Exp $"; #endif /* not lint */ #include <assert.h> @@ -2061,10 +2061,6 @@ OS_IpcClose(request->ipcFd, ! request->detached); request->ipcFd = -1; request->detached = 0; -#ifdef _WIN32 - } else { - OS_StopImpersonation(); -#endif } } @@ -2229,10 +2225,6 @@ if (reqDataPtr->ipcFd < 0) { return (errno > 0) ? (0 - errno) : -9999; } -#ifdef _WIN32 - } else if (!OS_StartImpersonation()) { - FCGX_Free(reqDataPtr, 1); -#endif } /* * A connection is open. Read from the connection in order to http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/libfcgi/os_win32.c?r1=1.6.2.1.4.1&r2=1.6.2.1.4.2&diff_format=u Index: php-src/sapi/cgi/libfcgi/os_win32.c diff -u php-src/sapi/cgi/libfcgi/os_win32.c:1.6.2.1.4.1 php-src/sapi/cgi/libfcgi/os_win32.c:1.6.2.1.4.2 --- php-src/sapi/cgi/libfcgi/os_win32.c:1.6.2.1.4.1 Tue Feb 27 11:05:56 2007 +++ php-src/sapi/cgi/libfcgi/os_win32.c Tue Feb 27 15:15:56 2007 @@ -17,7 +17,7 @@ * significantly more enjoyable.) */ #ifndef lint -static const char rcsid[] = "$Id: os_win32.c,v 1.6.2.1.4.1 2007/02/27 11:05:56 dmitry Exp $"; +static const char rcsid[] = "$Id: os_win32.c,v 1.6.2.1.4.2 2007/02/27 15:15:56 dmitry Exp $"; #endif /* not lint */ #define WIN32_LEAN_AND_MEAN @@ -306,18 +306,6 @@ return 0; } -int OS_StartImpersonation(void) -{ - return (!bImpersonate || - ((hListen != INVALID_HANDLE_VALUE) && - !ImpersonateNamedPipeClient(hListen))); -} - -void OS_StopImpersonation(void) -{ - if (bImpersonate) RevertToSelf(); -} - /* *-------------------------------------------------------------- * @@ -608,7 +596,7 @@ if (stdioHandles[0] != INVALID_HANDLE_VALUE) { DisconnectNamedPipe(hListen); CancelIo(hListen); - OS_StopImpersonation(); + if (bImpersonate) RevertToSelf(); } WSACleanup(); @@ -1775,14 +1763,14 @@ // // impersonate the client // - if(bImpersonate && OS_StartImpersonation()) { + if(bImpersonate && !ImpersonateNamedPipeClient(hListen)) { DisconnectNamedPipe(hListen); } else { ipcFd = Win32NewDescriptor(FD_PIPE_SYNC, (int) hListen, -1); if (ipcFd == -1) { DisconnectNamedPipe(hListen); - OS_StopImpersonation(); + if (bImpersonate) RevertToSelf(); } } @@ -1987,7 +1975,7 @@ if (! DisconnectNamedPipe(fdTable[ipcFd].fid.fileHandle)) return -1; - OS_StopImpersonation(); + if (bImpersonate) RevertToSelf(); /* fall through */ case FD_SOCKET_SYNC: @@ -2061,3 +2049,4 @@ } return; } + http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/libfcgi/include/fcgios.h?r1=1.2.4.2.4.1&r2=1.2.4.2.4.2&diff_format=u Index: php-src/sapi/cgi/libfcgi/include/fcgios.h diff -u php-src/sapi/cgi/libfcgi/include/fcgios.h:1.2.4.2.4.1 php-src/sapi/cgi/libfcgi/include/fcgios.h:1.2.4.2.4.2 --- php-src/sapi/cgi/libfcgi/include/fcgios.h:1.2.4.2.4.1 Tue Feb 27 11:05:56 2007 +++ php-src/sapi/cgi/libfcgi/include/fcgios.h Tue Feb 27 15:15:56 2007 @@ -129,8 +129,6 @@ #ifdef _WIN32 DLLAPI int OS_SetImpersonate(void); -int OS_StartImpersonation(void); -void OS_StopImpersonation(void); #endif #if defined (__cplusplus) || defined (c_plusplus)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php