The branch, master has been updated
via 0c73b793a05 lib: Move a few smb-related constant #defines to common
code
via fd109cf0d19 smbd: Simplify vfs_valid_pwrite_range()
via ea61c0fd811 smbd: Avoid an else in vfs_valid_pwrite_range()
via b168cb786b3 smbd: Remove an unneeded return;
via 8bde9d77d8c smbd: Fix a typo
via fb30b61fbd2 vfs_commit: Do initial eof calculation on demand
via e196fa4fb31 vfs_commit: Some README.Coding changes
via 265badba8a0 vfs_commit: Reduce indentation with early returns
via ee07cf7ca33 vfs_commit: Make dbytes and dthresh size_t
via cb17e1bdbc4 librpc: Use a direct struct initialization
via 21402c285e9 libndr: Fix two small error path memleaks
via 6e5cfdde7de libcli: Initialize a variable at declaration time
via 6f6ee043642 lib: Remove unnecessary assignments
via f348b32fb18 librpc: Slightly simplify dcerpc_binding_build_tower()
via ff627b2b41e lib: Don't call a function to initialize an empty
DATA_BLOB
via 0c00ad9c89f smbd: Simplify callers of messaging_send()
via 014fb94e962 librpc: Directly initialize variables
via 57470360429 smbd: Make arguments to open_file_ntcreate a bit easier
to read
via 904b6b5b443 lib: Reduce indentation with an early return
via 9c73e78f68e lib: Remove some code #ifdef'ed out for more than 20
years
via 527358351c2 smbd: Use a direct struct initialization
via 1118300c260 smbd: Reduce indentation
via 8302d6ef6dd smb: Modernize a few DEBUGs
via 2f3b17b35c1 smbd: Reduce indentation with an early return;
via 6e6f190b9f0 lib: Remove a few unused #defines
via 6fbaf8e4cc7 credentials: Remove duplicate prototypes
via f83c3e04f19 smbd: Move utok_string() into smbd
via 9d5bf396855 smbd: Remove the one-line conn_free() wrapper function
via 285875e45b9 lib: Reduce indentation
via 59eaaf2c43e smbd: Modernize some very ugly DEBUGs
via 729d030c98d lib: Add timespec_equal()
via 4df2de5c390 smbd: Modernize DEBUGs
via b59517fb2cf smbd: Remove unused posix_sys_acl_blob_get_file()
via 1bcfe1cd2da smbd: Remove an unnecessary talloc_strdup()
via c937122d62f pysmbd: Silence a signed/unsigned warning
via 1e53acaf31c libcli: Add missing NULL checks
via 363f6ac74eb libcli: Fix error path memleaks
via 7f670a3994c lib: Save lines with direct initialization
via e5537c08b2d smbd: A TCP port is uint16, fix variable type
via 337c73e7a5a lib: Remove two unused functions
via 70074c3a7cf smbd: Avoid a memset with a struct initialization
via cee1d524801 lib: Simplify sys_acl_to_text() with
talloc_asprintf_addbuf()
via 88309375eb9 smbd: Remove an unnecessary include
via ad34be388d3 smbd: Remove #defines used just once
via 514c5a3332f smbd: Remove unused #defines
via 17389c7e282 smbd: Add some const where possible
via 4921f8b9c31 smbd: Simplify map_nt_perms
via 0f761a956be lib: Fix some whitespace
from 2a6b80cbecd vfs_ceph_new: Fix a regression in SMB_VFS_GETWD
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0c73b793a05aef90ec4284a79e82e584c55132da
Author: Volker Lendecke <[email protected]>
Date: Mon Sep 15 07:04:55 2025 -0700
lib: Move a few smb-related constant #defines to common code
No need to have two copies in source3 and source4
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
Autobuild-User(master): Volker Lendecke <[email protected]>
Autobuild-Date(master): Wed Jan 7 11:00:48 UTC 2026 on atb-devel-224
commit fd109cf0d199a5829a4e27a4eebba07368243135
Author: Volker Lendecke <[email protected]>
Date: Wed Aug 27 17:26:05 2025 +0200
smbd: Simplify vfs_valid_pwrite_range()
Easier to read for me.
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit ea61c0fd8113080fe40b954a0974906bc68b7c5e
Author: Volker Lendecke <[email protected]>
Date: Wed Aug 27 17:22:53 2025 +0200
smbd: Avoid an else in vfs_valid_pwrite_range()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit b168cb786b313e5ab019f362d7413cfc9a1e90dc
Author: Volker Lendecke <[email protected]>
Date: Thu Sep 11 14:06:49 2025 +0200
smbd: Remove an unneeded return;
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 8bde9d77d8c7d555f9d1eb22479aa30302128be1
Author: Volker Lendecke <[email protected]>
Date: Thu Sep 11 14:06:03 2025 +0200
smbd: Fix a typo
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit fb30b61fbd2607d46f43ab557257e353677ba5c7
Author: Volker Lendecke <[email protected]>
Date: Sun Oct 19 11:46:03 2025 +0200
vfs_commit: Do initial eof calculation on demand
Avoid yet another fstat call at open time, we might never write to the
file
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit e196fa4fb3174215843d907e016ded6c9886b35c
Author: Volker Lendecke <[email protected]>
Date: Sun Oct 19 11:36:17 2025 +0200
vfs_commit: Some README.Coding changes
Reduce indentation with early returns
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 265badba8a0e36ea3372cbf31d424a9083df7416
Author: Volker Lendecke <[email protected]>
Date: Sun Oct 19 11:33:03 2025 +0200
vfs_commit: Reduce indentation with early returns
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit ee07cf7ca33a4305904583b0f2ccb69612d9086c
Author: Volker Lendecke <[email protected]>
Date: Sun Oct 19 11:28:21 2025 +0200
vfs_commit: Make dbytes and dthresh size_t
Those can never go negative, use "%zu" as printf modifier
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit cb17e1bdbc4b05dbd6723ad6f7b48f5d3fce05e6
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 10:30:09 2025 +0100
librpc: Use a direct struct initialization
Don't reference data_blob_null without need
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 21402c285e9ebc2bde7fc16092e3ae83d2306149
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 10:56:17 2025 +0100
libndr: Fix two small error path memleaks
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 6e5cfdde7de61bc19345bb6a70edbca1b582bced
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 10:52:18 2025 +0100
libcli: Initialize a variable at declaration time
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 6f6ee0436421a27362b151f7121004ead6570aaa
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 10:58:52 2025 +0100
lib: Remove unnecessary assignments
data_blob_free() already NULLs out its argument
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit f348b32fb18fe9a0047f04dd6f445c022ba1a128
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 11:01:36 2025 +0100
librpc: Slightly simplify dcerpc_binding_build_tower()
Use the implicit NULLing out of the other struct elements
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit ff627b2b41eba26a0dbe7744b6a027e001583828
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 09:41:02 2025 +0100
lib: Don't call a function to initialize an empty DATA_BLOB
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 0c00ad9c89fefe77d8cd95a3d91c001fc7c03062
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 30 10:30:24 2025 +0100
smbd: Simplify callers of messaging_send()
It deals fine with a NULL argument
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 014fb94e962a59a6099bf7721cc6c54f8f606903
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 24 11:16:46 2025 +0100
librpc: Directly initialize variables
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 574703604295ccd135eba17486331f6ff5a524d7
Author: Volker Lendecke <[email protected]>
Date: Mon Oct 27 13:50:03 2025 +0100
smbd: Make arguments to open_file_ntcreate a bit easier to read
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 904b6b5b4436bc33508ce2d31e19f790290b612b
Author: Volker Lendecke <[email protected]>
Date: Thu Nov 13 09:32:10 2025 +0100
lib: Reduce indentation with an early return
Review with "git show -w"
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 9c73e78f68ee0828fecd23d5d88c62a069dc56b0
Author: Volker Lendecke <[email protected]>
Date: Thu Nov 13 09:23:33 2025 +0100
lib: Remove some code #ifdef'ed out for more than 20 years
We have a git history if someone wants to dig this up
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 527358351c200b43d4edc9649e016784e915791d
Author: Volker Lendecke <[email protected]>
Date: Sun Nov 23 07:41:16 2025 +0100
smbd: Use a direct struct initialization
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 1118300c260c7d6e60feb25e7e99e173bb1de955
Author: Volker Lendecke <[email protected]>
Date: Tue Nov 11 11:24:56 2025 +0100
smbd: Reduce indentation
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 8302d6ef6ddfff9bbbf19f47d3a360287028b20e
Author: Volker Lendecke <[email protected]>
Date: Tue Nov 11 07:20:20 2025 +0100
smb: Modernize a few DEBUGs
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 2f3b17b35c1d18a007587b616a5833df3c2c1c26
Author: Volker Lendecke <[email protected]>
Date: Sat Nov 22 10:08:12 2025 +0100
smbd: Reduce indentation with an early return;
Review with "git show -w"
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 6e6f190b9f056c96b52160a2d45befc8c63b2088
Author: Volker Lendecke <[email protected]>
Date: Tue Nov 11 09:57:00 2025 +0100
lib: Remove a few unused #defines
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 6fbaf8e4cc7a761229af58bf79a01ebfca6fa01e
Author: Volker Lendecke <[email protected]>
Date: Fri Nov 21 15:28:01 2025 +0100
credentials: Remove duplicate prototypes
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit f83c3e04f19c6ab2c3cf894e5223df090fe6dae6
Author: Volker Lendecke <[email protected]>
Date: Sun Nov 9 10:47:02 2025 +0100
smbd: Move utok_string() into smbd
Only used in chdir_current_service()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 9d5bf396855d66dba718ad96e64c4d4d6fc7e615
Author: Volker Lendecke <[email protected]>
Date: Fri Oct 17 14:10:49 2025 +0200
smbd: Remove the one-line conn_free() wrapper function
In case there's more things to do here we should put it into the
destructor.
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 285875e45b911c4323c939fa6e6426fcbce80386
Author: Volker Lendecke <[email protected]>
Date: Mon Nov 10 17:03:42 2025 +0100
lib: Reduce indentation
Avoid a few "else" statements, review with "git show -w".
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 59eaaf2c43eda78b701124f0b5bf4c8c72050491
Author: Volker Lendecke <[email protected]>
Date: Mon Nov 10 16:36:34 2025 +0100
smbd: Modernize some very ugly DEBUGs
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 729d030c98d28e08ad365bb7b991583a7a956c80
Author: Volker Lendecke <[email protected]>
Date: Thu Nov 6 15:15:51 2025 +0100
lib: Add timespec_equal()
I've just gotten the !=0 vs ==0 wrong. Make comparing timespecs for
equality more intuitive.
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 4df2de5c39045b27b76c30dedd7e4d4847daaa56
Author: Volker Lendecke <[email protected]>
Date: Mon Dec 15 12:41:26 2025 +0100
smbd: Modernize DEBUGs
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit b59517fb2cfb7ae470be4ef9d66108fc7a2472cb
Author: Volker Lendecke <[email protected]>
Date: Wed Dec 17 17:32:14 2025 +0100
smbd: Remove unused posix_sys_acl_blob_get_file()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 1bcfe1cd2da79a90f29523e98a0afff791f751a5
Author: Volker Lendecke <[email protected]>
Date: Mon Dec 22 22:03:47 2025 +0100
smbd: Remove an unnecessary talloc_strdup()
talloc_string_sub() already makes a copy first
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit c937122d62f4c3f2eb92ad2db8db324e1133a132
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 23 12:12:54 2025 +0100
pysmbd: Silence a signed/unsigned warning
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 1e53acaf31c6554b674fd81332af7bb7f4645494
Author: Volker Lendecke <[email protected]>
Date: Wed Nov 26 12:08:33 2025 +0100
libcli: Add missing NULL checks
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 363f6ac74eb6a2934a91e43f57ca8391bdc1370f
Author: Volker Lendecke <[email protected]>
Date: Wed Nov 26 12:08:15 2025 +0100
libcli: Fix error path memleaks
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 7f670a3994cff9d6eb83bfede880c23f709a44b8
Author: Volker Lendecke <[email protected]>
Date: Mon Dec 1 19:28:27 2025 +0100
lib: Save lines with direct initialization
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit e5537c08b2de7e70fbd326ac165a4eaf914dd5a4
Author: Volker Lendecke <[email protected]>
Date: Mon Dec 15 13:25:46 2025 +0100
smbd: A TCP port is uint16, fix variable type
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 337c73e7a5af980730877bdb4bade4cf54bbd607
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 16 17:44:05 2025 +0100
lib: Remove two unused functions
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 70074c3a7cfe0a9b1900c184a5a62e6d761e7fb8
Author: Volker Lendecke <[email protected]>
Date: Thu Dec 18 11:58:11 2025 +0100
smbd: Avoid a memset with a struct initialization
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit cee1d524801c6900d6498bb48fc890ee977a2c66
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 16 15:23:17 2025 +0100
lib: Simplify sys_acl_to_text() with talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 88309375eb9c985cb9bf3c8ed8317551d49b78ab
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 16 15:26:42 2025 +0100
smbd: Remove an unnecessary include
This comes in via includes.h as well. Wherever these prototypes are
needed and wherever includes.h should not be available we should add
the include directly.
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit ad34be388d307978e23a46c47fc8116d41816712
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 16 20:26:15 2025 +0100
smbd: Remove #defines used just once
For me they were not giving additional insights, they only made me
jump somewhere else to see what's going on.
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 514c5a3332f4f82aee34b86ae49e1fe56d27efd8
Author: Volker Lendecke <[email protected]>
Date: Tue Dec 16 20:17:18 2025 +0100
smbd: Remove unused #defines
Unused since 2001...
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 17389c7e28237d74b2f3f962c43b947965576cf9
Author: Volker Lendecke <[email protected]>
Date: Thu Dec 18 11:58:52 2025 +0100
smbd: Add some const where possible
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 4921f8b9c314ad06c3ee6cf7edce5bb224e1d5b6
Author: Volker Lendecke <[email protected]>
Date: Thu Dec 18 11:58:41 2025 +0100
smbd: Simplify map_nt_perms
Factor out the repeated if-conditions
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
commit 0f761a956bef95d75f71311b8ac554641c7102a2
Author: Volker Lendecke <[email protected]>
Date: Thu Dec 18 15:36:23 2025 +0100
lib: Fix some whitespace
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Anoop C S <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
auth/credentials/credentials.h | 8 -
auth/ntlmssp/ntlmssp_client.c | 12 +-
auth/ntlmssp/ntlmssp_server.c | 2 +-
lib/audit_logging/audit_logging.c | 6 +-
lib/util/asn1.c | 2 -
lib/util/fsusage.c | 55 +++--
lib/util/time.c | 6 +
lib/util/time.h | 1 +
libcli/auth/smbencrypt.c | 2 +-
libcli/drsuapi/repl_decrypt.c | 2 +-
libcli/ldap/ldap_message.c | 21 +-
libcli/smb/smb2cli_create.c | 4 +-
libcli/smb/smb_constants.h | 45 ++++
librpc/rpc/binding.c | 8 +-
librpc/rpc/dcerpc_util.c | 10 +-
source3/include/fake_file.h | 8 +-
source3/include/local.h | 32 ---
source3/include/proto.h | 1 -
source3/include/smb.h | 84 +------
source3/include/smb_acls.h | 12 +-
source3/lib/smbrun.c | 26 +--
source3/lib/sysacls.c | 58 +----
source3/lib/sysquotas.c | 372 +++++++++++++++---------------
source3/lib/sysquotas_4A.c | 62 -----
source3/lib/sysquotas_xfs.c | 32 ---
source3/lib/util.c | 20 --
source3/lib/util_sec.c | 16 +-
source3/lib/util_sock.c | 10 +-
source3/librpc/rpc/dcerpc_helpers.c | 6 +-
source3/modules/vfs_commit.c | 103 +++++----
source3/modules/vfs_default.c | 9 +-
source3/modules/vfs_dirsort.c | 2 +-
source3/modules/vfs_glusterfs.c | 7 +-
source3/modules/vfs_posixacl.c | 9 +-
source3/param/loadparm.c | 7 +-
source3/rpc_server/mdssvc/mdssvc.c | 2 +-
source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 3 +-
source3/smbd/conn.c | 13 --
source3/smbd/dfree.c | 12 +-
source3/smbd/durable.c | 22 +-
source3/smbd/msdfs.c | 20 +-
source3/smbd/open.c | 30 +--
source3/smbd/posix_acls.c | 205 +++++++---------
source3/smbd/proto.h | 6 -
source3/smbd/pysmbd.c | 2 +-
source3/smbd/server.c | 4 +-
source3/smbd/smb1_service.c | 2 +-
source3/smbd/smb1_sesssetup.c | 3 +-
source3/smbd/smb1_trans2.c | 25 +-
source3/smbd/smb2_negprot.c | 7 +-
source3/smbd/smb2_process.c | 3 +-
source3/smbd/smb2_server.c | 7 +-
source3/smbd/smb2_service.c | 25 +-
source3/smbd/smb2_setinfo.c | 14 +-
source3/smbd/smb2_trans2.c | 65 ++++--
source3/smbd/smbd.h | 1 -
source3/smbd/statvfs.c | 135 +++++------
source3/smbd/vfs.c | 9 +-
source3/torture/cmd_vfs.c | 6 +-
source3/torture/msgtest.c | 18 +-
source3/torture/test_smb1_dfs.c | 6 +-
source3/torture/torture.c | 2 +-
source3/utils/ntlm_auth.c | 5 +-
source4/auth/gensec/gensec_krb5.c | 2 +-
source4/auth/kerberos/kerberos_pac.c | 4 +-
source4/auth/sam.c | 4 +-
source4/libcli/ldap/ldap_bind.c | 4 +-
source4/libcli/raw/smb.h | 44 ----
source4/libcli/smb2/smb2_calls.h | 12 +-
source4/libcli/smb_composite/sesssetup.c | 4 +-
source4/ntvfs/posix/pvfs_xattr.c | 2 +-
source4/rpc_server/lsa/dcesrv_lsa.c | 2 +-
source4/rpc_server/samr/samr_password.c | 6 +-
source4/smb_server/smb/negprot.c | 4 +-
source4/smb_server/smb2/fileio.c | 2 +-
source4/smb_server/smb2/negprot.c | 2 +-
source4/torture/rpc/samlogon.c | 20 +-
77 files changed, 777 insertions(+), 1047 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/credentials/credentials.h b/auth/credentials/credentials.h
index 9f945726440..b0d744e3115 100644
--- a/auth/credentials/credentials.h
+++ b/auth/credentials/credentials.h
@@ -289,9 +289,6 @@ NTSTATUS cli_credentials_set_secrets(struct cli_credentials
*cred,
char **error_string);
int cli_credentials_get_kvno(struct cli_credentials *cred);
-bool cli_credentials_set_username_callback(struct cli_credentials *cred,
- const char *(*username_cb) (struct
cli_credentials *));
-
enum credentials_obtained cli_credentials_get_principal_obtained(struct
cli_credentials *cred);
/**
@@ -301,11 +298,6 @@ enum credentials_obtained
cli_credentials_get_principal_obtained(struct cli_cred
* @note Return value will never be NULL except by programmer error.
*/
char *cli_credentials_get_principal_and_obtained(struct cli_credentials *cred,
TALLOC_CTX *mem_ctx, enum credentials_obtained *obtained);
-bool cli_credentials_set_principal(struct cli_credentials *cred,
- const char *val,
- enum credentials_obtained obtained);
-bool cli_credentials_set_principal_callback(struct cli_credentials *cred,
- const char *(*principal_cb) (struct
cli_credentials *));
/**
* Obtain the 'old' password for this credentials context (used for join
accounts).
diff --git a/auth/ntlmssp/ntlmssp_client.c b/auth/ntlmssp/ntlmssp_client.c
index 8c2a1f9c0aa..f8b3f9c0b3a 100644
--- a/auth/ntlmssp/ntlmssp_client.c
+++ b/auth/ntlmssp/ntlmssp_client.c
@@ -227,16 +227,16 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security
*gensec_security,
uint32_t chal_flags, ntlmssp_command, unkn1 = 0, unkn2 = 0;
DATA_BLOB server_domain_blob;
DATA_BLOB challenge_blob;
- DATA_BLOB target_info = data_blob(NULL, 0);
+ DATA_BLOB target_info = {};
char *server_domain;
const char *chal_parse_string;
const char *chal_parse_string_short = NULL;
const char *auth_gen_string;
- DATA_BLOB lm_response = data_blob(NULL, 0);
- DATA_BLOB nt_response = data_blob(NULL, 0);
- DATA_BLOB session_key = data_blob(NULL, 0);
- DATA_BLOB lm_session_key = data_blob(NULL, 0);
- DATA_BLOB encrypted_session_key = data_blob(NULL, 0);
+ DATA_BLOB lm_response = {};
+ DATA_BLOB nt_response = {};
+ DATA_BLOB session_key = {};
+ DATA_BLOB lm_session_key = {};
+ DATA_BLOB encrypted_session_key = {};
NTSTATUS nt_status;
int flags = 0;
const char *user = NULL, *domain = NULL, *workstation = NULL;
diff --git a/auth/ntlmssp/ntlmssp_server.c b/auth/ntlmssp/ntlmssp_server.c
index 2e25c4efab5..a51bcf115ee 100644
--- a/auth/ntlmssp/ntlmssp_server.c
+++ b/auth/ntlmssp/ntlmssp_server.c
@@ -897,7 +897,7 @@ static NTSTATUS ntlmssp_server_postauth(struct
gensec_security *gensec_security,
DATA_BLOB user_session_key = state->user_session_key;
DATA_BLOB lm_session_key = state->lm_session_key;
NTSTATUS nt_status = NT_STATUS_OK;
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
struct auth_session_info *session_info = NULL;
TALLOC_FREE(state->user_info);
diff --git a/lib/audit_logging/audit_logging.c
b/lib/audit_logging/audit_logging.c
index 8ed15edffb6..e2fe4b0edb7 100644
--- a/lib/audit_logging/audit_logging.c
+++ b/lib/audit_logging/audit_logging.c
@@ -186,11 +186,7 @@ static NTSTATUS get_event_server(
* without waiting
*/
for (i = 0; i < num_servers; i++) {
- status = imessaging_send(
- msg_ctx,
- servers[i],
- MSG_PING,
- &data_blob_null);
+ status = imessaging_send(msg_ctx, servers[i], MSG_PING, NULL);
if (NT_STATUS_IS_OK(status)) {
*event_server = servers[i];
TALLOC_FREE(frame);
diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index 644f40275ee..4e2999ec60a 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -960,7 +960,6 @@ bool asn1_read_OctetString(struct asn1_data *data,
TALLOC_CTX *mem_ctx, DATA_BLO
err:
data_blob_free(blob);
- *blob = data_blob_null;
return false;
}
@@ -1047,7 +1046,6 @@ bool asn1_read_BitString(struct asn1_data *data,
TALLOC_CTX *mem_ctx, DATA_BLOB
if (data->has_error) {
data_blob_free(blob);
- *blob = data_blob_null;
*padding = 0;
return false;
}
diff --git a/lib/util/fsusage.c b/lib/util/fsusage.c
index d769b452eaa..c8dc0b3db9b 100644
--- a/lib/util/fsusage.c
+++ b/lib/util/fsusage.c
@@ -1,18 +1,18 @@
-/*
+/*
Unix SMB/CIFS implementation.
functions to calculate the free disk space
Copyright (C) Andrew Tridgell 1998-2000
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -20,7 +20,7 @@
#include "replace.h"
#include "lib/util/samba_util.h"
#include "system/filesys.h"
-
+
/**
* @file
* @brief Utility functions for getting the amount of free disk space
@@ -33,22 +33,27 @@ static uint64_t adjust_blocks(uint64_t blocks, uint64_t
fromsize, uint64_t tosiz
{
if (fromsize == tosize) { /* e.g., from 512 to 512 */
return blocks;
- } else if (fromsize > tosize) { /* e.g., from 2048 to 512 */
+ }
+
+ if (fromsize > tosize) { /* e.g., from 2048 to 512 */
return blocks * (fromsize / tosize);
- } else { /* e.g., from 256 to 512 */
- /* Protect against broken filesystems... */
- if (fromsize == 0) {
- fromsize = tosize;
- }
- return (blocks + 1) / (tosize / fromsize);
}
+
+ /* e.g., from 256 to 512 */
+ /* Protect against broken filesystems... */
+
+ if (fromsize == 0) {
+ fromsize = tosize;
+ }
+
+ return (blocks + 1) / (tosize / fromsize);
}
/**
* Retrieve amount of free disk space.
* this does all of the system specific guff to get the free disk space.
* It is derived from code in the GNU fileutils package, but has been
- * considerably mangled for use here
+ * considerably mangled for use here
*
* results are returned in *dfree and *dsize, in 512 byte units
*/
@@ -61,25 +66,25 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree,
uint64_t *dsize)
if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
return -1;
#endif /* STAT_STATFS3_OSF1 */
-
+
#ifdef STAT_STATFS2_FS_DATA /* Ultrix */
-#define CONVERT_BLOCKS(B) adjust_blocks ((uint64_t)(B), (uint64_t)1024,
(uint64_t)512)
+#define CONVERT_BLOCKS(B) adjust_blocks ((uint64_t)(B), (uint64_t)1024,
(uint64_t)512)
struct fs_data fsd;
-
+
if (statfs (path, &fsd) != 1)
return -1;
-
+
(*dsize) = CONVERT_BLOCKS (fsd.fd_req.btot);
(*dfree) = CONVERT_BLOCKS (fsd.fd_req.bfreen);
#endif /* STAT_STATFS2_FS_DATA */
-
+
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */
#define CONVERT_BLOCKS(B) adjust_blocks ((uint64_t)(B), (uint64_t)fsd.f_bsize,
(uint64_t)512)
struct statfs fsd;
-
+
if (statfs (path, &fsd) < 0)
return -1;
-
+
#ifdef STATFS_TRUNCATES_BLOCK_COUNTS
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
struct statfs are truncated to 2GB. These conditions detect that
@@ -93,17 +98,17 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree,
uint64_t *dsize)
}
#endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
#endif /* STAT_STATFS2_BSIZE */
-
+
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */
#define CONVERT_BLOCKS(B) adjust_blocks ((uint64_t)(B), (uint64_t)fsd.f_fsize,
(uint64_t)512)
-
+
struct statfs fsd;
-
+
if (statfs (path, &fsd) < 0)
return -1;
#endif /* STAT_STATFS2_FSIZE */
-
+
#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */
# if _AIX || defined(_CRAY)
# define CONVERT_BLOCKS(B) adjust_blocks ((uint64_t)(B),
(uint64_t)fsd.f_bsize, (uint64_t)512)
@@ -118,7 +123,7 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree,
uint64_t *dsize)
# endif
# endif
# endif
-
+
struct statfs fsd;
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
diff --git a/lib/util/time.c b/lib/util/time.c
index 7ed8fb00447..220cdca3d9b 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -958,6 +958,12 @@ _PUBLIC_ int timespec_compare(const struct timespec *ts1,
const struct timespec
return 0;
}
+_PUBLIC_ bool timespec_equal(const struct timespec *ts1, const struct timespec
*ts2)
+{
+ return ((ts1->tv_sec == ts2->tv_sec) &&
+ (ts1->tv_nsec == ts2->tv_nsec));
+}
+
/****************************************************************************
Round up a timespec if nsec > 500000000, round down if lower,
then zero nsec.
diff --git a/lib/util/time.h b/lib/util/time.h
index 1180dd0cfc4..5fc70bf2a45 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -350,6 +350,7 @@ struct timespec timespec_current(void);
struct timespec timespec_min(const struct timespec *ts1,
const struct timespec *ts2);
int timespec_compare(const struct timespec *ts1, const struct timespec *ts2);
+bool timespec_equal(const struct timespec *ts1, const struct timespec *ts2);
void round_timespec_to_sec(struct timespec *ts);
void round_timespec_to_usec(struct timespec *ts);
void round_timespec_to_nttime(struct timespec *ts);
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index b130c0abe34..f2bcda7fc05 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -455,7 +455,7 @@ static DATA_BLOB NTLMv2_generate_client_data(TALLOC_CTX
*mem_ctx,
const DATA_BLOB *names_blob)
{
uint8_t client_chal[8];
- DATA_BLOB response = data_blob(NULL, 0);
+ DATA_BLOB response = {};
uint8_t long_date[8];
generate_random_buffer(client_chal, sizeof(client_chal));
diff --git a/libcli/drsuapi/repl_decrypt.c b/libcli/drsuapi/repl_decrypt.c
index d28924603ab..194e024f643 100644
--- a/libcli/drsuapi/repl_decrypt.c
+++ b/libcli/drsuapi/repl_decrypt.c
@@ -220,7 +220,7 @@ static WERROR drsuapi_encrypt_attribute_value(TALLOC_CTX
*mem_ctx,
const DATA_BLOB *in,
DATA_BLOB *out)
{
- DATA_BLOB rid_crypt_out = data_blob(NULL, 0);
+ DATA_BLOB rid_crypt_out = {};
DATA_BLOB confounder;
DATA_BLOB enc_buffer;
diff --git a/libcli/ldap/ldap_message.c b/libcli/ldap/ldap_message.c
index 1a537e8144c..3efae311026 100644
--- a/libcli/ldap/ldap_message.c
+++ b/libcli/ldap/ldap_message.c
@@ -1208,14 +1208,21 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
r->mechanism = LDAP_AUTH_MECH_SASL;
if (!asn1_read_OctetString_talloc(msg, data,
&r->creds.SASL.mechanism)) goto prot_err;
if (asn1_peek_tag(data, ASN1_OCTET_STRING)) { /*
optional */
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
if (!asn1_read_OctetString(data, msg,
&tmp_blob)) goto prot_err;
r->creds.SASL.secblob = talloc(msg, DATA_BLOB);
if (!r->creds.SASL.secblob) {
+ data_blob_free(&tmp_blob);
return
NT_STATUS_LDAP(LDAP_OPERATIONS_ERROR);
}
*r->creds.SASL.secblob =
data_blob_talloc(r->creds.SASL.secblob,
tmp_blob.data, tmp_blob.length);
+ if ((tmp_blob.length != 0) &&
+ (r->creds.SASL.secblob->data == NULL)) {
+ data_blob_free(&tmp_blob);
+ return NT_STATUS_LDAP(
+ LDAP_OPERATIONS_ERROR);
+ }
data_blob_free(&tmp_blob);
} else {
r->creds.SASL.secblob = NULL;
@@ -1235,14 +1242,20 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
if (!asn1_start_tag(data, tag)) goto prot_err;
if (!ldap_decode_response(msg, data, &r->response)) goto
prot_err;
if (asn1_peek_tag(data, ASN1_CONTEXT_SIMPLE(7))) {
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
if (!asn1_read_ContextSimple(data, msg, 7, &tmp_blob))
goto prot_err;
r->SASL.secblob = talloc(msg, DATA_BLOB);
if (!r->SASL.secblob) {
+ data_blob_free(&tmp_blob);
return NT_STATUS_LDAP(LDAP_OPERATIONS_ERROR);
}
*r->SASL.secblob = data_blob_talloc(r->SASL.secblob,
tmp_blob.data,
tmp_blob.length);
+ if ((tmp_blob.length != 0) &&
+ (r->SASL.secblob->data == NULL)) {
+ data_blob_free(&tmp_blob);
+ return NT_STATUS_LDAP(LDAP_OPERATIONS_ERROR);
+ }
data_blob_free(&tmp_blob);
} else {
r->SASL.secblob = NULL;
@@ -1505,7 +1518,7 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
case ASN1_APPLICATION(LDAP_TAG_ExtendedRequest): {
struct ldap_ExtendedRequest *r = &msg->r.ExtendedRequest;
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
msg->type = LDAP_TAG_ExtendedRequest;
if (!asn1_start_tag(data,tag)) goto prot_err;
@@ -1536,7 +1549,7 @@ _PUBLIC_ NTSTATUS ldap_decode(struct asn1_data *data,
case ASN1_APPLICATION(LDAP_TAG_ExtendedResponse): {
struct ldap_ExtendedResponse *r = &msg->r.ExtendedResponse;
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
msg->type = LDAP_TAG_ExtendedResponse;
if (!asn1_start_tag(data, tag)) goto prot_err;
diff --git a/libcli/smb/smb2cli_create.c b/libcli/smb/smb2cli_create.c
index e740365412e..bfee1b49a16 100644
--- a/libcli/smb/smb2cli_create.c
+++ b/libcli/smb/smb2cli_create.c
@@ -62,7 +62,7 @@ struct tevent_req *smb2cli_create_send(
struct tevent_req *req, *subreq;
struct smb2cli_create_state *state;
uint8_t *fixed;
- DATA_BLOB blob;
+ DATA_BLOB blob = {};
NTSTATUS status;
size_t blobs_offset;
uint8_t *dyn;
@@ -111,8 +111,6 @@ struct tevent_req *smb2cli_create_send(
SSVAL(fixed, 44, SMB2_HDR_BODY + 56);
SSVAL(fixed, 46, state->name_utf16_len);
- blob = data_blob_null;
-
if (blobs != NULL) {
status = smb2_create_blob_push(state, &blob, *blobs);
if (tevent_req_nterror(req, status)) {
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 1d55a555157..6d43ec1eb04 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -500,6 +500,51 @@ enum csc_policy {
#define NT_TRANSACT_GET_USER_QUOTA 7
#define NT_TRANSACT_SET_USER_QUOTA 8
+/* Flag for NT transact rename call. */
+#define RENAME_REPLACE_IF_EXISTS 1
+
+/* flags for SMBntrename call (from Samba4) */
+#define RENAME_FLAG_MOVE_CLUSTER_INFORMATION 0x102 /* ???? */
+#define RENAME_FLAG_HARD_LINK 0x103
+#define RENAME_FLAG_RENAME 0x104
+#define RENAME_FLAG_COPY 0x105
+
+/* ChangeNotify flags. */
+#define FILE_NOTIFY_CHANGE_FILE_NAME 0x001
+#define FILE_NOTIFY_CHANGE_DIR_NAME 0x002
+#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x004
+#define FILE_NOTIFY_CHANGE_SIZE 0x008
+#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x010
+#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x020
+#define FILE_NOTIFY_CHANGE_CREATION 0x040
+#define FILE_NOTIFY_CHANGE_EA 0x080
+#define FILE_NOTIFY_CHANGE_SECURITY 0x100
+#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
+#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
+#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
+
+#define FILE_NOTIFY_CHANGE_NAME \
+ (FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_DIR_NAME)
+
+#define FILE_NOTIFY_CHANGE_ALL \
+ (FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | \
+ FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE | \
+ FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_LAST_ACCESS | \
+ FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_EA | \
+ FILE_NOTIFY_CHANGE_SECURITY | FILE_NOTIFY_CHANGE_STREAM_NAME | \
+ FILE_NOTIFY_CHANGE_STREAM_SIZE | FILE_NOTIFY_CHANGE_STREAM_WRITE)
+
+/* change notify action results */
+#define NOTIFY_ACTION_ADDED 1
+#define NOTIFY_ACTION_REMOVED 2
+#define NOTIFY_ACTION_MODIFIED 3
+#define NOTIFY_ACTION_OLD_NAME 4
+#define NOTIFY_ACTION_NEW_NAME 5
+#define NOTIFY_ACTION_ADDED_STREAM 6
+#define NOTIFY_ACTION_REMOVED_STREAM 7
+#define NOTIFY_ACTION_MODIFIED_STREAM 8
+#define NOTIFY_ACTION_DIRLEASE_BREAK 256 /* Flag ORed to the above actions */
+
/* ioctl codes */
#define IOCTL_QUERY_JOB_INFO 0x530060
diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index e0d66303583..750dfa21898 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -967,10 +967,12 @@ static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX
*mem_ctx, const struct nd
ndr_err = ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ TALLOC_FREE(ndr);
return data_blob_null;
}
ndr_err = ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ TALLOC_FREE(ndr);
return data_blob_null;
}
@@ -1467,9 +1469,9 @@ _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX
*mem_ctx,
/* Floor 2 to num_protocols */
for (i = 0; i < num_protocols; i++) {
- tower->floors[2 + i].lhs.protocol = protseq[i];
- tower->floors[2 + i].lhs.lhs_data = data_blob_null;
- ZERO_STRUCT(tower->floors[2 + i].rhs);
+ tower->floors[2 + i] = (struct epm_floor) {
+ .lhs.protocol = protseq[i],
+ };
status = dcerpc_floor_set_rhs_data(tower->floors,
&tower->floors[2 + i],
NULL);
diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c
index e01391e6dcd..7252575aad8 100644
--- a/librpc/rpc/dcerpc_util.c
+++ b/librpc/rpc/dcerpc_util.c
@@ -1022,11 +1022,13 @@ struct ndr_syntax_id
dcerpc_construct_bind_time_features(uint64_t features)
NTSTATUS dcerpc_generic_session_key(DATA_BLOB *session_key)
{
- *session_key = data_blob_null;
-
/* this took quite a few CPU cycles to find ... */
- session_key->data = discard_const_p(unsigned char, "SystemLibraryDTC");
- session_key->length = 16;
+
+ *session_key = (DATA_BLOB) {
+ .data = discard_const_p(unsigned char, "SystemLibraryDTC"),
+ .length = 16,
+ };
+
return NT_STATUS_OK;
}
diff --git a/source3/include/fake_file.h b/source3/include/fake_file.h
index f688ed296fd..20825069ea0 100644
--- a/source3/include/fake_file.h
+++ b/source3/include/fake_file.h
@@ -1,18 +1,18 @@
-/*
+/*
Unix SMB/CIFS implementation.
FAKE FILE support, for faking up special files windows want access to
--
Samba Shared Repository