Using sendmsg for SCM_CREDS results in EINVAL on PF_INET socket

2008-05-18 Thread Steven Hartland
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

Re: SCM_CREDS

2003-01-02 Thread Jim Faucette
> 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

Re: SCM_CREDS

2003-01-01 Thread David Malone
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:

SCM_CREDS

2002-12-31 Thread Jim Faucette
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