Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled
Date
Msg-id 0A3221C70F24FB45833433255569204D1F63C8CA@G01JPEXMBYT05
Whole thread Raw
In response to Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
From: Michael Paquier [mailto:michael.paquier@gmail.com]
> I just looked more deeply at your refactoring patch, and I didn't know about
> CheckTokenMembership()... The whole logic of your patch depends on it.
> That's quite a cleanup that you have here. It looks that the former
> implementation just had no knowledge of this routine or it would just have
> been used.

Yes, Microsoft recommends GetTokenMembership() because it's simpler.


> +    if (IsAdministrators || IsPowerUsers)
> +        return 1;
> +    else
> +        return 0;
> I would remove the else here.

IIRC, I sometimes saw this style of code in PostgreSQL (or in psqlODBC possibly...)  I'd like to leave the style choice
tothe committer.
 

Regards
Takayuki Tsunakawa


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Incorrect overflow check condition for WAL segment size
Next
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take