summaryrefslogtreecommitdiff
path: root/source3/smbd/filename.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-12 14:59:59 +0200
committerMichael Adam <obnox@samba.org>2008-08-12 21:37:30 +0200
commitac9f55b9102574085ae6c7364c794a386d4981a1 (patch)
tree0169ef0256ad560cd902fd92de2c45b4a078aad8 /source3/smbd/filename.c
parent8b25ce06ceb4ad57fa585e76c1a6be12a4c7d3d2 (diff)
downloadsamba-ac9f55b9102574085ae6c7364c794a386d4981a1.tar.gz
samba-ac9f55b9102574085ae6c7364c794a386d4981a1.tar.bz2
samba-ac9f55b9102574085ae6c7364c794a386d4981a1.zip
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 ec5956ab0df1b3f567470b2481b73da9c3c67371)
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r--source3/smbd/filename.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 4323e843d2..41a0b9296a 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -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