Revert "Do not use the file system GET_REAL_FILENAME for mangled names"
authorVolker Lendecke <vl@samba.org>
Mon, 27 Apr 2009 14:59:01 +0000 (16:59 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 6 May 2009 10:19:20 +0000 (12:19 +0200)
This reverts commit 5589d41d4ca1ad7db0227a1e7777e59c965b6c7c.

source/smbd/filename.c

index c9d4963c7de547032aa9095c5046adeac8400e63..d240ecfa647ca8dfc34bb68772b76b3606cf6e9e 100644 (file)
@@ -33,9 +33,6 @@ static NTSTATUS build_stream_path(TALLOC_CTX *mem_ctx,
                                  const char *streamname,
                                  SMB_STRUCT_STAT *pst,
                                  char **path);
-static int get_real_filename_mangled(connection_struct *conn, const char *path,
-                                    const char *name, TALLOC_CTX *mem_ctx,
-                                    char **found_name);
 
 /****************************************************************************
  Mangle the 2nd name and check if it is then equal to the first name.
@@ -434,7 +431,7 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
                         */
 
                        if (name_has_wildcard ||
-                           (get_real_filename_mangled(
+                           (SMB_VFS_GET_REAL_FILENAME(
                                     conn, dirpath, start,
                                     talloc_tos(), &found_name) == -1)) {
                                char *unmangled;
@@ -770,12 +767,15 @@ static bool fname_equal(const char *name1, const char *name2,
  If the name looks like a mangled name then try via the mangling functions
 ****************************************************************************/
 
-static int get_real_filename_mangled(connection_struct *conn, const char *path,
-                                    const char *name, TALLOC_CTX *mem_ctx,
-                                    char **found_name)
+int get_real_filename(connection_struct *conn, const char *path,
+                     const char *name, TALLOC_CTX *mem_ctx,
+                     char **found_name)
 {
+       struct smb_Dir *cur_dir;
+       const char *dname;
        bool mangled;
        char *unmangled_name = NULL;
+       long curpos;
 
        mangled = mangle_is_mangled(name, conn->params);
 
@@ -816,24 +816,8 @@ static int get_real_filename_mangled(connection_struct *conn, const char *path,
                        /* Name is now unmangled. */
                        name = unmangled_name;
                }
-               return get_real_filename(conn, path, name, mem_ctx,
-                                        found_name);
        }
 
-       return SMB_VFS_GET_REAL_FILENAME(conn, path, name, mem_ctx,
-                                        found_name);
-}
-
-int get_real_filename(connection_struct *conn, const char *path,
-                     const char *name, TALLOC_CTX *mem_ctx,
-                     char **found_name)
-{
-       struct smb_Dir *cur_dir;
-       const char *dname;
-       bool mangled;
-       char *unmangled_name = NULL;
-       long curpos;
-
        /* open the directory */
        if (!(cur_dir = OpenDir(talloc_tos(), conn, path, NULL, 0))) {
                DEBUG(3,("scan dir didn't open dir [%s]\n",path));