Re: [PATCHES] pg_resetxlog as root

2004-12-13 Thread Dave Page
-Original Message- From: Neil Conway [mailto:[EMAIL PROTECTED] Sent: 13 December 2004 03:59 To: Dave Page Cc: pgsql-patches Subject: RE: [PATCHES] pg_resetxlog as root On Sun, 2004-12-12 at 23:59 +, Dave Page wrote: Sounds reasonable to me. Attached is a patch

Re: [PATCHES] pg_resetxlog as root

2004-12-13 Thread Neil Conway
On Mon, 2004-12-13 at 11:30 +, Dave Page wrote: -Original Message- From: Neil Conway [mailto:[EMAIL PROTECTED] Sent: 13 December 2004 03:59 To: Dave Page Cc: pgsql-patches Subject: RE: [PATCHES] pg_resetxlog as root On Sun, 2004-12-12 at 23:59 +, Dave Page

Re: [PATCHES] pg_resetxlog as root

2004-12-12 Thread Dave Page
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Conway Sent: 12 December 2004 22:57 To: pgsql-patches Subject: [PATCHES] pg_resetxlog as root I suppose a similar fix is needed for Win32? If so, pgwin32_is_admin() would be the natural

[PATCHES] pg_resetxlog as root

2004-12-12 Thread Neil Conway
We should prevent pg_resetxlog from being run as root: it writes new files to $PGDATA, so running the tool as root will result in those files being owned by root, which makes the data directory unusable. Attached is a trivial patch that makes this change for Unix. I suppose a similar fix is

Re: [PATCHES] pg_resetxlog as root

2004-12-12 Thread Neil Conway
On Sun, 2004-12-12 at 23:59 +, Dave Page wrote: Sounds reasonable to me. Attached is a patch that implements this. src/port/backend/win32/security.c is moved to src/port/win32_security.c, and conditionally added to LIBOBJS. Note that I don't have much experience with the build system, and