summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* python/join: use the provided krbtgt link in cleanup_old_accountsDouglas Bagnall2020-07-171-1/+1
| | | | | | | | | Before we were putting it in an otherwise unused variable, and deleting the previous krbtgt_dn, if any. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
* python/upgradehelpers: remove unused imports and variablesDouglas Bagnall2020-07-171-1/+1
| | | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
* samba-tool ntacl: remove unused imports and variablesDouglas Bagnall2020-07-171-1/+1
| | | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
* s4/scripting/samba_dnsupdate: remove unreachable codeDouglas Bagnall2020-07-171-7/+2
| | | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
* python/ms_forest_updates_markdown: avoid implicit global variableDouglas Bagnall2020-07-171-1/+1
| | | | | | | | out_dict would have been shared across all calls, aggregating values as it went. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
* dbcheck: omit unused argument in err_wrong_default_sdDouglas Bagnall2020-07-171-2/+2
| | | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
* s4/torture: fix compilation in smb2/multichannelDouglas Bagnall2020-07-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | GCC 9.3.0 doesn't like a true array being compared to NULL. [3628/3972] Compiling source4/torture/smb2/multichannel.c ../../source4/torture/smb2/multichannel.c:1077:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] if (trees2 == NULL || trees2[i] == NULL) { ^~~~~~ ~~~~ ../../source4/torture/smb2/multichannel.c:1284:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] if (trees2 == NULL || trees2[i] == NULL) { ^~~~~~ ~~~~ ../../source4/torture/smb2/multichannel.c:2337:7: error: comparison of array 'trees2' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] if (trees2 == NULL || trees2[i] == NULL) { ^~~~~~ ~~~~ 3 errors generated. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Jul 17 07:16:31 UTC 2020 on sn-devel-184
* s4/torture/smb2/oplock: fix compilation by initialising variableDouglas Bagnall2020-07-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0: ../../source4/torture/smb2/oplock.c:2709:2: error: variable 'h2' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "Incorrect status"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../lib/torture/torture.h:734:3: note: expanded from macro 'torture_assert_ntstatus_ok_goto' torture_assert_ntstatus_equal_goto(torture_ctx,expr,NT_STATUS_OK,ret,label,cmt) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../lib/torture/torture.h:302:6: note: expanded from macro 'torture_assert_ntstatus_equal_goto' if (!NT_STATUS_EQUAL(__got, __expected)) { \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../source4/torture/smb2/oplock.c:2730:25: note: uninitialized use occurs here smb2_util_close(tree1, h2); ^~ ../../source4/torture/smb2/oplock.c:2709:2: note: remove the 'if' if its condition is always false torture_assert_ntstatus_ok_goto(tctx, status, ret, done, "Incorrect status"); ^ ../../lib/torture/torture.h:734:3: note: expanded from macro 'torture_assert_ntstatus_ok_goto' torture_assert_ntstatus_equal_goto(torture_ctx,expr,NT_STATUS_OK,ret,label,cmt) ^ ../../lib/torture/torture.h:302:2: note: expanded from macro 'torture_assert_ntstatus_equal_goto' if (!NT_STATUS_EQUAL(__got, __expected)) { \ ^ ../../source4/torture/smb2/oplock.c:2652:2: note: variable 'h2' is declared here struct smb2_handle h, h1, h2; ^ 1 error generated. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: libsmb: Namecache. Fix bug missed by me in previous cleanup.Jeremy Allison2020-07-171-1/+1
| | | | | | | | | | | | | In ipstr_list_make() we need to look at the correct array entry to determine the ss_family for the sockaddr_storage. Otherwise we are always storing the type of the first entry. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jul 17 05:54:31 UTC 2020 on sn-devel-184
* s3-libads: Pass timeout to open_socket_out in msIsaac Boukris2020-07-161-1/+3
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13124 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jul 16 10:41:40 UTC 2020 on sn-devel-184
* s3: libsmb: Cleanup - Make ipstr_list_make() talloc rather than malloc.Jeremy Allison2020-07-161-73/+60
| | | | | | | | | | | | | | | | | | Remove the excessive and unneeded ipstr_list_add() function, fold it into ipstr_list_make() to make it much clearer what we're doing. The only use of MALLOC now is in ipstr_list_parse() returned by namecache_fetch(). We need to fix the caller before we can move that to talloc. As that is used inside internal_resolve_name() which is designed to return a MALLOC'ed ip list from all name resolution mechanisms leave that fix for another day. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 16 08:16:31 UTC 2020 on sn-devel-184
* s3: libsmb: Cleanup - Move DEBUG -> DBG_XXX() macros.Jeremy Allison2020-07-161-16/+12
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Cleanup - make namecache_status_record_key() use talloc.Jeremy Allison2020-07-161-12/+21
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Cleanup - make namecache_key() use talloc.Jeremy Allison2020-07-161-13/+14
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Cleanup - namecache_store() - use common out.Jeremy Allison2020-07-161-8/+7
| | | | | | | Prepare for moving malloc values to talloc. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Cleanup - namecache_store() initialize stack variables.Jeremy Allison2020-07-161-2/+3
| | | | | | | Preparing for common out: exit. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Cleanup - move talloc frame out of inner scope.Jeremy Allison2020-07-161-3/+6
| | | | | | | | Make it available thoughout the function. Prepare to use talloc for namecache_key(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb: Cleanup modern coding standards. 'True/False' -> 'true/false'.Jeremy Allison2020-07-161-12/+12
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: lib: Cleanup - make ipstr_list_make() and ipstr_list_parse() private to ↵Jeremy Allison2020-07-162-6/+2
| | | | | | | the only user. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: lib: Cleanup - nothing uses ipstr_list_free(). Remove it.Jeremy Allison2020-07-162-12/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: lib: Cleanup - all the ipstr_XXX() functions are only used in namecache.c.Jeremy Allison2020-07-162-164/+164
| | | | | | | Move them there. Will remove from the global namespace next. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* ctdb-tools: Improve onnode's ShellCheck credibilityMartin Schwenke2020-07-161-2/+2
| | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu Jul 16 06:51:47 UTC 2020 on sn-devel-184
* ctdb-tools: Allow onnode -P to respect ONNODE_SSHMartin Schwenke2020-07-161-0/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tools: Whitespace fixupsMartin Schwenke2020-07-161-14/+14
| | | | | | | Drop some unnecessary whitespace and re-indent push(). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tools: Drop undocumented ONNODE_SSH_OPTS variableMartin Schwenke2020-07-161-2/+1
| | | | | | | Options can be set in ONNODE_SSH, so this variable is unnecessary. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* util: Fix a signed/unsigned comparisonMartin Schwenke2020-07-161-1/+1
| | | | | | | | | | | | | | [107/390] Compiling lib/util/time.c ../../../lib/util/time.c: In function ‘timespec_string_buf’: ../../../lib/util/time.c:416:10: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 416 | if (len == -1) { | ^~ Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 16 04:00:52 UTC 2020 on sn-devel-184
* tdb: Fix some signed/unsigned comparisonsMartin Schwenke2020-07-161-2/+3
| | | | | | | | | | | | | | | [207/389] Compiling lib/tdb/tools/tdbdump.c ../../../lib/tdb/tools/tdbrestore.c: In function ‘read_linehead’: ../../../lib/tdb/tools/tdbrestore.c:43:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 43 | for (i=0; i<sizeof(prefix); i++) { | ^ ../../../lib/tdb/tools/tdbrestore.c: In function ‘read_data’: ../../../lib/tdb/tools/tdbrestore.c:95:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 95 | for (i=0; i<size; i++) { | ^ Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: Remove code inside #ifdef HAVE_BROKEN_READDIR_NAMEChristof Schmitt2020-07-161-6/+0
| | | | | | | This is dead code, the define is never set. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/util: Remove code inside #ifdef HAVE_BROKEN_READDIR_NAMEChristof Schmitt2020-07-161-5/+0
| | | | | | | This is dead code, the define is never set. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/util: Remove code inside #ifdef NEXT2Christof Schmitt2020-07-161-5/+0
| | | | | | | This is dead code, the define is never set. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:client: Remove code inside #ifdef NEXT2Christof Schmitt2020-07-161-5/+0
| | | | | | | This is dead code, the define is never set. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd: Remove code inside #ifdef NEXT2Christof Schmitt2020-07-161-5/+0
| | | | | | | This is dead code, the define is never set. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:smbd: stop accepting multichannel connections early in exit_server_common()Stefan Metzmacher2020-07-143-1/+23
| | | | | | | | | | | | | This is just a step in the correct direction, but there's still a possible race... BUG: https://bugzilla.samba.org/show_bug.cgi?id=14433 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jul 14 14:59:19 UTC 2020 on sn-devel-184
* s3:smbd: move exit_firsttime checking to the start of exit_server_common()Stefan Metzmacher2020-07-141-3/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14433 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/smb2: make smb2.durable-v2-delay tests more robustStefan Metzmacher2020-07-141-25/+27
| | | | | | | | We should not crash when the test fails, so we use a 2nd independent connection to unlink the file at the end. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/smb2: split replay_smb3_specification into durable handle and ↵Stefan Metzmacher2020-07-142-9/+51
| | | | | | | | | | | | multichannel It's better to have durable handles and multichannel tested separate: 1. we test both cases in the server 2. it makes it easier to deal with knownfail entries if only one of these features is active on the server. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3: lib: Fix missing TALLOC_FREE in error code path.Jeremy Allison2020-07-141-1/+1
| | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14441 Reported by Alexander Pyhalov <apyhalov@gmail.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jul 14 07:42:54 UTC 2020 on sn-devel-184
* net: ignore possible SIGPIPE upon ldap_unbind when over TLSIsaac Boukris2020-07-131-0/+3
| | | | | | | | | | | | | | | | | | | | | From local tests with strace: socket(AF_UNIX, SOCK_STREAM, 0) = 12 write(2, "Connecting to 10.53.57.21 at por"..., 38) = 38 ... write(2, "ads_domain_func_level: 3\n", 25) = 25 write(12, "\27\3\3\0\37\0\0\0\0\0\0\0\16nl[\374\375i\325\334\25\227kxG@\326\311R\225x"..., 36) = 36 write(12, "\25\3\3\0\32\0\0\0\0\0\0\0\17Hh\304\254\244\17\342<\334\210L&\20_\177\307\232P", 31) = -1 EPIPE (Broken pipe) --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=12089, si_uid=1000} --- +++ killed by SIGPIPE +++ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14439 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Mon Jul 13 12:06:07 UTC 2020 on sn-devel-184
* ads: set sasl-wrapping to plain when over TLSIsaac Boukris2020-07-133-1/+9
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14439 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Fix ads_set_sasl_wrap_flags to only change sasl flagsIsaac Boukris2020-07-132-3/+7
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14439 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Decouple ldap-ssl-ads from ldap-ssl optionIsaac Boukris2020-07-137-13/+57
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14439 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: add tests for net-ads over TLSIsaac Boukris2020-07-134-0/+95
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14439 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* docs: Fix documentation for require_membership_of of pam_winbindAndreas Schneider2020-07-101-3/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14358 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jul 10 09:40:37 UTC 2020 on sn-devel-184
* winbind: Fix lookuprids cache problemVolker Lendecke2020-07-092-2/+2
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=14435 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 9 21:40:52 UTC 2020 on sn-devel-184
* winbind: Add test for lookuprids cache problemVolker Lendecke2020-07-093-0/+27
| | | | | | | | | | | | | | | | | | | | When reading entries from gencache, wb_cache_rids_to_names() can return STATUS_SOME_UNMAPPED, which _wbint_LookupRids() does not handle correctly. This test enforces this situation by filling gencache with one wbinfo -R and then erasing the winbindd_cache.tdb. This forces winbind to enter the domain helper process, which will then read from gencache filled with the previous wbinfo -R. Without having the entries cached this does not happen because wb_cache_rids_to_names() via the do_query: path calls deep inside calls dcerpc_lsa_lookup_sids_noalloc(), which hides the STATUS_SOME_UNMAPPED that came in as lsa_LookupSids result value. Bug: https://bugzilla.samba.org/show_bug.cgi?id=14435 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* torture3: Align integer typesVolker Lendecke2020-07-091-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* torture3: Silence two signed/unsigned warningsVolker Lendecke2020-07-091-2/+2
| | | | | | | | | A longer fix would be to change the callbacks to use "int" instead of "unsigned". Arguably that might be cleaner, but as this is torture code I opted for the minimum necessary change. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* libcli/ldap: Fix decoding struct ldap_ExtendedResponseVolker Lendecke2020-07-092-3/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libcli/ldap: Test decoding an exop responseVolker Lendecke2020-07-093-0/+44
| | | | | | | | ldap-starttls-response.dat is a reply to a starttls extended operation. Right now ldap_decode() does not handle this correctly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* WHATSNEW: Start release notes for Samba 4.14.0pre1.Karolin Seeger2020-07-091-38/+2
| | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Thu Jul 9 08:43:25 UTC 2020 on sn-devel-184