ignoring NEGOTIATE_UNIX_FD

Martin Vidner mvidner at suse.cz
Wed Nov 7 07:46:54 PST 2012


On Tue, Nov 06, 2012 at 03:42:21PM +0100, Thiago Macieira wrote:
> On terça-feira, 6 de novembro de 2012 09.07.05, Manuel Reimer wrote:
> > I managed to fix that by adding the new type to the relevant lists and make
> > the modules handle it like an int32. AFAIR Perl has routines to operate on
> > file descriptors by number, so an "int32" seems to be a valid return value.
> > 
> > I'll try to contact the author to send him my fix.
> > 
> > ... but I'm getting unsure, if my solution is the right one, anyway... The
> > much easier solution would be to just prefix my ExecStart command in my
> > systemd service file with "systemd-inhibit ....".
> 
> Remember that the library dup()s the file descriptor before giving it to you. 
> You need to remember to close it later, otherwise you'll leak them.

Also note that the integers in the message are not the FDs. The spec says:
  
	UNIX_FD: 32-bit unsigned integer in the message's byte order. The
	actual file descriptors need to be transferred out-of-band via some
	platform specific mechanism. On the wire, values of this type store
	the index to the file descriptor in the array of file descriptors
	that accompany the message.

-- 
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner

Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20121107/2530aab8/attachment.pgp>


More information about the dbus mailing list