summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-06-16 17:23:54 -0700
committerJeremy Allison <jra@samba.org>2009-06-16 17:23:54 -0700
commit9b30c5c1457a42a92a61086f8127caf6c60fc076 (patch)
tree801d7a9855513ba143eb3ee2c30fc48bd9e0438e /source3/smbd/nttrans.c
parentfbe85c70ef0aed6ff3c20585ae1f001c0417665c (diff)
downloadsamba-9b30c5c1457a42a92a61086f8127caf6c60fc076.tar.gz
samba-9b30c5c1457a42a92a61086f8127caf6c60fc076.tar.bz2
samba-9b30c5c1457a42a92a61086f8127caf6c60fc076.zip
Fix msdfs after the change to smb_filename struct. We must *always*
pull the pathname, then call resolve_dfspath(), before unix_convert(). Jeremy.
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c42
1 files changed, 38 insertions, 4 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 7d0324bcda..a8716d36a3 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -507,6 +507,23 @@ void reply_ntcreate_and_X(struct smb_request *req)
? BATCH_OPLOCK : 0;
}
+ status = resolve_dfspath(ctx,
+ conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
+ reply_botherror(req,
+ NT_STATUS_PATH_NOT_COVERED,
+ ERRSRV, ERRbadpath);
+ goto out;
+ }
+ reply_nterror(req, status);
+ goto out;
+ }
+
status = unix_convert(ctx, conn, fname, &smb_fname, 0);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
@@ -976,10 +993,21 @@ static void call_nt_transact_create(connection_struct *conn,
goto out;
}
- oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
- if (oplock_request) {
- oplock_request |= (flags & REQUEST_BATCH_OPLOCK)
- ? BATCH_OPLOCK : 0;
+ status = resolve_dfspath(ctx,
+ conn,
+ req->flags2 & FLAGS2_DFS_PATHNAMES,
+ fname,
+ &fname);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {
+ reply_botherror(req,
+ NT_STATUS_PATH_NOT_COVERED,
+ ERRSRV, ERRbadpath);
+ goto out;
+ }
+ reply_nterror(req, status);
+ goto out;
}
status = unix_convert(ctx, conn, fname, &smb_fname, 0);
@@ -988,6 +1016,12 @@ static void call_nt_transact_create(connection_struct *conn,
goto out;
}
+ oplock_request = (flags & REQUEST_OPLOCK) ? EXCLUSIVE_OPLOCK : 0;
+ if (oplock_request) {
+ oplock_request |= (flags & REQUEST_BATCH_OPLOCK)
+ ? BATCH_OPLOCK : 0;
+ }
+
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */