The branch, master has been updated
via f5eb85e76fd s3/include: Remove unused BIG_UINT
via 93702174838 s3/libsmb: Use PULL_LE_U64 for BIG_UINT
via 0d68299cb76 s3/include: Remove unused SBIG_UINT
via e5803aa4237 s3/smbd: Convert smbd_do_qfsinfo() to use PUSH_LE_U64
via d73540bc825 s3/libsmb: Convert build_fs_quota_buffer() to use
PUSH_LE_U64
from 83f4b51175c s3:selftest: update aio_ratelimit tests for burst
support
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f5eb85e76fd32a43336f9d469eb47cb99bc627a9
Author: Anoop C S <[email protected]>
Date: Sun Mar 1 11:25:09 2026 +0530
s3/include: Remove unused BIG_UINT
Signed-off-by: Anoop C S <[email protected]>
Reviewed-by: Martin Schwenke <[email protected]>
Autobuild-User(master): Martin Schwenke <[email protected]>
Autobuild-Date(master): Sun Mar 1 11:18:37 UTC 2026 on atb-devel-224
commit 93702174838013f8e6475b8ee777b05659889c68
Author: Anoop C S <[email protected]>
Date: Sun Mar 1 11:23:52 2026 +0530
s3/libsmb: Use PULL_LE_U64 for BIG_UINT
Signed-off-by: Anoop C S <[email protected]>
Reviewed-by: Martin Schwenke <[email protected]>
commit 0d68299cb76111992f6a1598db3a0c2419ec8c16
Author: Anoop C S <[email protected]>
Date: Sun Mar 1 11:14:52 2026 +0530
s3/include: Remove unused SBIG_UINT
Signed-off-by: Anoop C S <[email protected]>
Reviewed-by: Martin Schwenke <[email protected]>
commit e5803aa42376ea6d480514731df40785ecc892a0
Author: Anoop C S <[email protected]>
Date: Sun Mar 1 11:13:29 2026 +0530
s3/smbd: Convert smbd_do_qfsinfo() to use PUSH_LE_U64
Signed-off-by: Anoop C S <[email protected]>
Reviewed-by: Martin Schwenke <[email protected]>
commit d73540bc82565a692288a4cd71131084091fb455
Author: Anoop C S <[email protected]>
Date: Sun Mar 1 11:12:21 2026 +0530
s3/libsmb: Convert build_fs_quota_buffer() to use PUSH_LE_U64
Signed-off-by: Anoop C S <[email protected]>
Reviewed-by: Martin Schwenke <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
source3/include/includes.h | 4 ----
source3/libsmb/cli_smb2_fnum.c | 6 ++---
source3/libsmb/clifile.c | 2 +-
source3/libsmb/clifsinfo.c | 18 +++++++-------
source3/libsmb/cliquota.c | 10 ++++----
source3/smbd/smb2_trans2.c | 54 ++++++++++++++++++++++--------------------
6 files changed, 46 insertions(+), 48 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/includes.h b/source3/include/includes.h
index b80683d4601..dcf526b5b2a 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -162,10 +162,6 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T;
#define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs))))
#endif
-/* TODO: remove this macros */
-#define SBIG_UINT(p, ofs, v) SBVAL(p, ofs, v)
-#define BIG_UINT(p, ofs) BVAL(p, ofs)
-
/*
* Set the define that tells us if we can do 64 bit
* NT SMB calls.
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index ce2b1552f47..6ab5d46f158 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -2711,9 +2711,9 @@ NTSTATUS cli_smb2_get_fs_full_size_info(struct cli_state
*cli,
goto fail;
}
- *total_allocation_units = BIG_UINT(outbuf.data, 0);
- *caller_allocation_units = BIG_UINT(outbuf.data, 8);
- *actual_allocation_units = BIG_UINT(outbuf.data, 16);
+ *total_allocation_units = PULL_LE_U64(outbuf.data, 0);
+ *caller_allocation_units = PULL_LE_U64(outbuf.data, 8);
+ *actual_allocation_units = PULL_LE_U64(outbuf.data, 16);
*sectors_per_allocation_unit = (uint64_t)IVAL(outbuf.data, 24);
*bytes_per_sector = (uint64_t)IVAL(outbuf.data, 28);
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 981829c0e37..6ef84bb3748 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -880,7 +880,7 @@ static void cli_posix_stat_done(struct tevent_req *subreq)
sbuf->st_ex_mode |= wire_perms_to_unix(IVAL(data, 84));
/* number of hard links */
- sbuf->st_ex_nlink = BIG_UINT(data, 92);
+ sbuf->st_ex_nlink = PULL_LE_U64(data, 92);
tevent_req_done(req);
}
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index ded07f21a9a..e73885e3e42 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -467,13 +467,13 @@ NTSTATUS cli_get_fs_full_size_info(struct cli_state *cli,
}
if (total_allocation_units) {
- *total_allocation_units = BIG_UINT(rdata, 0);
+ *total_allocation_units = PULL_LE_U64(rdata, 0);
}
if (caller_allocation_units) {
- *caller_allocation_units = BIG_UINT(rdata,8);
+ *caller_allocation_units = PULL_LE_U64(rdata, 8);
}
if (actual_allocation_units) {
- *actual_allocation_units = BIG_UINT(rdata,16);
+ *actual_allocation_units = PULL_LE_U64(rdata, 16);
}
if (sectors_per_allocation_unit) {
*sectors_per_allocation_unit = IVAL(rdata,24);
@@ -572,12 +572,12 @@ static void cli_get_posix_fs_info_done(struct tevent_req
*subreq)
state->optimal_transfer_size = IVAL(data, 0);
state->block_size = IVAL(data,4);
- state->total_blocks = BIG_UINT(data,8);
- state->blocks_available = BIG_UINT(data,16);
- state->user_blocks_available = BIG_UINT(data,24);
- state->total_file_nodes = BIG_UINT(data,32);
- state->free_file_nodes = BIG_UINT(data,40);
- state->fs_identifier = BIG_UINT(data,48);
+ state->total_blocks = PULL_LE_U64(data, 8);
+ state->blocks_available = PULL_LE_U64(data, 16);
+ state->user_blocks_available = PULL_LE_U64(data, 24);
+ state->total_file_nodes = PULL_LE_U64(data, 32);
+ state->free_file_nodes = PULL_LE_U64(data, 40);
+ state->fs_identifier = PULL_LE_U64(data, 48);
TALLOC_FREE(data);
tevent_req_done(req);
}
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 544d1be67df..0f38c275792 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -225,15 +225,15 @@ NTSTATUS build_fs_quota_buffer(TALLOC_CTX *mem_ctx,
buf = blob->data;
/* Unknown1 24 NULL bytes*/
- SBIG_UINT(buf, 0, (uint64_t)0);
- SBIG_UINT(buf, 8, (uint64_t)0);
- SBIG_UINT(buf, 16, (uint64_t)0);
+ PUSH_LE_U64(buf, 0, 0);
+ PUSH_LE_U64(buf, 8, 0);
+ PUSH_LE_U64(buf, 16, 0);
/* Default Soft Quota 8 bytes */
- SBIG_UINT(buf, 24, pqt->softlim);
+ PUSH_LE_U64(buf, 24, pqt->softlim);
/* Default Hard Quota 8 bytes */
- SBIG_UINT(buf, 32, pqt->hardlim);
+ PUSH_LE_U64(buf, 32, pqt->hardlim);
/* Quota flag 4 bytes */
SIVAL(buf, 40, pqt->qflags);
diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c
index f1aa9848f0e..96d8746f900 100644
--- a/source3/smbd/smb2_trans2.c
+++ b/source3/smbd/smb2_trans2.c
@@ -2211,8 +2211,8 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn,
bytes_per_sector,
dsize,
dfree);
- SBIG_UINT(pdata,0,dsize);
- SBIG_UINT(pdata,8,dfree);
+ PUSH_LE_U64(pdata, 0, dsize);
+ PUSH_LE_U64(pdata, 8, dfree);
SIVAL(pdata,16,sectors_per_unit);
SIVAL(pdata,20,bytes_per_sector);
*fixed_portion = 24;
@@ -2252,9 +2252,9 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn,
bytes_per_sector,
dsize,
dfree);
- SBIG_UINT(pdata,0,dsize); /* Total Allocation units. */
- SBIG_UINT(pdata,8,dfree); /* Caller available
allocation units. */
- SBIG_UINT(pdata,16,dfree); /* Actual available
allocation units. */
+ PUSH_LE_U64(pdata, 0, dsize); /* Total Allocation
units. */
+ PUSH_LE_U64(pdata, 8, dfree); /* Caller available
allocation units. */
+ PUSH_LE_U64(pdata, 16, dfree); /* Actual available
allocation units. */
SIVAL(pdata,24,sectors_per_unit); /* Sectors per
allocation unit. */
SIVAL(pdata,28,bytes_per_sector); /* Bytes per sector.
*/
*fixed_portion = 32;
@@ -2329,15 +2329,15 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection
*xconn,
lp_servicename(talloc_tos(), lp_sub,
SNUM(conn))));
/* Unknown1 24 NULL bytes*/
- SBIG_UINT(pdata,0,(uint64_t)0);
- SBIG_UINT(pdata,8,(uint64_t)0);
- SBIG_UINT(pdata,16,(uint64_t)0);
+ PUSH_LE_U64(pdata, 0, 0);
+ PUSH_LE_U64(pdata, 8, 0);
+ PUSH_LE_U64(pdata, 16, 0);
/* Default Soft Quota 8 bytes */
- SBIG_UINT(pdata,24,quotas.softlim);
+ PUSH_LE_U64(pdata, 24, quotas.softlim);
/* Default Hard Quota 8 bytes */
- SBIG_UINT(pdata,32,quotas.hardlim);
+ PUSH_LE_U64(pdata, 32, quotas.hardlim);
/* Quota flag 2 bytes */
SSVAL(pdata,40,quotas.qflags);
@@ -2358,7 +2358,9 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn,
SIVAL(pdata,16,extended_info.samba_magic);
SIVAL(pdata,20,extended_info.samba_version);
SIVAL(pdata,24,extended_info.samba_subversion);
- SBIG_UINT(pdata,28,extended_info.samba_gitcommitdate);
+ PUSH_LE_U64(pdata,
+ 28,
+ extended_info.samba_gitcommitdate);
memcpy(pdata+36,extended_info.samba_version_string,28);
data_len = 64;
break;
@@ -2450,16 +2452,18 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection
*xconn,
/* We have POSIX ACLs, pathname, encryption,
* large read/write, and locking capability. */
- SBIG_UINT(pdata,4,((uint64_t)(
- CIFS_UNIX_POSIX_ACLS_CAP|
- CIFS_UNIX_POSIX_PATHNAMES_CAP|
- CIFS_UNIX_FCNTL_LOCKS_CAP|
- CIFS_UNIX_EXTATTR_CAP|
- CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP|
- encrypt_caps|
- (large_read ? CIFS_UNIX_LARGE_READ_CAP
: 0) |
- (large_write ?
- CIFS_UNIX_LARGE_WRITE_CAP : 0))));
+ PUSH_LE_U64(pdata,
+ 4,
+ CIFS_UNIX_POSIX_ACLS_CAP |
+ CIFS_UNIX_POSIX_PATHNAMES_CAP |
+ CIFS_UNIX_FCNTL_LOCKS_CAP |
+ CIFS_UNIX_EXTATTR_CAP |
+ CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP |
+ encrypt_caps |
+ (large_read ?
+ CIFS_UNIX_LARGE_READ_CAP : 0) |
+ (large_write ?
+ CIFS_UNIX_LARGE_WRITE_CAP : 0));
break;
}
#endif
@@ -2544,8 +2548,8 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn,
SIVAL(pdata, 0, flags);
SIVAL(pdata, 4, SMB_WHOAMI_MASK);
- SBIG_UINT(pdata, 8, (uint64_t)utok->uid);
- SBIG_UINT(pdata, 16, (uint64_t)utok->gid);
+ PUSH_LE_U64(pdata, 8, utok->uid);
+ PUSH_LE_U64(pdata, 16, utok->gid);
if (data_len >= max_data_bytes) {
/* Potential overflow, skip the GIDs and SIDs.
*/
@@ -2580,9 +2584,7 @@ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn,
/* GID list */
for (i = 0; i < utok->ngroups; ++i) {
- SBIG_UINT(pdata,
- data_len,
- (uint64_t)utok->groups[i]);
+ PUSH_LE_U64(pdata, data_len, utok->groups[i]);
data_len += 8;
}
--
Samba Shared Repository