summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index c4d0374e99..73c062e69f 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -535,10 +535,11 @@ void reply_ntcreate_and_X(struct smb_request *req)
? BATCH_OPLOCK : 0;
}
- status = resolve_dfspath(ctx,
+ status = filename_convert(ctx,
conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
fname,
+ &smb_fname,
&fname);
if (!NT_STATUS_IS_OK(status)) {
@@ -552,12 +553,6 @@ void reply_ntcreate_and_X(struct smb_request *req)
goto out;
}
- status = unix_convert(ctx, conn, fname, &smb_fname, 0);
- if (!NT_STATUS_IS_OK(status)) {
- reply_nterror(req, status);
- goto out;
- }
-
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
@@ -1021,10 +1016,11 @@ static void call_nt_transact_create(connection_struct *conn,
goto out;
}
- status = resolve_dfspath(ctx,
+ status = filename_convert(ctx,
conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
fname,
+ &smb_fname,
&fname);
if (!NT_STATUS_IS_OK(status)) {
@@ -1038,12 +1034,6 @@ static void call_nt_transact_create(connection_struct *conn,
goto out;
}
- status = unix_convert(ctx, conn, fname, &smb_fname, 0);
- if (!NT_STATUS_IS_OK(status)) {
- reply_nterror(req, status);
- goto out;
- }
-
oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
if (oplock_request) {
oplock_request |= (flags & REQUEST_BATCH_OPLOCK)
@@ -1399,6 +1389,8 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
void reply_ntrename(struct smb_request *req)
{
connection_struct *conn = req->conn;
+ struct smb_filename *smb_fname_old = NULL;
+ struct smb_filename *smb_fname_new = NULL;
char *oldname = NULL;
char *newname = NULL;
const char *p;
@@ -1444,9 +1436,10 @@ void reply_ntrename(struct smb_request *req)
return;
}
- status = resolve_dfspath(ctx, conn,
+ status = filename_convert(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
oldname,
+ &smb_fname_old,
&oldname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -1460,9 +1453,10 @@ void reply_ntrename(struct smb_request *req)
return;
}
- status = resolve_dfspath(ctx, conn,
+ status = filename_convert(ctx, conn,
req->flags2 & FLAGS2_DFS_PATHNAMES,
newname,
+ &smb_fname_new,
&newname);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
@@ -1498,8 +1492,8 @@ void reply_ntrename(struct smb_request *req)
} else {
status = hardlink_internals(ctx,
conn,
- oldname,
- newname);
+ smb_fname_old,
+ smb_fname_new);
}
break;
case RENAME_FLAG_COPY: