diff options
author | Derrell Lipman <derrell@dworkin.(none)> | 2009-03-27 18:02:46 -0400 |
---|---|---|
committer | Derrell Lipman <derrell@dworkin.(none)> | 2009-03-27 18:02:46 -0400 |
commit | c33f3d5cba21c8cf267daab5450bc95ea7e68967 (patch) | |
tree | f7e1ec8119dfa99e012aa587a1e68a5e2222298c /source3/libsmb/libsmb_stat.c | |
parent | 4b88f2c17e18f87d8ba0e35e057d7bb8a27614dd (diff) | |
download | samba-c33f3d5cba21c8cf267daab5450bc95ea7e68967.tar.gz samba-c33f3d5cba21c8cf267daab5450bc95ea7e68967.tar.bz2 samba-c33f3d5cba21c8cf267daab5450bc95ea7e68967.zip |
[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
Diffstat (limited to 'source3/libsmb/libsmb_stat.c')
-rw-r--r-- | source3/libsmb/libsmb_stat.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c index dc904d2753..c2806daddb 100644 --- a/source3/libsmb/libsmb_stat.c +++ b/source3/libsmb/libsmb_stat.c @@ -261,6 +261,7 @@ SMBC_fstat_ctx(SMBCCTX *context, file->srv->cli, path, &targetcli, &targetpath)) { d_printf("Could not resolve %s\n", path); + errno = ENOENT; TALLOC_FREE(frame); return -1; } |