From 92715eaf0bf20b25d02e6265be9c960ddc9d6b03 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 Feb 2007 20:31:18 +0000 Subject: r21247: In the refactoring I dropped a RESOLVE_DFSPATH call from setpathinfo. Return it and make sure all paths go through a dfs resolve. Jeremy. (This used to be commit 7fd3a146c11b70428ab5fbd7dc0272706abf8280) --- source3/smbd/trans2.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 3bdeec0ead..b91cdeef70 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4168,6 +4168,7 @@ static NTSTATUS smb_set_file_unix_link(connection_struct *conn, static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, char *inbuf, + char *outbuf, const char *pdata, int total_data, pstring fname) @@ -4185,6 +4186,8 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, return status; } + RESOLVE_DFSPATH_STATUS(oldname, conn, inbuf, outbuf); + DEBUG(10,("smb_set_file_unix_hlink: SMB_SET_FILE_UNIX_LINK doing hard link %s -> %s\n", fname, oldname)); @@ -4228,13 +4231,13 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, return status; } + RESOLVE_DFSPATH_STATUS(newname, conn, inbuf, outbuf); + /* Check the new name has no '/' characters. */ if (strchr_m(newname, '/')) { return NT_STATUS_NOT_SUPPORTED; } - RESOLVE_DFSPATH_STATUS(newname, conn, inbuf, outbuf); - /* Create the base directory. */ pstrcpy(base_name, fname); p = strrchr_m(base_name, '/'); @@ -5237,6 +5240,9 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } + + RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); + status = unix_convert(conn, fname, False, NULL, &sbuf); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); @@ -5423,6 +5429,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char } status = smb_set_file_unix_hlink(conn, inbuf, + outbuf, pdata, total_data, fname); -- cgit