The branch, master has been updated
       via  963d54c8ee2 libcli: Fix a signed/unsigned comparison warning
       via  0045975c9e4 libcli: Use dom_sid_dup() instead of talloc_memdup()
       via  b3db4d66d96 libcli: Apply a little const
       via  aede32aed11 libcli: Fix a typo
       via  c708407be5b libcli: Fix whitespace
       via  24ef76e9603 libcli: Avoid an unnecessary "else"
       via  8327539651a smbd: Modernize DEBUGs
       via  2af389de9ab smbd: Simplify smb_set_posix_lock()
       via  824a70fe898 smbd: Simplify smb_file_position_information()
       via  e868e6c2f16 smbd: Simplify smb_file_position_information()
       via  ef7ff7286fc smbd: Simplify smb_set_file_allocation_info()
       via  e9c14626ace smbd: Simplify smb_set_file_allocation_info()
       via  38c59f7840a smbd: Simplify smb_set_info_standard()
       via  ae97ebd9bc5 smbd: Simplify smbd_smb2_query_directory_send()
       via  82f2ce43fd8 smbd: Remove a pointless comment
       via  a129fcd6971 pdbedit: Avoid a use of convert_time_t_to_uint32_t()
       via  3a4260cb7b6 libndr: Apply const to the ndr_print_* functions's void 
*
       via  32c492e8516 smbd: TALLOC_FREE(sd) where it was allocated
       via  ae7e1cb053c smbd: Avoid a cast
       via  421cab80d89 printing: Fix Coverity ID 1508942 Use of 32-bit time_t
       via  81253373c8d printing: Fix Coverity ID 1509000 Use of 32-bit time_t
       via  a14fa71db5a lib: Simplify smbconf_txt_load_file()
       via  edc1f99ffa2 lib: Move some R/W "data" segment to R/O "text"
       via  9558cb6ef6f net: Fix Coverity ID 1509022 Use of 32-bit time_t
       via  6421b82c1d1 libndr: Fix Coverity ID 1509020 Use of 32-bit time_t
       via  deea7792ad3 rpcclient: Fix Coverity ID 1509018 Use of 32-bit time_t
       via  370f1d932e8 passdb: Fix Coverity ID 1509016 Use of 32-bit time_t
       via  3001df69892 libsmb: Fix Coverity ID 1509012 Use of 32-bit time_t
       via  177c35604b3 pdb_ldap: Fix Coverity ID 1508985 Use of 32-bit time_t
      from  fe96aa111cd s4:smbtorture: Fix samba3.smb.dir on btrfs

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 963d54c8ee257e383b71bd32d41744a9764c4776
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 28 12:19:27 2024 +0100

    libcli: Fix a signed/unsigned comparison warning
    
    With this we compare pointers, not numbers
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>
    
    Autobuild-User(master): Martin Schwenke <mart...@samba.org>
    Autobuild-Date(master): Mon Dec  2 05:52:56 UTC 2024 on atb-devel-224

