Fix unix_convert() for "*" after changing map_nt_error_from_unix().
commit40dc7e9a38e6c5f9c551625a7553fb0c9eb1d867
authorMichael Adam <obnox@samba.org>
Tue, 12 Aug 2008 12:59:59 +0000 (12 14:59 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 13 Aug 2008 14:11:58 +0000 (13 16:11 +0200)
tree82ffb16607ad538673ef2341da9fa1324b1416c5
parent6a658505d697c350cba7d417534f11784ac3100c
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
(cherry picked from commit 736bdf15d934028b579a02dc411aed6c14a437f3)
source/smbd/filename.c