[SCM] Samba Shared Repository - branch master updated
Ralph Böhme
slow at samba.org
Tue Sep 19 19:52:02 UTC 2023
The branch, master has been updated
via 05291d2bd40 s3: smbd: Now we have proved hardlink_internals() doesn't use src_dirfsp and dst_dirfsp, remove the parameters.
via 3fba7872b2b s3: smbd: hardlink_internals() never looks at src_dirfsp or dst_dirfsp.
via e94796e7c49 s3: smbd: Now we have shown dst_dirfsp is always NULL, remove the parameter from rename_internals().
via c38815b4fce s3: smbd: As rename_internals() calls rename_internals_fsp(), show we can pass dst_dirfsp as NULL here too.
via 33845e09b61 s3: smbd: Now we've proved dst_dirfsp parameter is always NULL, remove the parameter from rename_internals_fsp().
via e61a956b934 s3: smbd: rename_internals_fsp() has to reopen the parent directory of the target as a pathref to check permissions.
from 5b7f9840f76 selftest: add some basic testing for the io_uring vfs module
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 05291d2bd40a50a026df2caf8bf9f4c762238362
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 19 10:32:59 2023 -0700
s3: smbd: Now we have proved hardlink_internals() doesn't use src_dirfsp and dst_dirfsp, remove the parameters.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Tue Sep 19 19:51:47 UTC 2023 on atb-devel-224
commit 3fba7872b2bc04b9c5b284bef0f44ec286925730
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 19 10:30:01 2023 -0700
s3: smbd: hardlink_internals() never looks at src_dirfsp or dst_dirfsp.
Show this by sending NULL in all cases.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e94796e7c49b5396a42ceca9c76eb3453975ade6
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 19 10:03:05 2023 -0700
s3: smbd: Now we have shown dst_dirfsp is always NULL, remove the parameter from rename_internals().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit c38815b4fcebc14bd7211f89323407e15a489fb1
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 19 09:55:12 2023 -0700
s3: smbd: As rename_internals() calls rename_internals_fsp(), show we can pass dst_dirfsp as NULL here too.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit 33845e09b618e2064e89d5a956fc1266d82631f7
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 19 09:52:16 2023 -0700
s3: smbd: Now we've proved dst_dirfsp parameter is always NULL, remove the parameter from rename_internals_fsp().
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
commit e61a956b9346833e863d35d29e36a702ca1e92f2
Author: Jeremy Allison <jra at samba.org>
Date: Tue Sep 19 09:49:25 2023 -0700
s3: smbd: rename_internals_fsp() has to reopen the parent directory of the target as a pathref to check permissions.
So it never looks at any passed in dst_dirfsp.
Prove this by passing NULL.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/proto.h | 4 ----
source3/smbd/smb1_nttrans.c | 3 ---
source3/smbd/smb1_reply.c | 1 -
source3/smbd/smb1_trans2.c | 2 --
source3/smbd/smb2_reply.c | 3 ---
source3/smbd/smb2_trans2.c | 9 ---------
6 files changed, 22 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 78e1b48be09..04b1b053ae6 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -973,7 +973,6 @@ ssize_t sendfile_short_send(struct smbXsrv_connection *xconn,
size_t smb_maxcnt);
NTSTATUS rename_internals_fsp(connection_struct *conn,
files_struct *fsp,
- struct files_struct *dst_dirfsp,
struct smb_filename *smb_fname_dst_in,
const char *dst_original_lcomp,
uint32_t attrs,
@@ -983,7 +982,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
struct smb_request *req,
struct files_struct *src_dirfsp,
struct smb_filename *smb_fname_src,
- struct files_struct *dst_dirfsp,
struct smb_filename *smb_fname_dst,
const char *dst_original_lcomp,
uint32_t attrs,
@@ -1127,9 +1125,7 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
connection_struct *conn,
struct smb_request *req,
bool overwrite_if_exists,
- struct files_struct *old_dirfsp,
const struct smb_filename *smb_fname_old,
- struct files_struct *new_dirfsp,
struct smb_filename *smb_fname_new);
NTSTATUS smb_set_file_time(connection_struct *conn,
files_struct *fsp,
diff --git a/source3/smbd/smb1_nttrans.c b/source3/smbd/smb1_nttrans.c
index d1c45e7a459..104d3c09656 100644
--- a/source3/smbd/smb1_nttrans.c
+++ b/source3/smbd/smb1_nttrans.c
@@ -1577,7 +1577,6 @@ void reply_ntrename(struct smb_request *req)
req,
src_dirfsp,
smb_fname_old,
- dst_dirfsp,
smb_fname_new,
dst_original_lcomp,
attrs,
@@ -1589,9 +1588,7 @@ void reply_ntrename(struct smb_request *req)
conn,
req,
false,
- src_dirfsp,
smb_fname_old,
- dst_dirfsp,
smb_fname_new);
break;
case RENAME_FLAG_COPY:
diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c
index f685be8016e..5c2ec449219 100644
--- a/source3/smbd/smb1_reply.c
+++ b/source3/smbd/smb1_reply.c
@@ -6481,7 +6481,6 @@ void reply_mv(struct smb_request *req)
req,
src_dirfsp, /* src_dirfsp */
smb_fname_src,
- dst_dirfsp, /* dst_dirfsp */
smb_fname_dst,
dst_original_lcomp,
attrs,
diff --git a/source3/smbd/smb1_trans2.c b/source3/smbd/smb1_trans2.c
index fca781d2cd4..3f8ad70ecce 100644
--- a/source3/smbd/smb1_trans2.c
+++ b/source3/smbd/smb1_trans2.c
@@ -3861,9 +3861,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
conn,
req,
false,
- src_dirfsp,
smb_fname_old,
- NULL, /* new_dirfsp */
smb_fname_new);
}
diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c
index dfcd05d2cae..ce7f59aa7b9 100644
--- a/source3/smbd/smb2_reply.c
+++ b/source3/smbd/smb2_reply.c
@@ -1386,7 +1386,6 @@ static NTSTATUS parent_dirname_compatible_open(connection_struct *conn,
NTSTATUS rename_internals_fsp(connection_struct *conn,
files_struct *fsp,
- struct files_struct *dst_dirfsp,
struct smb_filename *smb_fname_dst_in,
const char *dst_original_lcomp,
uint32_t attrs,
@@ -1848,7 +1847,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
struct smb_request *req,
struct files_struct *src_dirfsp,
struct smb_filename *smb_fname_src,
- struct files_struct *dst_dirfsp,
struct smb_filename *smb_fname_dst,
const char *dst_original_lcomp,
uint32_t attrs,
@@ -1938,7 +1936,6 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
status = rename_internals_fsp(conn,
fsp,
- dst_dirfsp,
smb_fname_dst,
dst_original_lcomp,
attrs,
diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c
index 23081a11e43..4b0c43f9341 100644
--- a/source3/smbd/smb2_trans2.c
+++ b/source3/smbd/smb2_trans2.c
@@ -3724,9 +3724,7 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
connection_struct *conn,
struct smb_request *req,
bool overwrite_if_exists,
- struct files_struct *old_dirfsp,
const struct smb_filename *smb_fname_old,
- struct files_struct *new_dirfsp,
struct smb_filename *smb_fname_new)
{
NTSTATUS status = NT_STATUS_OK;
@@ -4382,7 +4380,6 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
smb_fname_str_dbg(smb_fname_dst)));
status = rename_internals_fsp(conn,
fsp,
- NULL, /* dst_dirfsp */
smb_fname_dst,
dst_original_lcomp,
(FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM),
@@ -4472,9 +4469,7 @@ static NTSTATUS smb2_file_link_information(connection_struct *conn,
conn,
req,
overwrite,
- NULL, /* src_dirfsp */
fsp->fsp_name,
- dst_dirfsp, /* dst_dirfsp */
smb_fname_dst);
TALLOC_FREE(smb_fname_dst);
@@ -4570,9 +4565,7 @@ static NTSTATUS smb_file_link_information(connection_struct *conn,
conn,
req,
overwrite,
- NULL, /* src_dirfsp */
fsp->fsp_name,
- dst_dirfsp, /* dst_dirfsp */
smb_fname_dst);
TALLOC_FREE(smb_fname_dst);
@@ -4751,7 +4744,6 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
smb_fname_str_dbg(smb_fname_dst)));
status = rename_internals_fsp(conn,
fsp,
- dst_dirfsp,
smb_fname_dst,
dst_original_lcomp,
0,
@@ -4766,7 +4758,6 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
req,
NULL, /* src_dirfsp */
smb_fname_src,
- dst_dirfsp,
smb_fname_dst,
dst_original_lcomp,
0,
--
Samba Shared Repository
More information about the samba-cvs
mailing list