mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
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
(This used to be commit ec5956ab0d
)
This commit is contained in:
parent
8b25ce06ce
commit
ac9f55b910
@ -477,7 +477,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
|
||||
}
|
||||
|
||||
/* ENOENT is the only valid error here. */
|
||||
if (errno != ENOENT) {
|
||||
if ((errno != 0) && (errno != ENOENT)) {
|
||||
/*
|
||||
* ENOTDIR and ELOOP both map to
|
||||
* NT_STATUS_OBJECT_PATH_NOT_FOUND
|
||||
|
Loading…
Reference in New Issue
Block a user