Re: Get a user's all groups

Daniel Sahlberg <[email protected]>
Newsgroups gmane.comp.apache.apr.devel
Message-ID <CAMHy98P_d=wWz8FgH=QA6OQYE1j2-BHWB47eWRy-YR0NG1NXhQ@mail.gmail.com>
Den tis 2 jan. 2024 kl 14:20 skrev Joe Orton <[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
>
>
Thanks Joe! We ended up changing to access().

Kind regards,
Daniel
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.