Re: Get a user's all groups

Joe Orton <[email protected]>
Newsgroups gmane.comp.apache.apr.devel
Organization Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (US), Michael O'Neill (Ireland), Paul Argiry (US)
Message-ID <[email protected]>
On Tue, Jan 02, 2024 at 02:00:00PM +0100, Daniel Sahlberg wrote:
> My idea was to incrementally improve the code but maybe a better way 
> is to switch to access() completely. access() seems to be widely 
> available but I will have to read up on the setuid properties to make 
> sure we don't change how things has worked in the past.
> 
> Background: Subversion has the ability to say a file "needs locking", if a
> particular user/working copy doesn't hold the "lock" the file should be
> read-only (and inversely if the user holds the lock the file should be
> writeable). We check for W access using the code above and then update the
> permissions accordingly.

Makes sense. Yeah, I would recommend switching to using access(,W_OK) or 
access(,X_OK) on Unix, I'm not aware of any portability concerns with 
that.

Regards, Joe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.