Re: [HACKERS] initdb -S versus superuser check and Windows restricted mode

2015-05-30 Thread Michael Paquier
On Sat, May 30, 2015 at 6:08 AM, Tom Lane wrote: > I noticed that if you use "initdb -S", the code does its thing and > exits without ever calling get_restricted_token(). It doesn't get > to get_id() where the no-superuser check is, either. Is this OK, > or should we reorder the operations so th

[HACKERS] initdb -S versus superuser check and Windows restricted mode

2015-05-29 Thread Tom Lane
I noticed that if you use "initdb -S", the code does its thing and exits without ever calling get_restricted_token(). It doesn't get to get_id() where the no-superuser check is, either. Is this OK, or should we reorder the operations so that fsyncing is done with the usual restricted privileges?