summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-07-11 23:54:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:34 -0500
commitb114d3dc70a631f41c9d6e0e05b0ed98baa9d815 (patch)
tree1e789b7e1d90f123fbdc4352eaaa2608b9bbf567
parentda0758cb048b5d5c804ea4e73ffb822532cd3a00 (diff)
downloadsamba-b114d3dc70a631f41c9d6e0e05b0ed98baa9d815.tar.gz
samba-b114d3dc70a631f41c9d6e0e05b0ed98baa9d815.tar.bz2
samba-b114d3dc70a631f41c9d6e0e05b0ed98baa9d815.zip
r23846: Belt-and-braces on the msdfs bug. Ensure ELOOP maps
correctly. Jeremy. (This used to be commit f2cf4b6b9d1ce561fdf9f6815564d5b4f033dd10)
-rw-r--r--source3/smbd/filename.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index fd7727c594..cf6613aa71 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -396,10 +396,15 @@ NTSTATUS unix_convert(connection_struct *conn,
* these two errors.
*/
- /* ENOENT and ENOTDIR both map to NT_STATUS_OBJECT_PATH_NOT_FOUND
- in the filename walk. */
+ /*
+ * ENOENT, ENOTDIR and ELOOP all map
+ * to NT_STATUS_OBJECT_PATH_NOT_FOUND
+ * in the filename walk.
+ */
- if (errno == ENOENT || errno == ENOTDIR) {
+ if (errno == ENOENT ||
+ errno == ENOTDIR ||
+ errno == ELOOP) {
result = NT_STATUS_OBJECT_PATH_NOT_FOUND;
}
else {
@@ -410,9 +415,13 @@ NTSTATUS unix_convert(connection_struct *conn,
/* 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) {
+ /*
+ * ENOTDIR and ELOOP both map to
+ * NT_STATUS_OBJECT_PATH_NOT_FOUND
+ * in the filename walk.
+ */
+ if (errno == ENOTDIR ||
+ errno == ELOOP) {
result = NT_STATUS_OBJECT_PATH_NOT_FOUND;
}
else {