Author: jra
Date: 2007-07-11 23:54:01 +0000 (Wed, 11 Jul 2007)
New Revision: 23846

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23846

Log:
Belt-and-braces on the msdfs bug. Ensure ELOOP maps
correctly.
Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/smbd/filename.c
   branches/SAMBA_3_2/source/smbd/filename.c
   branches/SAMBA_3_2_0/source/smbd/filename.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/smbd/filename.c
===================================================================
--- branches/SAMBA_3_0_25/source/smbd/filename.c        2007-07-11 23:40:14 UTC 
(rev 23845)
+++ branches/SAMBA_3_0_25/source/smbd/filename.c        2007-07-11 23:54:01 UTC 
(rev 23846)
@@ -392,20 +392,25 @@
                                         * 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) {
                                                return 
NT_STATUS_OBJECT_PATH_NOT_FOUND;
                                        }
                                        return map_nt_error_from_unix(errno);
                                }
-             
+
                                /* 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) {
                                                return 
NT_STATUS_OBJECT_PATH_NOT_FOUND;
                                        }
                                        return map_nt_error_from_unix(errno);

Modified: branches/SAMBA_3_2/source/smbd/filename.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/filename.c   2007-07-11 23:40:14 UTC (rev 
23845)
+++ branches/SAMBA_3_2/source/smbd/filename.c   2007-07-11 23:54:01 UTC (rev 
23846)
@@ -396,10 +396,15 @@
                                         * 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 @@
 
                                /* 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 {

Modified: branches/SAMBA_3_2_0/source/smbd/filename.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/filename.c 2007-07-11 23:40:14 UTC (rev 
23845)
+++ branches/SAMBA_3_2_0/source/smbd/filename.c 2007-07-11 23:54:01 UTC (rev 
23846)
@@ -396,10 +396,15 @@
                                         * 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 @@
 
                                /* 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 {

Reply via email to