The branch, v4-22-test has been updated
via baca60f9a22 vfs_fruit: psd->dacl can be NULL, use orig_num_aces
via 59200ef1002 mdssvc: support a wider range of years [0000,9999] in
$time.iso
from ac715e2e6b3 ctdb: Fix ctdb startup with inconsistent cluster lock
settings
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-22-test
- Log -----------------------------------------------------------------
commit baca60f9a2239e67fae84da252c62dc060edfbd6
Author: Ralph Boehme <[email protected]>
Date: Fri Nov 14 14:55:12 2025 +0100
vfs_fruit: psd->dacl can be NULL, use orig_num_aces
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15926
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Autobuild-User(master): Volker Lendecke <[email protected]>
Autobuild-Date(master): Tue Nov 18 10:13:44 UTC 2025 on atb-devel-224
(cherry picked from commit 0de67cf0748139920006a4dd65cb77c874c3595f)
Autobuild-User(v4-22-test): Jule Anger <[email protected]>
Autobuild-Date(v4-22-test): Wed Nov 26 12:51:16 UTC 2025 on atb-devel-224
commit 59200ef1002893af3601bc7812d375279729b116
Author: Ralph Boehme <[email protected]>
Date: Thu Nov 13 18:42:41 2025 +0100
mdssvc: support a wider range of years [0000,9999] in $time.iso
Most importantly use strtoll to allow negative numbers and use a filed width
with %Y in strftime() to parse years with less then four digits.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15947
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Douglas Bagnall <[email protected]>
Autobuild-User(master): Douglas Bagnall <[email protected]>
Autobuild-Date(master): Wed Nov 19 01:59:34 UTC 2025 on atb-devel-224
(cherry picked from commit 1b2b08bb7067852ad1bf8847b266baaab06905d7)
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_fruit.c | 2 +-
source3/rpc_server/mdssvc/es_parser.y | 9 +++++----
source3/rpc_server/mdssvc/test_mdsparser_es.c | 14 ++++++++++++++
3 files changed, 20 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 213d4cc3eeb..795f79ce09c 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -4655,7 +4655,7 @@ static NTSTATUS fruit_fset_nt_acl(vfs_handle_struct
*handle,
DBG_DEBUG("%s\n", fsp_str_dbg(fsp));
- if (config->ignore_zero_aces && (psd->dacl->num_aces == 0)) {
+ if (config->ignore_zero_aces && (orig_num_aces == 0)) {
/*
* Just ignore Set-ACL requests with zero ACEs.
*/
diff --git a/source3/rpc_server/mdssvc/es_parser.y
b/source3/rpc_server/mdssvc/es_parser.y
index 1f1c02ba1a5..267bc808091 100644
--- a/source3/rpc_server/mdssvc/es_parser.y
+++ b/source3/rpc_server/mdssvc/es_parser.y
@@ -494,15 +494,16 @@ static char *map_str(const struct es_attr_map *attr,
static char *map_sldate_to_esdate(TALLOC_CTX *mem_ctx,
const char *sldate)
{
+ char *endp = NULL;
struct tm *tm = NULL;
char *esdate = NULL;
char buf[21];
size_t len;
time_t t;
- int error;
- t = (time_t)smb_strtoull(sldate, NULL, 10, &error, SMB_STR_STANDARD);
- if (error != 0) {
+ errno = 0;
+ t = (time_t)strtoll(sldate, &endp, 10);
+ if (*sldate == '\0' || endp == sldate || *endp != '\0' || errno != 0) {
DBG_ERR("smb_strtoull [%s] failed\n", sldate);
return NULL;
}
@@ -515,7 +516,7 @@ static char *map_sldate_to_esdate(TALLOC_CTX *mem_ctx,
}
len = strftime(buf, sizeof(buf),
- "%Y-%m-%dT%H:%M:%SZ", tm);
+ "%4Y-%m-%dT%H:%M:%SZ", tm);
if (len != 20) {
DBG_ERR("strftime [%s] failed\n", sldate);
return NULL;
diff --git a/source3/rpc_server/mdssvc/test_mdsparser_es.c
b/source3/rpc_server/mdssvc/test_mdsparser_es.c
index 5015de82127..1de8a317930 100644
--- a/source3/rpc_server/mdssvc/test_mdsparser_es.c
+++ b/source3/rpc_server/mdssvc/test_mdsparser_es.c
@@ -53,6 +53,20 @@ static struct {
}, {
"kMDItemFSContentChangeDate==$time.iso(2018-10-01T10:00:00Z)",
"file.last_modified:2018\\\\-10\\\\-01T10\\\\:00\\\\:00Z"
+ }, {
+ "kMDItemFSContentChangeDate==$time.iso(1960-10-01T10:00:00Z)",
+ "file.last_modified:1960\\\\-10\\\\-01T10\\\\:00\\\\:00Z"
+#ifdef __LP64__
+ }, {
+ "kMDItemFSContentChangeDate==$time.iso(1000-10-01T10:00:00Z)",
+ "file.last_modified:1000\\\\-10\\\\-01T10\\\\:00\\\\:00Z"
+ }, {
+ "kMDItemFSContentChangeDate==$time.iso(0000-10-01T10:00:00Z)",
+ "file.last_modified:0000\\\\-10\\\\-01T10\\\\:00\\\\:00Z"
+ }, {
+ "kMDItemFSContentChangeDate==$time.iso(9999-10-01T10:00:00Z)",
+ "file.last_modified:9999\\\\-10\\\\-01T10\\\\:00\\\\:00Z"
+#endif
}, {
"kMDItemFSContentChangeDate==\"1\"",
"file.last_modified:2001\\\\-01\\\\-01T00\\\\:00\\\\:01Z"
--
Samba Shared Repository