Bug 6228 - SMBC_open_ctx failure due to path resolve failure doesn't set errno
Summary: SMBC_open_ctx failure due to path resolve failure doesn't set errno
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.3.2
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-27 10:39 UTC by Alexander Larsson
Modified: 2009-03-27 17:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Larsson 2009-03-27 10:39:06 UTC
In:
http://gitweb.samba.org/?p=samba.git;a=blob;f=source3/libsmb/libsmb_file.c#l118

if cli_resolve_path fails we return NULL but don't set errno from SMBC_errno().
Comment 1 Derrell Lipman 2009-03-27 17:08:37 UTC
Thanks. It's been fixed in all branches.

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