]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r23846: Belt-and-braces on the msdfs bug. Ensure ELOOP maps
authorJeremy Allison <jra@samba.org>
Wed, 11 Jul 2007 23:54:01 +0000 (23:54 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:28:34 +0000 (12:28 -0500)
correctly.
Jeremy.

source/smbd/filename.c

index fd7727c594746d686be0b32ac4a346dff1c5b94d..cf6613aa71166ff9112100a2782a0709a35647f3 100644 (file)
@@ -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 {