Using sendmsg for SCM_CREDS results in EINVAL on PF_INET socket

Matthew Dillon dillon at apollo.backplane.com
Mon May 26 19:49:19 UTC 2008


:> 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 invalid.
:> 
:> Can anyone confirm this is the case or not?
:
:What would it even mean to send credentials to a remote host over an 
:AF_INET socket?
:
:Kris

    The only way to do it is to do a connect-back to a secure port.  In
    otherwords, to use the identd protocol.

    Control messages like SCM_CREDS (and descriptor passing for that matter)
    only work over local protocol sockets.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>


More information about the freebsd-hackers mailing list