sendmsg is not documented as ever returning EINVAL but yet when
using the following code to send credentials to a remote host
results in EINVAL from sendmsg.
I suspect that SCM_CREDS is only valid for PF_LOCAL / PF_UNIX
sockets and not PF_INET sockets and hence the code in dbus
is actually
> In the FreeBSD implimentation, the sender must attach a message of
> type SCM_CREDS and the kernel will correctly fill in the fields.
Thanks! That was the missing piece of the puzzle.
jim...
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in
FreeBSD implimentation, the sender must attach a message of
type SCM_CREDS and the kernel will correctly fill in the fields.
FreeBSD also supports a socketoption which returns a structure
containing the credentials of the process at the far end. It is
used to impliment getpeereid - have a look at:
I'm trying to get a connecting process' PID that's using a UNIX socket.
recvmsg makes it appear possible, but so far no good.
Has anyone done this before? Can you supply a code sippet???
jim...
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the
4 matches
Mail list logo