Fix unix_convert() for "*" after changing map_nt_error_from_unix().
commitec5956ab0df1b3f567470b2481b73da9c3c67371
authorMichael Adam <obnox@samba.org>
Tue, 12 Aug 2008 12:59:59 +0000 (12 14:59 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 12 Aug 2008 19:37:30 +0000 (12 21:37 +0200)
tree0bdf0e593716c1d26858ef341dd4cab31e4d2deb
parent834684a524a24bb4eb46b4af583d39947dc87d95
Fix unix_convert() for "*" after changing map_nt_error_from_unix().

map_nt_error_from_unix() now assumes that it is called in
an error path and returns an error even for a given errno == 0.
The original behaviour of unix_convert() used the mapping
of errno == 0 ==> NT_STATUS_OK to return success through
an error path.

I think this must have been an oversight, and unix_convert() worked
only by coincidence (or because explicitly using the knowledge
of the conceptually wrong working of map_nt_error_from_unix().

This patch puts this straight by not interpreting errno == 0
as an error condition and proceeding in that case.

Jeremy - please check!

Michael
source/smbd/filename.c