Implementing LOCAL_CREDS socket credentials

Havoc Pennington hp at redhat.com
Sun Aug 27 12:42:57 PDT 2006


Julio M. Merino Vidal wrote:
> The problem is, could this work?  If I understand it correctly, the
> client sends a "AUTH EXTERNAL" message and immediately afterwards the
> '\0' credentials byte.  The server cannot set the flag in between
> these two messages.  Another approach could be to set the flag and
> retrieve the credentials from the "AUTH EXTERNAL" message itself.  But
> if this is the very first message in the connection, the server cannot
> set the flag appropriately.  (Because the socket needs to be
> connected; it's not possible to set LOCAL_CREDS before an accept(2).)
> 

Hmm. Google search turned up this:

http://lists.freebsd.org/pipermail/freebsd-bugs/2005-December/016191.html

That might fix it? (set LOCAL_CREDS on the listen socket)

Also raises the issue that on FreeBSD LOCAL_CREDS may be supported in 
addition to whatever we are doing on FreeBSD now (I think it does work 
on freebsd/osx now? I swear someone sent a patch for that), which just 
means we have to be careful that configure.in picks only one way to do 
it on FreeBSD.

Havoc


More information about the dbus mailing list