diff -cr postgresql-snapshot-030502/src/backend/port/win32/Makefile postgresql-work/src/backend/port/win32/Makefile
*** postgresql-snapshot-030502/src/backend/port/win32/Makefile	Mon Apr 12 18:19:18 2004
--- postgresql-work/src/backend/port/win32/Makefile	Mon May  3 20:05:09 2004
***************
*** 12,18 ****
  top_builddir = ../../../..
  include $(top_builddir)/src/Makefile.global
  
! OBJS = sema.o shmem.o timer.o socket.o signal.o
  
  all: SUBSYS.o
  
--- 12,18 ----
  top_builddir = ../../../..
  include $(top_builddir)/src/Makefile.global
  
! OBJS = sema.o shmem.o timer.o socket.o signal.o security.o
  
  all: SUBSYS.o
  
diff -cr postgresql-snapshot-030502/src/backend/postmaster/postmaster.c postgresql-work/src/backend/postmaster/postmaster.c
*** postgresql-snapshot-030502/src/backend/postmaster/postmaster.c	Mon Apr 19 19:42:58 2004
--- postgresql-work/src/backend/postmaster/postmaster.c	Mon May  3 20:47:28 2004
***************
*** 688,693 ****
--- 688,707 ----
  		ereport(DEBUG3,
  				(errmsg_internal("-----------------------------------------")));
  	}
+ 	
+ 	/*
+ 	 * This code for non-win32 is in main.c, but since we don't want to
+ 	 * force exit, and also need to use ereport() (to get output into
+ 	 * eventlog if running as a service), it has to go after the first
+ 	 * parts of the postmaster have started for win32.
+ 	 */
+ #ifdef WIN32
+ 	if (pgwin32_is_admin()) {
+ 		ereport(WARNING,
+ 				(errmsg("Postgresql is running with administrative privileges. This is NOT recommended."),
+ 				 errhint("Consider changing postmaster startup to run as a non-admin account")));
+ 	}
+ #endif
  
  	/*
  	 * On some systems our dynloader code needs the executable's pathname.
diff -cr postgresql-snapshot-030502/src/include/port/win32.h postgresql-work/src/include/port/win32.h
*** postgresql-snapshot-030502/src/include/port/win32.h	Thu Apr 22 05:51:24 2004
--- postgresql-work/src/include/port/win32.h	Mon May  3 20:47:02 2004
***************
*** 144,149 ****
--- 144,152 ----
  #endif
  
  
+ /* In backend/port/win32/security.c */
+ int pgwin32_is_admin(void);
+ 
  /* Some extra signals */
  #define SIGHUP				1
  #define SIGQUIT				3
