[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno
authorDerrell Lipman <derrell@dworkin.(none)>
Fri, 27 Mar 2009 21:10:04 +0000 (17:10 -0400)
committerMichael Adam <obnox@samba.org>
Tue, 31 Mar 2009 10:45:47 +0000 (12:45 +0200)
commite3e4a081e68d4e6c661cbe4ced03be3ff633737e
tree5c28dc5d1304f38d8006b9ff8ff3dcae13e57bc8
parent856e2d008f627c771e80b7c51395a789af5d9335
[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno

Fixed.

It turns out there were a number of places where cli_resolve_path() was called
and the error path upon that function failing did not set errno. There were a
couple of places the failure handling code did set errno to ENOENT, so I made
them all consistent, although I think better errno choices for this condition
exist, e.g.  EHOSTUNREACH.

Derrell
(cherry picked from commit f4e68b09a6ba30d968bccfad8bf6b67b4456b111)
source/libsmb/libsmb_dir.c
source/libsmb/libsmb_file.c
source/libsmb/libsmb_stat.c