Final part of jumbo patch for bug #7104 - "wide links" and "unix extensions" are...
authorJeremy Allison <jra@samba.org>
Thu, 11 Feb 2010 22:45:53 +0000 (14:45 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 11 Feb 2010 22:45:53 +0000 (14:45 -0800)
Volker pointed out that the preexec scripts get passed the conn->connectpath
as a parameter, so call canonicalize_connect_path() both *before* and after
the preexec scripts. Ignore errors on the call before the preexec scripts,
as the path may not exist until created by the preexec scripts.

Jeremy.

source3/smbd/service.c

index 4efa63e1dcff69d6ac87319b5cc2f1faac05094b..45df7c14fe1325456dad97c6292a48c82ca516b2 100644 (file)
@@ -893,6 +893,18 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
                return NULL;
        }  
 
+       /*
+        * Fix compatibility issue pointed out by Volker.
+        * We pass the conn->connectpath to the preexec
+        * scripts as a parameter, so attempt to canonicalize
+        * it here before calling the preexec scripts.
+        * We ignore errors here, as it is possible that
+        * the conn->connectpath doesn't exist yet and
+        * the preexec scripts will create them.
+        */
+
+       (void)canonicalize_connect_path(conn);
+
        /* Preexecs are done here as they might make the dir we are to ChDir
         * to below */
        /* execute any "root preexec = " line */