registry shares: prevent creating regular share called "global".
[samba.git] / source3 / smbd / service.c
index ed8061e2f79c6e90b51b7eac7ab9bea42fc6541e..8b73f68364f8609ccc483e0f962428650ec6052a 100644 (file)
@@ -235,6 +235,10 @@ static int load_registry_service(const char *servicename)
                return -1;
        }
 
+       if (strequal(servicename, GLOBAL_NAME)) {
+               return -2;
+       }
+
        if (asprintf(&path, "%s\\%s", KEY_SMBCONF, servicename) == -1) {
                return -1;
        }
@@ -1171,16 +1175,8 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
         * assumes that all the filesystem mounted withing a share path have
         * the same characteristics, which is likely but not guaranteed.
         */
-       {
-               vfs_statvfs_struct svfs;
 
-               conn->fs_capabilities =
-                   FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
-
-               if (SMB_VFS_STATVFS(conn, conn->connectpath, &svfs) == 0) {
-                       conn->fs_capabilities = svfs.FsCapabilities;
-               }
-       }
+       conn->fs_capabilities = SMB_VFS_FS_CAPABILITIES(conn);
 
        /*
         * Print out the 'connected as' stuff here as we need