Patch proposal
Jeremy Allison
jra at samba.org
Fri Oct 26 00:34:11 GMT 2001
On Fri, Oct 26, 2001 at 02:25:36AM +0930, Richard Sharpe wrote:
> How, this is great ...
>
> Thanks for the patches. I won't be able to do anything for a day or so,
> as I am flying back to Oz from the US, but perhaps Jeremy or Jerry can
> apply the patchs.
>
> Tom Jansen wrote:
>
> >Hi everyone,
> >
> >I've been using libsmbclient quite often lately and I must say it works great,
> >however I believe I have discovered some errors.
> >
> >The first one is located in lib/debug.c where a possible NULL pointer is used as
> >an argument to a function that doesn't check for NULL.
> >
> >The second one was a little harder to track down and is located in
> >lib/util_sock.c where send() causes a SIGPIPE. SIGPIPE is never caught and I
> >think that the default errorhandling in write_socket_data() can handle the error
> >nicely.
> >
> >I've created two patches that fixed the two problems for me. The patches are
> >made against the HEAD branch. Both are attached to this message.
> >If this is not the correct way to fix it please let me know so I can create a
> >decent fix. Or at least try :-)
> >
> >yours,
> > Tom
> >
> >
> >------------------------------------------------------------------------
> >
> >--- lib/util_sock.c.orig Thu Oct 25 14:20:57 2001
> >+++ lib/util_sock.c Thu Oct 25 14:20:30 2001
> >@@ -532,7 +532,7 @@
> > ret = send(fd,buffer + total,N - total, 0);
> > }
> > #else /* WITH_SSL */
> >- ret = send(fd,buffer + total,N - total,0);
> >+ ret = send(fd,buffer + total,N - total, MSG_NOSIGNAL);
> > #endif /* WITH_SSL */
> >
> > if (ret == -1) {
> >
> >
> >------------------------------------------------------------------------
I don't think this is a valid patch. I believe MSG_NOSIGNAL is non-portable.
Please don't apply this as it will break the build on all but Linux.
Jeremy.
More information about the samba-technical
mailing list