[PATCH] Unix datagram socket messaging

Stefan (metze) Metzmacher metze at samba.org
Tue Apr 22 09:52:12 MDT 2014


Am 19.04.2014 00:47, schrieb Jeremy Allison:
>>> + unlink(ctx->path);
>>> > > 
>>> > > We may need to check that ctx->path is not an empty string?
>> > 
>> > I altered it so ctx->path can never be invalid
>> > (returns EINVAL) on path==NULL.
>> > 

One of the tests explicitly passes path==NULL to unix_msg_init()
and then unix_dgram_init().

Maybe the better fix would be only call
ctx->created_pid = getpid(); when we call bind()
and set it to -1 otherwise.

Then 'if (getpid() == ctx->created_pid) {' would do the correct thing.

metze


More information about the samba-technical mailing list