tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Extending sockcred



On Saturday, 5 Jul 2008 5:08:28
Iain Hibbert <plunky%rya-online.net@localhost> wrote:


> On Sat, 5 Jul 2008, Matthew Mondor wrote:

> seems you can use:
>       getsockopt(s, 0, LOCAL_PEEREID, ...)
> to get this information? (see unix(4))

When I switched to my -current box to implement LOCAL_PROC this
morning I noticed it was there indeed (unavailable on 4.0).  According
to unix(4) this would only work for SOCK_STREAM at connect(2) time,
however I'll check if that's what the code really does.  If that is
the case, it might be worth considering a modification to also allow
it on a per-datagram basis.

Unfortunately, I only noticed LOCAL_PEEREID after I implemented
LOCAL_PROC as I finally added the new #define to un.h :) and
LOCAL_PROC semantics are like LOCAL_CREDS ones.  I'll consider posting
a diff in a PR if I have to fix LOCAL_PEEREID to work with
SOCK_DGRAM.

Thanks again,
-- 
Matthew Mondor


Home | Main Index | Thread Index | Old Index