[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4e624478dcd s4 auth ntlm: Fix integer overflow in authsam_password_check_and_record from 181afa9f68c s3:libsmb: Use cli_credentials directly https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4e624478dcd119f80f33b024b2f0b9a41688b425 Author: Gary Lockyer Date: Wed Jan 13 12:04:18 2021 +1300 s4 auth ntlm: Fix integer overflow in authsam_password_check_and_record Fix a ubsan detected integer overflow. ../../source4/auth/ntlm/auth_sam.c:445:56: runtime error: signed integer overflow: 60 * 6 cannot be represented in type 'int' In practice this meant that the default for the smb.conf parameter "old password allowed period" was approximately 16 seconds, rather than the intended 60 minutes. Similarly the value used would be 22.5 times less than the value specified in smd.conf. Signed-off-by: Gary Lockyer Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jan 13 23:52:38 UTC 2021 on sn-devel-184 --- Summary of changes: source4/auth/ntlm/auth_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c index 70eddc12c53..c5b27171937 100644 --- a/source4/auth/ntlm/auth_sam.c +++ b/source4/auth/ntlm/auth_sam.c @@ -442,7 +442,8 @@ static NTSTATUS authsam_password_check_and_record(struct auth4_context *auth_con /* * NTTIME uses 100ns units */ - allowed_period = allowed_period_mins * 60 * 1000*1000*10; + allowed_period = (NTTIME) allowed_period_mins * +60 * 1000*1000*10; pwdLastSet = samdb_result_nttime(msg, "pwdLastSet", 0); tv_now = timeval_current(); now = timeval_to_nttime(&tv_now); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 181afa9f68c s3:libsmb: Use cli_credentials directly via 78c4043a28c s3:libsmb: Pass cli_credentials to get_ipc_connect_master_ip() via be18d600f7e s3:libsmb: Pass cli_credentials to get_ipc_connect() via ce3a3c7eab3 s3:waf: Do not link tevent_glib_glue_test against popt_samba3 via 999cbc47a71 s3:waf: Do not link smbspool against popt_samba3 via 0f4827944bf s3:utils: Remove unused popt_common.h header from log2pcaphex.c via e8eecc8a9e8 s3:utils: Remove unused popt_common.h header from net_vfs.c via e0ef27f03d2 s3:utils: Remove unused popt_common.h header from net_rpc_shell.c via c6ce7f2def3 s3:utils: Fix header and deps of mvxattr via 33806a9ed95 s3:utils: Remove unused header and deps from destroy_netlogon_creds_cli from 39ce7332109 s3: smbd: Add call to conn_setup_case_options() to create_conn_struct_as_root(). https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 181afa9f68ca7ed0a60ac69f5ad62ee70d89a599 Author: Andreas Schneider Date: Wed Jan 13 15:46:22 2021 +0100 s3:libsmb: Use cli_credentials directly Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Wed Jan 13 21:32:52 UTC 2021 on sn-devel-184 commit 78c4043a28cebfaeaaab2465a74d03f225d48b60 Author: Andreas Schneider Date: Wed Jan 13 15:40:08 2021 +0100 s3:libsmb: Pass cli_credentials to get_ipc_connect_master_ip() Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit be18d600f7ed302868ae23fe72b44161e792924e Author: Andreas Schneider Date: Wed Jan 13 15:35:11 2021 +0100 s3:libsmb: Pass cli_credentials to get_ipc_connect() Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit ce3a3c7eab34ce849b9db7c073e9743e433c255c Author: Andreas Schneider Date: Wed Jan 13 14:59:20 2021 +0100 s3:waf: Do not link tevent_glib_glue_test against popt_samba3 This isn't used at all. Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 999cbc47a71596f9f67196e8f15334df6ee1b698 Author: Andreas Schneider Date: Wed Jan 13 14:58:10 2021 +0100 s3:waf: Do not link smbspool against popt_samba3 This isn't used at all. Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 0f4827944bf6241b3823e41b15f9124fbe7539d5 Author: Andreas Schneider Date: Wed Jan 13 13:35:20 2021 +0100 s3:utils: Remove unused popt_common.h header from log2pcaphex.c Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit e8eecc8a9e84ba2c342e77723ca26d0de03429cb Author: Andreas Schneider Date: Wed Jan 13 13:23:47 2021 +0100 s3:utils: Remove unused popt_common.h header from net_vfs.c Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit e0ef27f03d2b93f1273d9c4327c607bacb4e8990 Author: Andreas Schneider Date: Wed Jan 13 09:31:41 2021 +0100 s3:utils: Remove unused popt_common.h header from net_rpc_shell.c Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit c6ce7f2def3e9fa4e649522b8ba9f44ef8f61ada Author: Andreas Schneider Date: Wed Jan 13 09:11:04 2021 +0100 s3:utils: Fix header and deps of mvxattr Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 33806a9ed95006491a1a576d6b5182c32270c82e Author: Andreas Schneider Date: Wed Jan 13 09:04:01 2021 +0100 s3:utils: Remove unused header and deps from destroy_netlogon_creds_cli Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke --- Summary of changes: source3/libsmb/cliconnect.c| 11 +-- source3/libsmb/libsmb_dir.c| 13 +++-- source3/libsmb/proto.h | 4 ++-- source3/utils/destroy_netlogon_creds_cli.c | 1 - source3/utils/log2pcaphex.c| 2 +- source3/utils/mvxattr.c| 2 +- source3/utils/net_rpc_shell.c | 3 ++- source3/utils/net_vfs.c| 1 - source3/utils/wscript_build| 5 +++-- source3/wscript_build | 2 -- 10 files changed, 21 insertions(+), 23 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 8ee60df0c99..b95b14b018c 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -23,7 +23,6 @@ #include "includes.h" #include "libsmb/libsmb.h" #include "libsmb/namequery.h" -#include "auth_info.h" #include "../libcli/auth/libcli_auth.h" #include "../libcli/auth/spnego.h" #include "smb_krb5.h" @@ -3844,7 +3843,7 @@ fail: struct cli_state *get_i
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 39ce7332109 s3: smbd: Add call to conn_setup_case_options() to create_conn_struct_as_root(). via ab7700177c2 s3: smbd: Factor out setting up case parameters for a share to a function - conn_setup_case_options(). from 081afc495f5 WHATSNEW: Change order. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 39ce73321093a0a5e25f574d0d32d7f88892de46 Author: Jeremy Allison Date: Tue Jan 12 11:44:44 2021 -0800 s3: smbd: Add call to conn_setup_case_options() to create_conn_struct_as_root(). Ensures temporary DFS share doesn't leave the case parameters set as zero (i.e.: conn->case sensitive = 0 conn->share_case_preserve = 0 and default case is lower which can cause problems doing a DFS_GET_REFERRALS request). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14612 Signed-off-by: Jeremy Allison Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Wed Jan 13 18:14:31 UTC 2021 on sn-devel-184 commit ab7700177c2badbf8ed649985be8029223b6e946 Author: Jeremy Allison Date: Tue Jan 12 11:39:51 2021 -0800 s3: smbd: Factor out setting up case parameters for a share to a function - conn_setup_case_options(). Will allow it to be reused in the msdfs temporary share code. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14612 Signed-off-by: Jeremy Allison Reviewed-by: Anoop C S --- Summary of changes: source3/smbd/conn.c| 19 +++ source3/smbd/msdfs.c | 2 ++ source3/smbd/proto.h | 1 + source3/smbd/service.c | 11 +-- 4 files changed, 23 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 003926c97f6..044242d5697 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -232,3 +232,22 @@ void conn_free(connection_struct *conn) conn_free_internal(conn); } + +/* + * Correctly initialize a share with case options. + */ +void conn_setup_case_options(connection_struct *conn) +{ + int snum = conn->params->service; + + if (lp_case_sensitive(snum) == Auto) { + /* We will be setting this per packet. Set to be case + * insensitive for now. */ + conn->case_sensitive = false; + } else { + conn->case_sensitive = (bool)lp_case_sensitive(snum); + } + + conn->case_preserve = lp_preserve_case(snum); + conn->short_case_preserve = lp_short_preserve_case(snum); +} diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 7b5ea251501..dc07727f007 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -317,6 +317,8 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx, vfs_user = get_current_username(); } + conn_setup_case_options(conn); + set_conn_connectpath(conn, connpath); /* diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 7d6f8eda607..879ec71ae94 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -156,6 +156,7 @@ connection_struct *conn_new(struct smbd_server_connection *sconn); bool conn_idle_all(struct smbd_server_connection *sconn, time_t t); void conn_clear_vuid_caches(struct smbd_server_connection *sconn, uint64_t vuid); void conn_free(connection_struct *conn); +void conn_setup_case_options(connection_struct *conn); void conn_force_tdis( struct smbd_server_connection *sconn, bool (*check_fn)(struct connection_struct *conn, diff --git a/source3/smbd/service.c b/source3/smbd/service.c index b1ea0ea6a88..afdea38b016 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -557,16 +557,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn, ( lp_enable_asu_support() && strequal(dev,"ADMIN$")) ); /* Case options for the share. */ - if (lp_case_sensitive(snum) == Auto) { - /* We will be setting this per packet. Set to be case -* insensitive for now. */ - conn->case_sensitive = False; - } else { - conn->case_sensitive = (bool)lp_case_sensitive(snum); - } - - conn->case_preserve = lp_preserve_case(snum); - conn->short_case_preserve = lp_short_preserve_case(snum); + conn_setup_case_options(conn); conn->encrypt_level = lp_server_smb_encrypt(snum); if (conn->encrypt_level > SMB_ENCRYPTION_OFF) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v4-13-test updated
The branch, v4-13-test has been updated via fdeba39 vfs_fruit: fix close for fake_fd via 0391c7b55ff vfs_fruit: check fake_fd in fruit_pread_meta_stream() via 800a3dae912 vfs_fruit: use "fake_fd" instead of "created" via 124a7dc0680 vfs_streams_xattr: make use of vfs_fake_fd_close() via 15e4e106fe4 vfs_fruit: make use of vfs_fake_fd_close() via a01b3646a54 s3:smbd: add vfs_fake_fd_close() helper via 1581c4c0752 s3:lib: Create the cache path of user gencache recursively via c28deed6da1 lib:util: Add directory_create_or_exists_recursive() via 9ab30ab1c80 vfs_virusfilter: Allocate separate memory for config char* from fc15ff8951f Do not create an empty DB when accessing a sam.ldb https://git.samba.org/?p=samba.git;a=shortlog;h=v4-13-test - Log - commit fdeba393ac7d7488413f252d8b4b2efe0485 Author: Ralph Boehme Date: Fri Dec 11 12:59:28 2020 +0100 vfs_fruit: fix close for fake_fd If the next backend doesn't use kernel fd's should not pass a fake_fd to the next backend. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Jan 8 21:38:18 UTC 2021 on sn-devel-184 (back-ported from commit 564b62a6f7c0a9b9712946d723118122b9c3785f) Autobuild-User(v4-13-test): Karolin Seeger Autobuild-Date(v4-13-test): Wed Jan 13 14:45:03 UTC 2021 on sn-devel-184 commit 0391c7b55ff2810cbd3847700bf2183d86167d14 Author: Ralph Boehme Date: Fri Dec 11 13:00:56 2020 +0100 vfs_fruit: check fake_fd in fruit_pread_meta_stream() Don't call into the next VFS backend if we know we still have a fake-fd. Just return -1 and the caller has the logic to handle this, which results in returning a AFP_AfpInfo blob initialized with some defaults. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (back-ported from commit c5da08422990dfc1e082bc01aa10d6e415eebe3f) commit 800a3dae9126bcacdc0b21f0b71dc38d94e3faa9 Author: Ralph Boehme Date: Fri Dec 11 13:00:09 2020 +0100 vfs_fruit: use "fake_fd" instead of "created" Both have basically the same semantics. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (back-ported from commit 36eb30fd7d4b82bffd0e1ab471c088f678d700a4) commit 124a7dc068045362428dada609a41162455a6ff5 Author: Stefan Metzmacher Date: Fri Dec 18 14:36:00 2020 +0100 vfs_streams_xattr: make use of vfs_fake_fd_close() When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. That may allows us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 40e70cbd3c3a1df9205a7b18d07784c1754cc340) commit 15e4e106fe4c5a2310151dc4f88f25216306fa96 Author: Stefan Metzmacher Date: Fri Dec 18 14:36:00 2020 +0100 vfs_fruit: make use of vfs_fake_fd_close() When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. That may allows us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 719c83b4dc4cef16429ec2803621039545f6885e) commit a01b3646a540fb982c661a2550c5bfb49f62aa2f Author: Stefan Metzmacher Date: Fri Dec 18 14:03:09 2020 +0100 s3:smbd: add vfs_fake_fd_close() helper When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. This makes code easier to understand and may allow us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 8f057333466b2d9845cd8bc2b794d98252ade2a4) commit 1581c4c075270f26a1d1fc363dbcc8ccd44fc6c7 Author: Andreas Schneider Date: Mon Dec 21 10:36:46 2020 +0100 s3:lib: Create the cache path of user gencache recursively BUG: https://bugzilla.samba.org/show_bug.cgi?id=14601 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jan 6 23:59:58 UTC 2021 on sn-devel-184
[SCM] Samba Shared Repository - branch v4-12-test updated
The branch, v4-12-test has been updated via 121fbf80523 vfs_fruit: fix close for fake_fd via 8a77dcd6935 vfs_fruit: check fake_fd in fruit_pread_meta_stream() via 00b37ef3cdf vfs_fruit: use "fake_fd" instead of "created" via 1bd5ffc109b vfs_streams_xattr: make use of vfs_fake_fd_close() via cbdd15c13aa vfs_fruit: make use of vfs_fake_fd_close() via 83bd07f3806 s3:smbd: add vfs_fake_fd_close() helper via 6da2e77cf81 s3:lib: Create the cache path of user gencache recursively via 83e0a8cdd13 lib:util: Add directory_create_or_exists_recursive() via 6adf3619069 vfs_virusfilter: Allocate separate memory for config char* from 578c5805ac7 Do not create an empty DB when accessing a sam.ldb https://git.samba.org/?p=samba.git;a=shortlog;h=v4-12-test - Log - commit 121fbf80523e4456a0fc068e08b0e6379d39200d Author: Ralph Boehme Date: Fri Dec 11 12:59:28 2020 +0100 vfs_fruit: fix close for fake_fd If the next backend doesn't use kernel fd's should not pass a fake_fd to the next backend. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Fri Jan 8 21:38:18 UTC 2021 on sn-devel-184 (back-ported from commit 564b62a6f7c0a9b9712946d723118122b9c3785f) Autobuild-User(v4-12-test): Karolin Seeger Autobuild-Date(v4-12-test): Wed Jan 13 13:45:00 UTC 2021 on sn-devel-184 commit 8a77dcd69358a3f16ae7a93f9e7f606967ab2951 Author: Ralph Boehme Date: Fri Dec 11 13:00:56 2020 +0100 vfs_fruit: check fake_fd in fruit_pread_meta_stream() Don't call into the next VFS backend if we know we still have a fake-fd. Just return -1 and the caller has the logic to handle this, which results in returning a AFP_AfpInfo blob initialized with some defaults. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (back-ported from commit c5da08422990dfc1e082bc01aa10d6e415eebe3f) commit 00b37ef3cdf78236dbd2289e702a3fca89dba1a6 Author: Ralph Boehme Date: Fri Dec 11 13:00:09 2020 +0100 vfs_fruit: use "fake_fd" instead of "created" Both have basically the same semantics. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison (back-ported from commit 36eb30fd7d4b82bffd0e1ab471c088f678d700a4) commit 1bd5ffc109b426903aca8bb913dc504e3e8dbb0d Author: Stefan Metzmacher Date: Fri Dec 18 14:36:00 2020 +0100 vfs_streams_xattr: make use of vfs_fake_fd_close() When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. That may allows us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 40e70cbd3c3a1df9205a7b18d07784c1754cc340) commit cbdd15c13aa89834b11dc5ec9c6f23cdab692aeb Author: Stefan Metzmacher Date: Fri Dec 18 14:36:00 2020 +0100 vfs_fruit: make use of vfs_fake_fd_close() When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. That may allows us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 719c83b4dc4cef16429ec2803621039545f6885e) commit 83bd07f3806d212a3051e02897fdceb36557d78b Author: Stefan Metzmacher Date: Fri Dec 18 14:03:09 2020 +0100 s3:smbd: add vfs_fake_fd_close() helper When we used vfs_fake_fd() we should use vfs_fake_fd_close() in order to have things symetric. This makes code easier to understand and may allow us to change vfs_fake_fd() internally if required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14596 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Jeremy Allison (back-ported from commit 8f057333466b2d9845cd8bc2b794d98252ade2a4) commit 6da2e77cf81f13ca23bbad0454e068c6b74a181e Author: Andreas Schneider Date: Mon Dec 21 10:36:46 2020 +0100 s3:lib: Create the cache path of user gencache recursively BUG: https://bugzilla.samba.org/show_bug.cgi?id=14601 Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Jan 6 23:59:58 UTC 2021 on sn-devel-184