summaryrefslogtreecommitdiffstats
path: root/source/smbd/filename.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-01-13 02:13:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:06 -0500
commitd4127034fb89185fe7464d57c9f56f7914da6141 (patch)
tree7041e5c42c712efba042a9283e8975188ba8813c /source/smbd/filename.c
parent89f03a8db40365f99c6755ff19a4bfbf8d1bd316 (diff)
downloadsamba-d4127034fb89185fe7464d57c9f56f7914da6141.tar.gz
samba-d4127034fb89185fe7464d57c9f56f7914da6141.tar.xz
samba-d4127034fb89185fe7464d57c9f56f7914da6141.zip
r20722: RAW-CHKPATH should now pass, build farm should
go back to normal. Sorry about that. Jeremy.
Diffstat (limited to 'source/smbd/filename.c')
-rw-r--r--source/smbd/filename.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/smbd/filename.c b/source/smbd/filename.c
index dd1e0de20f2..a36b7ff2821 100644
--- a/source/smbd/filename.c
+++ b/source/smbd/filename.c
@@ -391,15 +391,24 @@ NTSTATUS unix_convert(connection_struct *conn,
* Windows applications depend on the difference between
* these two errors.
*/
- if (errno == ENOENT) {
+
+ /* ENOENT and ENOTDIR both map to NT_STATUS_OBJECT_PATH_NOT_FOUND
+ in the filename walk. */
+
+ if (errno == ENOENT || errno == ENOTDIR) {
return NT_STATUS_OBJECT_PATH_NOT_FOUND;
}
return map_nt_error_from_unix(errno);
}
- if (errno == ENOTDIR) {
- /* Name exists but is not a directory. */
- return map_nt_error_from_unix(ENOTDIR);
+ /* ENOENT is the only valid error here. */
+ if (errno != ENOENT) {
+ /* ENOENT and ENOTDIR both map to NT_STATUS_OBJECT_PATH_NOT_FOUND
+ in the filename walk. */
+ if (errno == ENOTDIR) {
+ return NT_STATUS_OBJECT_PATH_NOT_FOUND;
+ }
+ return map_nt_error_from_unix(errno);
}
/*