commit 0045975c9e4c58356ace19328e59f5af094f162c
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 28 12:09:50 2024 +0100

    libcli: Use dom_sid_dup() instead of talloc_memdup()
    
    We have specialized code for this, why not use it...
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit b3db4d66d96e8224272b80dcbe492246e1a41806
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 28 12:02:55 2024 +0100

    libcli: Apply a little const
    
    Probably does not matter code-wise, but looks nicer to me.
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit aede32aed11b817a35a8ad387cb468ad4ab8b38b
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 28 11:24:04 2024 +0100

    libcli: Fix a typo
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit c708407be5bcb316b7dc032e2547054e2d92bca0
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 28 11:23:44 2024 +0100

    libcli: Fix whitespace
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 24ef76e96034c7d6647c9afb50d384365bdb4660
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 28 09:47:20 2024 +0100

    libcli: Avoid an unnecessary "else"
    
    We return in the error case anyway
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 8327539651a210f7072045cabc3a8b2eae975cf4
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 14:01:18 2024 +0100

    smbd: Modernize DEBUGs
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 2af389de9abca5c701b20f157152bdea675a547b
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 16:38:53 2024 +0100

    smbd: Simplify smb_set_posix_lock()
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 824a70fe89821d8a09751077e05a562ef5e40afc
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 16:35:10 2024 +0100

    smbd: Simplify smb_file_position_information()
    
    We've asserted fsp!=NULL in the caller
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit e868e6c2f1697eda6a42ae79ebf7828099a7801d
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 16:34:39 2024 +0100

    smbd: Simplify smb_file_position_information()
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit ef7ff7286fcc28d17220756db6d744b6dea0af7e
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 16:32:18 2024 +0100

    smbd: Simplify smb_set_file_allocation_info()
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit e9c14626acef7869b70d1dc05375ce77d464c3ac
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 16:23:19 2024 +0100

    smbd: Simplify smb_set_file_allocation_info()
    
    We've asserted fsp!=NULL in the caller
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 38c59f7840ad9c6a1ce48109f250220713f9757a
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 16:16:02 2024 +0100

    smbd: Simplify smb_set_info_standard()
    
    We've asserted fsp!=NULL in the caller
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit ae97ebd9bc5408f15a9a78fd467a210af38c2029
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 15:58:32 2024 +0100

    smbd: Simplify smbd_smb2_query_directory_send()
    
    We don't need to call strcmp() to find an empty string.
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 82f2ce43fd8412de82446ef6a09db3626c29bdad
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 23 14:14:47 2024 +0100

    smbd: Remove a pointless comment
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit a129fcd6971c4b748eaf180708551c69565b7f4b
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Nov 16 13:32:20 2024 +0100

    pdbedit: Avoid a use of convert_time_t_to_uint32_t()
    
    We should avoid converting time_t to 32 bit wherever possible
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 3a4260cb7b6b7dce44178abba9a22412167dbd48
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Nov 24 14:16:06 2024 +0100

    libndr: Apply const to the ndr_print_* functions's void *
    
    ndr_print_fn_t has a const void *, so we can extend this to the
    callers. Keep ABI at 6.0.0, 4.21 is 5.0.0 and 4.22 is not there yet.
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 32c492e8516ba17ad7e411e24169bf4e5498aed7
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Nov 24 12:05:39 2024 +0100

    smbd: TALLOC_FREE(sd) where it was allocated
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit ae7e1cb053c5b97895cb6a5498731bd3d42563e6
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Nov 24 12:04:05 2024 +0100

    smbd: Avoid a cast
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 421cab80d891d55840e7f1b5bb3503a6ee663d79
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 15:03:51 2024 +0100

    printing: Fix Coverity ID 1508942 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 81253373c8d3fc586af7834a743106bf3cd543ed
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 14:46:29 2024 +0100

    printing: Fix Coverity ID 1509000 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit a14fa71db5af891a6c34c8f7d8d730689bd0021c
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Nov 22 11:13:34 2024 +0100

    lib: Simplify smbconf_txt_load_file()
    
    file_modtime() returns errno, so we can skip the racy file_exist()
    call.
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit edc1f99ffa2942a55c1801d0b882a70962dcfb89
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Nov 22 10:22:11 2024 +0100

    lib: Move some R/W "data" segment to R/O "text"
    
    Doesn't really matter for tests, but I just came across it.
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 9558cb6ef6fae272593ef22df5250083fe0b6fbf
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 18:22:27 2024 +0100

    net: Fix Coverity ID 1509022 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 6421b82c1d171e203d0ab3965170a1501d87f1e7
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 18:21:13 2024 +0100

    libndr: Fix Coverity ID 1509020 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit deea7792ad335b4c3c8f69b532bbbc8e70d22347
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 18:19:31 2024 +0100

    rpcclient: Fix Coverity ID 1509018 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 370f1d932e88f02b6802018f0e9d3395c8db8bbb
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 18:17:53 2024 +0100

    passdb: Fix Coverity ID 1509016 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 3001df69892aca4a97da06b5e02984e5a380ce0f
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 18:14:37 2024 +0100

    libsmb: Fix Coverity ID 1509012 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

commit 177c35604b3afee38186235363796527c800abb9
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Nov 21 18:09:54 2024 +0100

    pdb_ldap: Fix Coverity ID 1508985 Use of 32-bit time_t
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Martin Schwenke <mar...@meltin.net>

-----------------------------------------------------------------------

Summary of changes:
 lib/smbconf/smbconf_txt.c               |  8 ++---
 lib/util/charset/tests/convert_string.c | 36 ++++++++++-----------
 libcli/security/claims-conversions.c    |  2 +-
 libcli/security/create_descriptor.c     | 56 +++++++++++++++++---------------
 libcli/security/sddl_conditional_ace.c  |  3 +-
 libcli/security/security_descriptor.h   | 23 +++++++------
 librpc/ABI/ndr-6.0.0.sigs               | 16 ++++-----
 librpc/ndr/libndr.h                     | 39 +++++++++++++++++-----
 librpc/ndr/ndr.c                        | 34 +++++++++++++++-----
 librpc/ndr/ndr_basic.c                  |  2 +-
 source3/libsmb/namequery.c              |  6 ++--
 source3/passdb/passdb.c                 |  7 ++--
 source3/passdb/pdb_ldap.c               |  4 +--
 source3/printing/printing.c             | 21 +++++++-----
 source3/rpcclient/cmd_samr.c            |  4 +--
 source3/smbd/dir.c                      |  9 +++---
 source3/smbd/file_access.c              |  5 ++-
 source3/smbd/filename.c                 |  1 -
 source3/smbd/open.c                     | 22 ++++++-------
 source3/smbd/smb1_trans2.c              |  6 ++--
 source3/smbd/smb2_query_directory.c     |  2 +-
 source3/smbd/smb2_trans2.c              | 57 ++++++++++++---------------------
 source3/utils/net_rpc_sh_acct.c         |  4 +--
 source3/utils/pdbedit.c                 |  4 +--
 24 files changed, 203 insertions(+), 168 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/smbconf/smbconf_txt.c b/lib/smbconf/smbconf_txt.c
