Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-04-04 Thread Tom Lane
I wrote: > I will go and commit this, without the #ifdefs and without the --single > exclusion. On closer inspection I realized that the switch parsing was still far too risky, because it would treat "-C" in any word of the process command line as a reason not to check for root. Quite aside from

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-04-04 Thread Tom Lane
"MauMau" writes: > From: "Heikki Linnakangas" >> Hmm, why do this only on Windows? If "postgres -C" is safe enough to run >> as Administrator on Windows, why not allow running it as root on Unix as >> well? Even if there's no particular need to allow it as root on Unix, >> fewer #ifdefs is goo

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-02-20 Thread MauMau
From: "Heikki Linnakangas" Hmm, why do this only on Windows? If "postgres -C" is safe enough to run as Administrator on Windows, why not allow running it as root on Unix as well? Even if there's no particular need to allow it as root on Unix, fewer #ifdefs is good. Yes, I limited the change

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-02-20 Thread Heikki Linnakangas
On 02/01/2014 12:28 PM, Christian Kruse wrote: On 31/01/14 22:17, MauMau wrote: Thanks for reviewing the patch. Fixed. I'll add this revised patch to the CommitFest entry soon. Looks fine for me. Set it to „waiting for commit.“ Hmm, why do this only on Windows? If "postgres -C" is safe eno

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-02-01 Thread Christian Kruse
Hi, On 31/01/14 22:17, MauMau wrote: > Thanks for reviewing the patch. Fixed. I'll add this revised patch to the > CommitFest entry soon. Looks fine for me. Set it to „waiting for commit.“ Best regards, -- Christian Kruse http://www.2ndQuadrant.com/ PostgreSQL Development, 24

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-01-31 Thread MauMau
From: "Christian Kruse" personally I really dislike constructs like you used: Thanks for reviewing the patch. Fixed. I'll add this revised patch to the CommitFest entry soon. Regards MauMau config_dir_win_v2.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-01-30 Thread Christian Kruse
Hi, personally I really dislike constructs like you used: #ifdef WIN32 if (check_if_admin) #endif check_root(progname); It is hard to read and may confuse editors. Can you rewrite it? The rest looks fine to me. Best regards, -- Christian Kruse http://ww

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2013-12-07 Thread Amit Kapila
On Sat, Dec 7, 2013 at 6:02 PM, MauMau wrote: > From: "Amit Kapila" > >> Today, I had again gone through all the discussion that happened at >> that time related to this problem >> and I found that later in discussion it was discussed something on >> lines as your Approach-2, >> please see the li

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2013-12-07 Thread MauMau
From: "Amit Kapila" Today, I had again gone through all the discussion that happened at that time related to this problem and I found that later in discussion it was discussed something on lines as your Approach-2, please see the link http://www.postgresql.org/message-id/503a879c.6070...@dunslan

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2013-12-06 Thread Amit Kapila
On Thu, Dec 5, 2013 at 6:30 PM, MauMau wrote: > From: "Amit Kapila" >> >> On Wed, Dec 4, 2013 at 7:57 PM, MauMau wrote: >>> >> >> Approach-2 has been discussed previously to resolve it and it doesn't seem >> to be >> a good way to handle it. Please refer link: >> http://www.postgresql.org/messag

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2013-12-05 Thread MauMau
From: "Amit Kapila" On Wed, Dec 4, 2013 at 7:57 PM, MauMau wrote: * Approach 1 When postgres starts, it removes Administrator privileges from its own process. But is this possible at all? Windows security API is complex and provides many functions. It seems difficult to understand them. I

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2013-12-04 Thread Amit Kapila
On Wed, Dec 4, 2013 at 7:57 PM, MauMau wrote: > Hello, > > I've found a bug and would like to fix it, but I cannot figure out how to do > that well. Could you give me any advice? I encountered this on PG 9.2, but > it will probably exist in later versions. > > [Problem] > On Windows, a user with

[HACKERS] [bug fix] pg_ctl fails with config-only directory

2013-12-04 Thread MauMau
Hello, I've found a bug and would like to fix it, but I cannot figure out how to do that well. Could you give me any advice? I encountered this on PG 9.2, but it will probably exist in later versions. [Problem] On Windows, a user with Administrator privileges can start the database server.