[PATCH] Unix datagram socket messaging
Jeremy Allison
jra at samba.org
Tue Apr 22 10:11:56 MDT 2014
On Tue, Apr 22, 2014 at 05:52:12PM +0200, Stefan (metze) Metzmacher wrote:
> 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().
I think that's a bad idea - I don't think NULL
should be allowable here.
> 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.
OK, I'll take a look !
I'll re-post the patchset once I've done these
tidyups.
Cheers,
Jeremy.
More information about the samba-technical
mailing list