*** pgsql/src/bin/initdb/initdb.c 2009/06/11 14:49:07 1.172 --- pgsql/src/bin/initdb/initdb.c 2009/11/14 15:39:45 1.172.2.1 *************** *** 42,48 **** * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * ! * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.171 2009/06/03 16:17:49 tgl Exp $ * *------------------------------------------------------------------------- */ --- 42,48 ---- * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * ! * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.172 2009/06/11 14:49:07 momjian Exp $ * *------------------------------------------------------------------------- */ *************** CreateRestrictedProcess(char *cmd, PROCE *** 2393,2398 **** --- 2393,2402 ---- return 0; } + #ifndef __CYGWIN__ + AddUserToTokenDacl(restrictedToken); + #endif + if (!CreateProcessAsUser(restrictedToken, NULL, cmd, *************** CreateRestrictedProcess(char *cmd, PROCE *** 2410,2419 **** return 0; } - #ifndef __CYGWIN__ - AddUserToDacl(processInfo->hProcess); - #endif - return ResumeThread(processInfo->hThread); } #endif --- 2414,2419 ----