The Samba-Bugzilla – Bug 1333
A number of error returns from libsmbclient functions do not return error codes in errno.
Last modified: 2005-08-24 10:23:54 UTC
coolo has pointed out some cases where errno is not set on an error return:
> > I was just looking. And for example smbc_server got one case at the very
> > end of the function where it detects an error, but doesn't set errno.
> > This returns back to the application calling smbc_open as
> > "Can't open smb://... (0: Sucess)"
> > smbc_attr_server sets in the same context errno to ENOMEM
the fix you commited now got some strange saved_errno which isn't used?
See http://bugs.kde.org/show_bug.cgi?id=66381 and the referenced
cli_RNetShareEnum shares from the same errno problem as cli_NetServerEnum
did. I wonder though how why the broken pipe was lost though.
I'd suggest setting errno = 0 before cli_api and then checking if errno is set
by the called function and if not, define errno to something reasonable. For
this function count == 0 is not necessarly an error, but when the
DEBUG(...failed is hit, then the function shouldn't leave without errno set.
Richard, is this bug fixed ? or not ? I can't tell.
If it is fixed as per your comment in in change r616,
please close it as fixed.
Otherwise, please adds a comment on what needs to be done.
r616 is about the initial comment, the bug is really more a reminder. And the
bug in #2 is real
is this bug still present in 3.0.11 ?
no comment in a month. closing.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.