Re: Patch: use SCM_CREDS authentication over PF_LOCAL sockets - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: Patch: use SCM_CREDS authentication over PF_LOCAL sockets
Date
Msg-id Pine.LNX.4.30.0108181644180.677-100000@peter.localdomain
Whole thread Raw
In response to Re: Patch: use SCM_CREDS authentication over PF_LOCAL sockets  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Patch: use SCM_CREDS authentication over PF_LOCAL sockets
Re: Patch: use SCM_CREDS authentication over PF_LOCAL sockets
List pgsql-patches
Bruce Momjian writes:

> OK, here is an even better version.  It handles the lack of alignment in
> the the structure passing.  This works on BSD/OS and should work on
> FreeBSD too.

Since this patch overwrites the previous SO_PEERCRED patch I assume you
want it to work on Linux, too.  On Linux SCM_CREDS is called
SCM_CREDENTIALS.  There's no sys/ucred.h (use sys/socket.h instead), and
there's no fc_uid, though I don't know what that does.  The invocation
changes to StrNCpy look suspicious; see the comment at StrNCpy in c.h.  In
one place you include errno.h twice.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: encoding names
Next
From: Tom Lane
Date:
Subject: Re: Patch: use SCM_CREDS authentication over PF_LOCAL sockets