diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-23 14:54:52 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-23 14:54:52 +0200 |
commit | 1722859abd169f2949b5822f97c810f2b8d162da (patch) | |
tree | 66881ac379d76806aaeb2f195b8cf66d48ab9a31 | |
parent | 2146310fb75b743d383aeeae3ac121e37903f229 (diff) | |
download | samba-1722859abd169f2949b5822f97c810f2b8d162da.tar.gz samba-1722859abd169f2949b5822f97c810f2b8d162da.tar.bz2 samba-1722859abd169f2949b5822f97c810f2b8d162da.zip |
Revert "Do not use the file system GET_REAL_FILENAME for mangled names"
This reverts commit b5b6ecb58aeba196c28370cde21a0826f81d8da6.
-rw-r--r-- | source3/smbd/filename.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index e35f23ef37..80722a7cd0 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -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. @@ -450,7 +447,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; @@ -792,12 +789,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); @@ -838,24 +838,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)); |