index 70a35ec4304..f090430b348 100644
--- a/lib/smbconf/smbconf_txt.c
+++ b/lib/smbconf/smbconf_txt.c
@@ -187,12 +187,12 @@ static sbcErr smbconf_txt_load_file(struct smbconf_ctx 
*ctx)
        int rc;
        struct timespec mt = {0};
 
-       if (!file_exist(ctx->path)) {
-               return SBC_ERR_BADFILE;
-       }
-
        rc = file_modtime(ctx->path, &mt);
        if (rc != 0) {
+               if (rc == ENOENT) {
+                       return SBC_ERR_BADFILE;
+               }
+
                /*
                 * Not worth mapping errno returned
                 * in rc to SBC_ERR_XXX. Just assume
diff --git a/lib/util/charset/tests/convert_string.c 
b/lib/util/charset/tests/convert_string.c
index 6400ce15625..de38d81521c 100644
--- a/lib/util/charset/tests/convert_string.c
+++ b/lib/util/charset/tests/convert_string.c
@@ -34,13 +34,13 @@ struct torture_suite *torture_local_string_case(TALLOC_CTX 
*mem_ctx);
  * 
http://en.wikipedia.org/w/index.php?title=Ancient_Greek&oldid=421361065#Example_text
  */
 
-const char *plato_english_ascii =
+static const char plato_english_ascii[] =
        "What you, men of Athens, have learned from my accusers, I do not"
        " know: but I, for my part, nearly forgot who I was thanks to them 
since"
        " they spoke so persuasively. And yet, of the truth, they have spoken,"
        " one might say, nothing at all.";
 
-const char *plato_english_utf16le_base64 =
+static const char plato_english_utf16le_base64[] =
        
"VwBoAGEAdAAgAHkAbwB1ACwAIABtAGUAbgAgAG8AZgAgAEEAdABoAGUAbgBzACwAIABoAGEAdgBl"
        
"ACAAbABlAGEAcgBuAGUAZAAgAGYAcgBvAG0AIABtAHkAIABhAGMAYwB1AHMAZQByAHMALAAgAEkA"
        
"IABkAG8AIABuAG8AdAAgAGsAbgBvAHcAOgAgAGIAdQB0ACAASQAsACAAZgBvAHIAIABtAHkAIABw"
@@ -51,7 +51,7 @@ const char *plato_english_utf16le_base64 =
        
"AGsAZQBuACwAIABvAG4AZQAgAG0AaQBnAGgAdAAgAHMAYQB5ACwAIABuAG8AdABoAGkAbgBnACAA"
        "YQB0ACAAYQBsAGwALgA=";
 
-static const char *plato_utf8_base64 =
+static const char plato_utf8_base64[] =
        
"4b2Nz4TOuSDOvOG9ss69IOG9kc68zrXhv5bPgiwg4b2mIOG8hM69zrTPgc61z4IgzobOuM63zr3O"
        
"seG/ls6/zrksIM+AzrXPgM+Mzr3OuM6xz4TOtSDhvZHPgOG9uCDPhOG/ts69IOG8kM684b+2zr0g"
        
"zrrOsc+EzrfOs8+Mz4HPic69LCDOv+G9kM66IM6/4by2zrTOsTog4byQzrPhvbwgzrQnIM6/4b2W"
@@ -61,7 +61,7 @@ static const char *plato_utf8_base64 =
        
"4b2hz4Ig4byUz4DOv8+CIM614bywz4DOteG/ls69IM6/4b2QzrThvbLOvSDOteG8sM+Bzq7Ous6x"
        "z4POuc69Lg==";
 
-static const char *plato_utf16le_base64 =
+static const char plato_utf16le_base64[] =
        
"TR/EA7kDIAC8A3IfvQMgAFEfvAO1A9YfwgMsACAAZh8gAAQfvQO0A8EDtQPCAyAAhgO4A7cDvQOx"
        
"A9YfvwO5AywAIADAA7UDwAPMA70DuAOxA8QDtQMgAFEfwAN4HyAAxAP2H70DIAAQH7wD9h+9AyAA"
        
"ugOxA8QDtwOzA8wDwQPJA70DLAAgAL8DUB+6AyAAvwM2H7QDsQM6ACAAEB+zA3wfIAC0AycAIAC/"
@@ -71,14 +71,14 @@ static const char *plato_utf16le_base64 =
        
"swO1AyAAYR/CAyAAFB/AA78DwgMgALUDMB/AA7UD1h+9AyAAvwNQH7QDch+9AyAAtQMwH8EDrgO6"
        "A7EDwwO5A70DLgA=";
 
-static const char *plato_latin_utf8_base64 =
+static const char plato_latin_utf8_base64[] =
        
"SMOzdGkgbcOobiBodW1lw65zLCDDtCDDoW5kcmVzIEF0aMSTbmHDrm9pLCBwZXDDs250aGF0ZSBo"
        
"dXDDsiB0w7RuIGVtw7RuIGthdMSTZ8OzcsWNbiwgb3VrIG/DrmRhOiBlZ+G5kSBkJyBvw7tuIGth"
        
"w6wgYXV0w7JzIGh1cCcgYXV0xY1uIG9sw61nb3UgZW1hdXRvw7sgZXBlbGF0aMOzbcSTbiwgaG/D"
        
"unTFjSBwaXRoYW7DtHMgw6lsZWdvbi4gS2HDrXRvaSBhbMSTdGjDqXMgZ2UgaMWNcyDDqXBvcyBl"
        "aXBlw65uIG91ZMOobiBlaXLhuJdrYXNpbi4=";
 
-static const char *plato_latin_utf16le_base64 =
+static const char plato_latin_utf16le_base64[] =
        
"SADzAHQAaQAgAG0A6ABuACAAaAB1AG0AZQDuAHMALAAgAPQAIADhAG4AZAByAGUAcwAgAEEAdABo"
        
"ABMBbgBhAO4AbwBpACwAIABwAGUAcADzAG4AdABoAGEAdABlACAAaAB1AHAA8gAgAHQA9ABuACAA"
        
"ZQBtAPQAbgAgAGsAYQB0ABMBZwDzAHIATQFuACwAIABvAHUAawAgAG8A7gBkAGEAOgAgAGUAZwBR"
@@ -88,25 +88,25 @@ static const char *plato_latin_utf16le_base64 =
        
"aQAgAGEAbAATAXQAaADpAHMAIABnAGUAIABoAE0BcwAgAOkAcABvAHMAIABlAGkAcABlAO4AbgAg"
        "AG8AdQBkAOgAbgAgAGUAaQByABceawBhAHMAaQBuAC4A";
 
-static const char *gd_utf8_base64 = "R8O8bnRoZXIgRGVzY2huZXI=";
-static const char *gd_utf8_upper_base64 = "R8OcTlRIRVIgREVTQ0hORVI=";
-static const char *gd_utf8_lower_base64 = "Z8O8bnRoZXIgZGVzY2huZXI=";
-static const char *gd_cp850_base64 = "R4FudGhlciBEZXNjaG5lcg==";
-static const char *gd_cp850_upper_base64 = "R5pOVEhFUiBERVNDSE5FUg==";
-static const char *gd_cp850_lower_base64 = "Z4FudGhlciBkZXNjaG5lcg==";
-static const char *gd_iso8859_1_base64 = "R/xudGhlciBEZXNjaG5lcg==";
-static const char *gd_utf16le_base64 = 
"RwD8AG4AdABoAGUAcgAgAEQAZQBzAGMAaABuAGUAcgA=";
+static const char gd_utf8_base64[] = "R8O8bnRoZXIgRGVzY2huZXI=";
+static const char gd_utf8_upper_base64[] = "R8OcTlRIRVIgREVTQ0hORVI=";
+static const char gd_utf8_lower_base64[] = "Z8O8bnRoZXIgZGVzY2huZXI=";
+static const char gd_cp850_base64[] = "R4FudGhlciBEZXNjaG5lcg==";
+static const char gd_cp850_upper_base64[] = "R5pOVEhFUiBERVNDSE5FUg==";
+static const char gd_cp850_lower_base64[] = "Z4FudGhlciBkZXNjaG5lcg==";
+static const char gd_iso8859_1_base64[] = "R/xudGhlciBEZXNjaG5lcg==";
+static const char gd_utf16le_base64[] = 
"RwD8AG4AdABoAGUAcgAgAEQAZQBzAGMAaABuAGUAcgA=";
 /* täst */
-static const char *utf8_nfc_base64 = "dMOkc3QA";
+static const char utf8_nfc_base64[] = "dMOkc3QA";
 /* täst, where ä = a + combining diaeresis */
-static const char *utf8_nfd_base64 = "dGHMiHN0AA==";
+static const char utf8_nfd_base64[] = "dGHMiHN0AA==";
 
 /*
  * These cp850 bytes correspond to high Unicode codes, stretching out to
  * 3-byte sequences in utf-8.
  */
-static const char *cp850_high_points = "\xb9\xba\xbb\xbc\xcd\xce";
-static const char *utf8_high_points = "╣║╗╝═╬";
+static const char cp850_high_points[] = "\xb9\xba\xbb\xbc\xcd\xce";
+static const char utf8_high_points[] = "╣║╗╝═╬";
 
 static bool test_cp850_high_points(struct torture_context *tctx)
 {
diff --git a/libcli/security/claims-conversions.c 
b/libcli/security/claims-conversions.c
index 50b21f3085b..6983cb36f06 100644
--- a/libcli/security/claims-conversions.c
+++ b/libcli/security/claims-conversions.c
@@ -135,7 +135,7 @@ static bool blob_string_sid_to_sid(DATA_BLOB *blob,
                return false;
        }
 
-       if (end - str != len) {
+       if (str + len != end) {
                return false;
        }
        return true;
diff --git a/libcli/security/create_descriptor.c 
b/libcli/security/create_descriptor.c
index 4db23bede18..d8575f59b8b 100644
--- a/libcli/security/create_descriptor.c
+++ b/libcli/security/create_descriptor.c
@@ -105,9 +105,9 @@ static bool object_in_list(const struct GUID *object_list, 
const struct GUID *ob
        return false;
 }
 
-/* returns true if the ACE gontains generic information
+/* returns true if the ACE contains generic information
  * that needs to be processed additionally */
- 
+
 static bool desc_ace_has_generic(const struct security_ace *ace)
 {
        if (ace->access_mask & SEC_GENERIC_ALL || ace->access_mask & 
SEC_GENERIC_READ ||
@@ -124,8 +124,8 @@ static bool desc_ace_has_generic(const struct security_ace 
*ace)
 /* creates an ace in which the generic information is expanded */
 
 static void desc_expand_generic(struct security_ace *new_ace,
-                               struct dom_sid *owner,
-                               struct dom_sid *group)
+                               const struct dom_sid *owner,
+                               const struct dom_sid *group)
 {
        new_ace->access_mask = map_generic_rights_ds(new_ace->access_mask);
        if (dom_sid_equal(&new_ace->trustee, &global_sid_Creator_Owner)) {
@@ -137,12 +137,13 @@ static void desc_expand_generic(struct security_ace 
*new_ace,
        new_ace->flags = 0x0;
 }
 
-static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX 
*mem_ctx,
-                                                           struct security_acl 
*acl,
-                                                           bool is_container,
-                                                           struct dom_sid 
*owner,
-                                                           struct dom_sid 
*group,
-                                                           struct GUID 
*object_list)
+static struct security_acl *calculate_inherited_from_parent(
+       TALLOC_CTX *mem_ctx,
+       struct security_acl *acl,
+       bool is_container,
+       const struct dom_sid *owner,
+       const struct dom_sid *group,
+       struct GUID *object_list)
 {
        uint32_t i;
        struct security_acl *tmp_acl = NULL;
@@ -408,8 +409,8 @@ static struct security_acl 
*calculate_inherited_from_parent(TALLOC_CTX *mem_ctx,
 static struct security_acl *process_user_acl(TALLOC_CTX *mem_ctx,
                                             struct security_acl *acl,
                                             bool is_container,
-                                            struct dom_sid *owner,
-                                            struct dom_sid *group,
+                                            const struct dom_sid *owner,
+                                            const struct dom_sid *group,
                                             struct GUID *object_list,
                                             bool is_protected)
 {
@@ -599,20 +600,23 @@ static bool compute_acl(struct security_descriptor 
*parent_sd,
        return true;
 }
 
-struct security_descriptor *create_security_descriptor(TALLOC_CTX *mem_ctx,
-                                                      struct 
security_descriptor *parent_sd,
-                                                      struct 
security_descriptor *creator_sd,
-                                                      bool is_container,
-                                                      struct GUID *object_list,
-                                                      uint32_t inherit_flags,
-                                                      struct security_token 
*token,
-                                                      struct dom_sid 
*default_owner, /* valid only for DS, NULL for the other RSs */
-                                                      struct dom_sid 
*default_group, /* valid only for DS, NULL for the other RSs */
-                                                      uint32_t 
(*generic_map)(uint32_t access_mask))
+struct security_descriptor *create_security_descriptor(
+       TALLOC_CTX *mem_ctx,
+       struct security_descriptor *parent_sd,
+       struct security_descriptor *creator_sd,
+       bool is_container,
+       struct GUID *object_list,
+       uint32_t inherit_flags,
+       struct security_token *token,
+       const struct dom_sid
+               *default_owner, /* valid only for DS, NULL for the other RSs */
+       const struct dom_sid
+               *default_group, /* valid only for DS, NULL for the other RSs */
+       uint32_t (*generic_map)(uint32_t access_mask))
 {
        struct security_descriptor *new_sd;
-       struct dom_sid *new_owner = NULL;
-       struct dom_sid *new_group = NULL;
+       const struct dom_sid *new_owner = NULL;
+       const struct dom_sid *new_group = NULL;
 
        new_sd = security_descriptor_initialise(mem_ctx);
        if (!new_sd) {
@@ -648,8 +652,8 @@ struct security_descriptor 
*create_security_descriptor(TALLOC_CTX *mem_ctx,
                new_group = creator_sd->group_sid;
        }
 
-       new_sd->owner_sid = talloc_memdup(new_sd, new_owner, sizeof(struct 
dom_sid));
-       new_sd->group_sid = talloc_memdup(new_sd, new_group, sizeof(struct 
dom_sid));
+       new_sd->owner_sid = dom_sid_dup(new_sd, new_owner);
+       new_sd->group_sid = dom_sid_dup(new_sd, new_group);
        if (!new_sd->owner_sid || !new_sd->group_sid){
                talloc_free(new_sd);
                return NULL;
diff --git a/libcli/security/sddl_conditional_ace.c 
b/libcli/security/sddl_conditional_ace.c
index 62323a300a0..0d2d4d041dc 100644
--- a/libcli/security/sddl_conditional_ace.c
+++ b/libcli/security/sddl_conditional_ace.c
@@ -2053,9 +2053,8 @@ static bool parse_sid(struct 
ace_condition_sddl_compiler_context *comp)
            comp->sddl[comp->offset + 3] != '(') {
                comp_error(comp, "malformed SID() constructor");
                return false;
-       } else {
-               comp->offset += 4;
        }
+       comp->offset += 4;
 
        sidstr = comp->sddl + comp->offset;
 
diff --git a/libcli/security/security_descriptor.h 
b/libcli/security/security_descriptor.h
index 6ff365fe543..5b8aec606f4 100644
--- a/libcli/security/security_descriptor.h
+++ b/libcli/security/security_descriptor.h
@@ -84,16 +84,19 @@ struct security_acl *security_acl_concatenate(TALLOC_CTX 
*mem_ctx,
 
 uint32_t map_generic_rights_ds(uint32_t access_mask);
 
-struct security_descriptor *create_security_descriptor(TALLOC_CTX *mem_ctx,
-                                                      struct 
security_descriptor *parent_sd,
-                                                      struct 
security_descriptor *creator_sd,
-                                                      bool is_container,
-                                                      struct GUID *object_list,
-                                                      uint32_t inherit_flags,
-                                                      struct security_token 
*token,
-                                                      struct dom_sid 
*default_owner, /* valid only for DS, NULL for the other RSs */
-                                                      struct dom_sid 
*default_group, /* valid only for DS, NULL for the other RSs */
-                                                      uint32_t 
(*generic_map)(uint32_t access_mask));
+struct security_descriptor *create_security_descriptor(
+       TALLOC_CTX *mem_ctx,
+       struct security_descriptor *parent_sd,
+       struct security_descriptor *creator_sd,
+       bool is_container,
+       struct GUID *object_list,
+       uint32_t inherit_flags,
+       struct security_token *token,
+       const struct dom_sid
+               *default_owner, /* valid only for DS, NULL for the other RSs */
+       const struct dom_sid
+               *default_group, /* valid only for DS, NULL for the other RSs */
+       uint32_t (*generic_map)(uint32_t access_mask));
 
 bool security_descriptor_with_ms_nfs(const struct security_descriptor *psd);
 
diff --git a/librpc/ABI/ndr-6.0.0.sigs b/librpc/ABI/ndr-6.0.0.sigs
index 7c672a1bf51..ed433a50b4c 100644
--- a/librpc/ABI/ndr-6.0.0.sigs
+++ b/librpc/ABI/ndr-6.0.0.sigs
@@ -42,15 +42,15 @@ ndr_print_array_uint8: void (struct ndr_print *, const char 
*, const uint8_t *,
 ndr_print_bad_level: void (struct ndr_print *, const char *, uint16_t)
 ndr_print_bitmap_flag: void (struct ndr_print *, size_t, const char *, 
uint32_t, uint32_t)
 ndr_print_bool: void (struct ndr_print *, const char *, const bool)
-ndr_print_debug: bool (int, ndr_print_fn_t, const char *, void *, const char 
*, const char *)
+ndr_print_debug: bool (int, ndr_print_fn_t, const char *, const void *, const 
char *, const char *)
 ndr_print_debug_helper: void (struct ndr_print *, const char *, ...)
-ndr_print_debugc: void (int, ndr_print_fn_t, const char *, void *)
+ndr_print_debugc: void (int, ndr_print_fn_t, const char *, const void *)
 ndr_print_debugc_helper: void (struct ndr_print *, const char *, ...)
 ndr_print_dlong: void (struct ndr_print *, const char *, int64_t)
 ndr_print_double: void (struct ndr_print *, const char *, double)
 ndr_print_enum: void (struct ndr_print *, const char *, const char *, const 
char *, uint32_t)
-ndr_print_function_debug: void (ndr_print_function_t, const char *, 
ndr_flags_type, void *)
-ndr_print_function_string: char *(TALLOC_CTX *, ndr_print_function_t, const 
char *, ndr_flags_type, void *)
+ndr_print_function_debug: void (ndr_print_function_t, const char *, 
ndr_flags_type, const void *)
+ndr_print_function_string: char *(TALLOC_CTX *, ndr_print_function_t, const 
char *, ndr_flags_type, const void *)
 ndr_print_gid_t: void (struct ndr_print *, const char *, gid_t)
 ndr_print_hyper: void (struct ndr_print *, const char *, uint64_t)
 ndr_print_int16: void (struct ndr_print *, const char *, int16_t)
@@ -76,7 +76,7 @@ ndr_print_string: void (struct ndr_print *, const char *, 
const char *)
 ndr_print_string_array: void (struct ndr_print *, const char *, const char **)
 ndr_print_string_helper: void (struct ndr_print *, const char *, ...)
 ndr_print_struct: void (struct ndr_print *, const char *, const char *)
-ndr_print_struct_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, 
void *)
+ndr_print_struct_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, 
const void *)
 ndr_print_svcctl_ServerType: void (struct ndr_print *, const char *, uint32_t)
 ndr_print_time_t: void (struct ndr_print *, const char *, time_t)
 ndr_print_timespec: void (struct ndr_print *, const char *, const struct 
timespec *)
@@ -90,8 +90,8 @@ ndr_print_uint32: void (struct ndr_print *, const char *, 
uint32_t)
 ndr_print_uint3264: void (struct ndr_print *, const char *, uint32_t)
 ndr_print_uint8: void (struct ndr_print *, const char *, uint8_t)
 ndr_print_union: void (struct ndr_print *, const char *, int, const char *)
-ndr_print_union_debug: void (ndr_print_fn_t, const char *, uint32_t, void *)
-ndr_print_union_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, 
uint32_t, void *)
+ndr_print_union_debug: void (ndr_print_fn_t, const char *, uint32_t, const 
void *)
+ndr_print_union_string: char *(TALLOC_CTX *, ndr_print_fn_t, const char *, 
uint32_t, const void *)
 ndr_print_winreg_Data: void (struct ndr_print *, const char *, const union 
winreg_Data *)
 ndr_print_winreg_Data_GPO: void (struct ndr_print *, const char *, const union 
winreg_Data_GPO *)
 ndr_print_winreg_Type: void (struct ndr_print *, const char *, enum 
winreg_Type)
@@ -271,5 +271,5 @@ ndr_token_peek_cmp_fn: enum ndr_err_code (struct 
ndr_token_list *, const void *,
 ndr_token_retrieve: enum ndr_err_code (struct ndr_token_list *, const void *, 
uint32_t *)
 ndr_token_store: enum ndr_err_code (TALLOC_CTX *, struct ndr_token_list *, 
const void *, uint32_t)
 ndr_transfer_syntax_ndr: uuid = {time_low = 2324192516, time_mid = 7403, 
time_hi_and_version = 4553, clock_seq = "\237\350", node = "\b\000+\020H`"}, 
if_version = 2
-ndr_transfer_syntax_ndr64: uuid = {time_low = 1903232307, time_mid = 48826, 
time_hi_and_version = 18743, clock_seq = "\203\031", node = 
"\265\333\357\234\3146"}, if_version = 1
+ndr_transfer_syntax_ndr64: uuid = {time_low = 1903232307, time_mid = 48826, 
time_hi_and_version = 18743, clock_seq = "\203\031", node = 
"\265\333\357\234\314\066"}, if_version = 1
 ndr_zero_memory: void (void *, size_t)
diff --git a/librpc/ndr/libndr.h b/librpc/ndr/libndr.h
index c8cf6ee1d45..91d1cdac838 100644
--- a/librpc/ndr/libndr.h
+++ b/librpc/ndr/libndr.h
@@ -663,15 +663,38 @@ void ndr_print_debug_helper(struct ndr_print *ndr, const 
char *format, ...) PRIN
 void ndr_print_debugc_helper(struct ndr_print *ndr, const char *format, ...) 
PRINTF_ATTRIBUTE(2,3);
 void ndr_print_printf_helper(struct ndr_print *ndr, const char *format, ...) 
PRINTF_ATTRIBUTE(2,3);
 void ndr_print_string_helper(struct ndr_print *ndr, const char *format, ...) 
PRINTF_ATTRIBUTE(2,3);
-bool ndr_print_debug(int level, ndr_print_fn_t fn, const char *name, void 
*ptr, const char *location, const char *function);
-void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char *name, 
void *ptr);
-void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, uint32_t 
level, void *ptr);
-void ndr_print_function_debug(ndr_print_function_t fn, const char *name, 
ndr_flags_type flags, void *ptr);
-char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const 
char *name, void *ptr);
-char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, const 
char *name, uint32_t level, void *ptr);
+bool ndr_print_debug(int level,
+                    ndr_print_fn_t fn,
+                    const char *name,
+                    const void *ptr,
+                    const char *location,
+                    const char *function);
+void ndr_print_debugc(int dbgc_class,
+                     ndr_print_fn_t fn,
+                     const char *name,
+                     const void *ptr);
+void ndr_print_union_debug(ndr_print_fn_t fn,
+                          const char *name,
+                          uint32_t level,
+                          const void *ptr);
+void ndr_print_function_debug(ndr_print_function_t fn,
+                             const char *name,
+                             ndr_flags_type flags,
+                             const void *ptr);
+char *ndr_print_struct_string(TALLOC_CTX *mem_ctx,
+                             ndr_print_fn_t fn,
+                             const char *name,
+                             const void *ptr);
+char *ndr_print_union_string(TALLOC_CTX *mem_ctx,
+                            ndr_print_fn_t fn,
+                            const char *name,
+                            uint32_t level,
+                            const void *ptr);
 char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
-                               ndr_print_function_t fn, const char *name,
-                               ndr_flags_type flags, void *ptr);
+                               ndr_print_function_t fn,
+                               const char *name,
+                               ndr_flags_type flags,
+                               const void *ptr);
 void ndr_set_flags(libndr_flags *pflags, libndr_flags new_flags);
 enum ndr_err_code _ndr_pull_error(struct ndr_pull *ndr,
                                  enum ndr_err_code ndr_err,
diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c
index c07bd233a93..ece7f56a1a8 100644
--- a/librpc/ndr/ndr.c
+++ b/librpc/ndr/ndr.c
@@ -406,7 +406,10 @@ _PUBLIC_ void ndr_print_string_helper(struct ndr_print 
*ndr, const char *format,
 /*
   a useful helper function for printing idl structures via DEBUGC()
 */
-_PUBLIC_ void ndr_print_debugc(int dbgc_class, ndr_print_fn_t fn, const char 
*name, void *ptr)
+_PUBLIC_ void ndr_print_debugc(int dbgc_class,
+                              ndr_print_fn_t fn,
+                              const char *name,
+                              const void *ptr)
 {
        struct ndr_print *ndr;
 
@@ -434,7 +437,7 @@ _PUBLIC_ void ndr_print_debugc(int dbgc_class, 
ndr_print_fn_t fn, const char *na
 _PUBLIC_ bool ndr_print_debug(int level,
                              ndr_print_fn_t fn,
                              const char *name,
-                             void *ptr,
+                             const void *ptr,
                              const char *location,
                              const char *function)
 {
@@ -468,7 +471,10 @@ fail:
 /*
   a useful helper function for printing idl unions via DEBUG()
 */
-_PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, const char *name, 
uint32_t level, void *ptr)
+_PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn,
+                                   const char *name,
+                                   uint32_t level,
+                                   const void *ptr)
 {
        struct ndr_print *ndr;
 
@@ -493,7 +499,10 @@ _PUBLIC_ void ndr_print_union_debug(ndr_print_fn_t fn, 
const char *name, uint32_
 /*
   a useful helper function for printing idl function calls via DEBUG()
 */
-_PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn, const char 
*name, ndr_flags_type flags, void *ptr)
+_PUBLIC_ void ndr_print_function_debug(ndr_print_function_t fn,
+                                      const char *name,
+                                      ndr_flags_type flags,
+                                      const void *ptr)
 {
        struct ndr_print *ndr;
 
@@ -517,7 +526,10 @@ _PUBLIC_ void 
ndr_print_function_debug(ndr_print_function_t fn, const char *name
 /*
   a useful helper function for printing idl structures to a string
 */
-_PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, 
const char *name, void *ptr)
+_PUBLIC_ char *ndr_print_struct_string(TALLOC_CTX *mem_ctx,
+                                      ndr_print_fn_t fn,
+                                      const char *name,
+                                      const void *ptr)
 {
        struct ndr_print *ndr;
        char *ret = NULL;
@@ -542,7 +554,11 @@ failed:
 /*
   a useful helper function for printing idl unions to a string
 */
-_PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx, ndr_print_fn_t fn, 
const char *name, uint32_t level, void *ptr)
+_PUBLIC_ char *ndr_print_union_string(TALLOC_CTX *mem_ctx,
+                                     ndr_print_fn_t fn,
+                                     const char *name,
+                                     uint32_t level,
+                                     const void *ptr)
 {
        struct ndr_print *ndr;
        char *ret = NULL;
@@ -568,8 +584,10 @@ failed:
   a useful helper function for printing idl function calls to a string
 */
 _PUBLIC_ char *ndr_print_function_string(TALLOC_CTX *mem_ctx,
-                               ndr_print_function_t fn, const char *name,
-                               ndr_flags_type flags, void *ptr)
+                                        ndr_print_function_t fn,
+                                        const char *name,
+                                        ndr_flags_type flags,
+                                        const void *ptr)
 {
        struct ndr_print *ndr;
        char *ret = NULL;
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index 8b4b85b9c81..c15d8a67a7f 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -1288,7 +1288,7 @@ _PUBLIC_ void ndr_print_NTTIME_hyper(struct ndr_print 
*ndr, const char *name, NT
 _PUBLIC_ void ndr_print_time_t(struct ndr_print *ndr, const char *name, time_t 
t)
 {
        if (t == (time_t)-1 || t == 0) {
-               ndr->print(ndr, "%-25s: (time_t)%d", name, (int)t);
+               ndr->print(ndr, "%-25s: (time_t)%" PRIi64, name, (int64_t)t);
        } else {
                ndr->print(ndr, "%-25s: %s", name, timestring(ndr, t));
        }
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index c855e43284e..a54ca2f74d3 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -149,8 +149,10 @@ bool saf_store( const char *domain, const char *servername 
)
        }
        expire = time( NULL ) + lp_parm_int(-1, "saf","ttl", SAF_TTL);
 
-       DEBUG(10,("saf_store: domain = [%s], server = [%s], expire = [%u]\n",
-               domain, servername, (unsigned int)expire ));
+       DBG_DEBUG("domain = [%s], server = [%s], expire = [%" PRIu64 "]\n",
+                 domain,
+                 servername,
+                 (uint64_t)expire);
 
        ret = gencache_set( key, servername, expire );
 


-- 
Samba Shared Repository


Reply via email to