The branch, v4-23-test has been updated
       via  b3f2445aef4 vfs_fruit: psd->dacl can be NULL, use orig_num_aces
       via  441ad465dfc mdssvc: support a wider range of years [0000,9999] in 
$time.iso
      from  1bfd8466f65 ctdb: Fix ctdb startup with inconsistent cluster lock 
settings

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-23-test


- Log -----------------------------------------------------------------
commit b3f2445aef48e855f689de864d770fc2130f0ecc
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-23-test): Jule Anger <[email protected]>
    Autobuild-Date(v4-23-test): Wed Nov 26 11:26:55 UTC 2025 on atb-devel-224

commit 441ad465dfc6b0b34b81879ec8b677101f82fdf9
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 302d90ce997..4da7c1efa07 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

Reply via email to