summaryrefslogtreecommitdiff
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd: fix interaction between chown and SD flagsRalph Boehme2018-05-241-2/+5
| | | | | | | | | | | | | | | A change ownership operation that doesn't set the NT ACLs must not touch the SD flags (type). Bug: https://bugzilla.samba.org/show_bug.cgi?id=13432 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 11 23:30:32 CEST 2018 on sn-devel-144 (cherry picked from commit ced55850034a3653525823bf9623912a4fcf18a0)
* winbind: Fix UPN handling in canonicalize_username()Andreas Schneider2018-05-246-19/+44
| | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 11 12:02:37 CEST 2018 on sn-devel-144 (cherry picked from commit 1766f77493c5a76e4d7d1e5eedcaa150cc9ea552)
* winbind: Fix UPN handling in parse_domain_user()Andreas Schneider2018-05-249-56/+151
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit a05b63db627fdbe0bdea4d144dfaeedb39025592)
* winbind: Remove unused function parse_domain_user_talloc()Andreas Schneider2018-05-242-14/+0
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 32770e929ace8fe3f2469037ed887be14b3c5503)
* winbind: Pass upn unmodified to lookup namesStefan Metzmacher2018-05-248-16/+36
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 789c89e6ecb7d388fb5acdd5abc8fe99c58524f0)
* nsswitch:tests: Add test for wbinfo --user-infoAndreas Schneider2018-05-241-0/+14
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 2715f52f54e66a73131a92d752a8c2447da1fd33)
* nsswitch: Add a test looking up the user using the upnAndreas Schneider2018-05-241-1/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 0d2f743d826b87b369e25fc6bb9ff61f2b0896aa)
* winbindd: Do re-connect if the RPC call fails in the passdb caseAndrew Bartlett2018-05-141-0/+128
| | | | | | | | | | | | | | This is very, very unlikely but possible as in the AD case the RPC server is in another process that may eventually be able to restart. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13430 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit fc9150dcab231fe9beb72e198b0c2742d5f2505f) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Mon May 14 15:11:11 CEST 2018 on sn-devel-144
* winbindd: Add a cache of the samr and lsa handles for the passdb domainAndrew Bartlett2018-05-141-108/+159
| | | | | | | | | | | | This domain is very close, in AD DC configurations over a internal ncacn_np pipe and otherwise in the same process via C linking. It is however very expensive to re-create the binding handle per SID->name lookup, so keep a cache. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13430 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit d418d0ca33afb41a793a2fff19ca68871aa5e9ef)
* vfs_ceph: add fake async pwrite/pread send/recv hooksDavid Disseldorp2018-05-141-1/+108
| | | | | | | | | | | | | | As found by Jeremy, VFS modules that don't provide pread_send() or pwrite_send() hooks result in vfs_default fallback, which is catastrophic for VFS modules with non-mounted filesystems such as vfs_ceph. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13425 Reported-by: Jeremy Allison <jra@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit f0e6453b0420fe9d062936d4ddc05f44b40cf2ba)
* s3: VFS: Fix memory leak in vfs_ceph.Vandana Rungta2018-05-141-10/+11
| | | | | | | | | | | | | | | Centralize error handling. https://bugzilla.samba.org/show_bug.cgi?id=13424 Signed-off-by: Vandana Rungta <vrungta@amazon.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed May 9 04:28:11 CEST 2018 on sn-devel-144 (cherry picked from commit 4e78aeedb8329953df83fc7f2c191b2c97a051d0)
* s3:cleanupd: sends MSG_SMB_UNLOCK twice to interested peersRalph Boehme2018-05-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | MSG_SMB_UNLOCK should be send to smbd that are waiting on blocked byte-range-locks when a lock holder died. In smbd_cleanupd_unlock() we do this twice: once via a broadcast and then again via brl_revalidate() to processes that are actually recorded in brlock.tdb. As brl_revalidate() should already take care of signaling anyone who would be interested in the message, there's no need to broadcast. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13416 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 4 03:02:28 CEST 2018 on sn-devel-144 (cherry picked from commit 53ff08a2cf838c0f1c3f050ac2aa13fc3acc5981)
* s3:smbspool: Fix cmdline argument handlingAndreas Schneider2018-05-092-19/+72
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13417 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit a753ccfd946aaad320977ae8c5f483f73077c3f8) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Wed May 9 14:22:22 CEST 2018 on sn-devel-144
* smbspool: Improve URI handling codeAndreas Schneider2018-05-091-11/+18
| | | | | | | | | | This also checks that the URI given via the environment variables starts with smb:// Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> (cherry picked from commit a6eac8f64989235e7a297c14e349d98a3fc70e47)
* s3: libsmbclient: Fix hard-coded connection error return of ETIMEDOUT.Jeremy Allison2018-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | We shouldn't hard-code the connection error as ETIMEDOUT when we have a perfectly good NT_STATUS to map from. Found by the ChromeOS guys trying to connect an SMB2-only client to an SMB1-only supporting server. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13419 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 3 02:42:20 CEST 2018 on sn-devel-144 (cherry picked from commit 795ec751ac5f6e58966385bec25063c4af4f185d) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Mon May 7 14:25:28 CEST 2018 on sn-devel-144
* s3:cleanupd: use MSG_SMB_BRL_VALIDATE to signal cleanupd unclean process ↵Ralph Boehme2018-05-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | shutdown Since 6423ca4bf293cac5e2f84b1a37bb29b06b5c05ed messaging_send_all() broadcasts messages in a cluster, so cleanupd receives those broadcasts and acts upon it by re-broadcasting the message. Result: message storm. By reactivating the currently unused MSG_SMB_BRL_VALIDATE for the trigger message to cleanupd we avoid the storm. Note that MSG_SMB_BRL_VALIDATE was unused only in the sense that noone *listened* to it, but we were still *sending* the message in smbd_parent_ctdb_reconfigured(). de6fe2a1dd6ab03b1c369b61da17fded72305b2d removed listening for MSG_SMB_BRL_VALIDATE from cleanupd. This commits brings it back. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13414 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit d3b9d11bade8bc52d08688ee66a4a20fe0a31a04)
* ceph: VFS: Add asynchronous fsync to ceph module, fake using synchronous call.Jeremy Allison2018-05-071-0/+53
| | | | | | | | | | | | | | | This will allow me to ultimately simplify the VFS by removing the synchronous fsync VFS call. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13412 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Apr 30 21:48:55 CEST 2018 on sn-devel-144 (cherry picked from commit aefe444d17a2eee3c0ff38bd34cf9e3f012ecf51)
* rpc_server: Fix NetSessEnum with stale sessionsChristof Schmitt2018-05-071-0/+4
| | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13407 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 25 22:49:07 CEST 2018 on sn-devel-144 (cherry picked from commit a6fade4e10760284ef56abf45d3fa70038091cbe)
* selftest: Add testcase for querying sessions after smbd crashChristof Schmitt2018-05-072-0/+61
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13407 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit e04846c7df8e3eec1f3dbb2fc5eaf47ceb1c44d2)
* rpcclient: Print number of entries for NetSessEnumChristof Schmitt2018-05-071-0/+2
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13407 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 501819fa9e7926c2f54cb92d508ac0e8437fd476)
* printing: return the same error code as windows does on upload failuresBjörn Jacke2018-05-071-1/+1
| | | | | | | | | | | | | | | | Some print drivers inf files are broken and cause driver installation to fail on Samba servers. Windows returns WERR_APP_INIT_FAILURE in that case, we should do the same. Windows machines are less unlucky with that. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13395 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Wed Apr 25 13:55:25 CEST 2018 on sn-devel-144 (cherry picked from commit 35f2afe411a3b22fb1befadb3bee8da1bc14753c)
* s3: tests: Regression test to ensure we can never return a DIRECTORY ↵Jeremy Allison2018-05-071-0/+76
| | | | | | | | | | | | | | | | | | attribute on a stream. Tests streams_xattr and also streams_depot. Inspired from a real-world test case by Andrew Walker <awalker@ixsystems.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 12 02:04:28 CEST 2018 on sn-devel-144 (cherry picked from commit 82beaf868f252c4bc975ddafd80240af6f679b83)
* s3: smbd. Generic fix for incorrect reporting of stream dos attributes on a ↵Jeremy Allison2018-05-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | directory According to MS-FSA a stream name does not have separate DOS attribute metadata, so we must return the DOS attribute from the base filename. With one caveat, a non-default stream name can never be a directory. As this is common to all streams data stores, we handle it here instead of inside all stream VFS modules. Otherwise identical logic would have to be added to all streams modules in their [f]get_dos_attribute_fn() VFS calls. Found in real-world use case by Andrew Walker <awalker@ixsystems.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> (cherry picked from commit 118e77d86a7171f589f805fa4f63246b0cb63672)
* s3: vfs: vfs_streams_xattr: Don't blindly re-use the base file mode bits.Jeremy Allison2018-05-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When returning the stat struct for an xattr stream, we originally base the st_ex_mode field on the value from the base file containing the xattr. If the base file is a directory, it will have S_IFDIR set in st_ex_mode, but streams can never be directories, they must be reported as regular files. The original code OR'ed in S_IFREG, but neglected to AND out S_IFDIR. Note this is not a complete to fix bug 13380 as it doesn't fix the generic case with all streams modules. See later fix and regression test. Found in real-world use case by Andrew Walker <awalker@ixsystems.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> (cherry picked from commit 4d839d0f46b723ed6809bb932b9ebe4ead2cec82)
* s3:modules: fix the build of vfs_aixacl2.cStefan Metzmacher2018-04-201-2/+3
| | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13345 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Apr 3 20:18:58 CEST 2018 on sn-devel-144 (cherry picked from commit 702665cc52d5dc05ae636519e1ffe9c296f5ef77) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Fri Apr 20 16:53:16 CEST 2018 on sn-devel-144
* s3:modules: make virusfilter_io_connect_path() more portableStefan Metzmacher2018-04-201-15/+16
| | | | | | | | | | We have existing utility functions to prepare a socket. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> (cherry picked from commit 74278a70389e2479d80ec5c88b01a09c141e8d39)
* s3:modules: fix the picky-developer build of vfs_virusfilter.c on FreeBSD 11Stefan Metzmacher2018-04-201-2/+3
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13344 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Jacke <bjacke@samba.org> (cherry picked from commit fb7b67af984812784756574df4f0fb55d472181b)
* vfs_virusfilter: Fix CID 1428738 Macro compares unsigned to 0Volker Lendecke2018-04-201-1/+1
| | | | | | | | | | | | | | vsnprintf returns "int" and not "size_t" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jan 31 05:28:48 CET 2018 on sn-devel-144 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343 (cherry picked from commit 21eb5169f46b8d819a5d5d028baff581e4e63de6)
* vfs_virusfilter: Fix CID 1428740 Macro compares unsigned to 0Volker Lendecke2018-04-201-1/+1
| | | | | | | | | | | vsnprintf returns "int" and not "size_t" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343 (cherry picked from commit 734404bbe911fd4aa6565b2a2aaecab4fbbf3c45)
* vfs_virusfilter: Fix CID 1428739 Buffer not null terminatedVolker Lendecke2018-04-201-1/+7
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343 (cherry picked from commit 8a4409c956bdbe5d928e685b7c219566d467a627)
* s3:passdb: Do not return OK if we don't have pinfo set upAndreas Schneider2018-04-201-1/+1
| | | | | | | | | | | This prevents a crash in fill_mem_keytab_from_secrets() BUG: https://bugzilla.samba.org/show_bug.cgi?id=13376 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 99859479fc6e12b2f74ce2dfa83da56d8b8f3d26)
* winbindd: add retry to _winbind_SendToSamRalph Boehme2018-04-201-1/+11
| | | | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Mar 15 20:57:44 CET 2018 on sn-devel-144 (cherry picked from commit c37fbfcb248e5a8d6088a28eb0c1a62423f94502)
* winbindd: add retry to _winbind_DsrUpdateReadOnlyServerDnsRecordsRalph Boehme2018-04-201-0/+10
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit e608f058b8f2d2295e24498daa35852de3212b23)
* winbindd: add retry to _wbint_DsGetDcNameRalph Boehme2018-04-201-18/+19
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit fcf8edf9b8cdf5f3897c1a63ed97c302a231742f)
* winbindd: add retry to _wbint_LookupSids()Ralph Boehme2018-04-201-1/+7
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit c2cd2d3f3137e27cd6e4cabd34f27b49251f078d)
* winbindd: use reset_cm_connection_on_error() instead of ↵Ralph Boehme2018-04-201-13/+7
| | | | | | | | | | | | dcerpc_binding_handle_is_connected() This catches more errors and triggers retry as appropriate. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 6244a2beb184de8d050389e304f087ef153d61dd)
* winbindd: fix logic calling dcerpc_binding_handle_is_connected()Ralph Boehme2018-04-201-4/+4
| | | | | | | | | | | | The calls were missing the negation operator, a retry should be attempted is the binding handle got somehow disconnected behind the scenes and is NOT connected. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 08718af36f3ed6cf2308beb3800abfb0414f94b9)
* winbindd: call dcerpc_binding_handle_is_connected() from ↵Ralph Boehme2018-04-203-23/+31
| | | | | | | | | | | | | | | reset_cm_connection_on_error() To consolidate the error handling for RPC calls, add the binding handle as an additional argument to reset_cm_connection_on_error(). All callers pass NULL for now, so no change in behaviour up to here. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 966ff3793a867a5ffe1a49e48c8ab3ecb02f8359)
* winbindd: force netlogon reauth for certain errors in ↵Ralph Boehme2018-04-201-0/+8
| | | | | | | | | | | | | | | reset_cm_connection_on_error() NT_STATUS_RPC_SEC_PKG_ERROR is returned by the server if the server doesn't know the server-side netlogon credentials anymore, eg after a reboot. If this happens we must force a full netlogon reauth. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 2d1f00cc3ad77bed4e810dc910979e6cdf582216)
* winbindd: call reset_cm_connection_on_error() from reconnect_need_retry()Ralph Boehme2018-04-201-7/+1
| | | | | | | | | | | | | | | | | This ensures we use the same disconnect logic in the reconnect backend, which calls reconnect_need_retry(), and in the dual_srv frontend which calls reset_cm_connection_on_error. Both reset_cm_connection_on_error() and reconnect_need_retry() are very similar, both return a bool indicating whether a retry should be attempted, unfortunately the functions have a different default return, so I don't dare unifying them, but instead just call one from the other. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 2837b796af3e491b6bb34bd441758ae214f629ee)
* winbindd: make reset_cm_connection_on_error() publicRalph Boehme2018-04-202-2/+6
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 17749a5d9fa08da1c61de45728656a2c9b85782d)
* winbindd: check for NT_STATUS_IO_DEVICE_ERROR in reset_cm_connection_on_error()Ralph Boehme2018-04-201-1/+3
| | | | | | | | | | | reconnect_need_retry() already checks for this error, it surfaces up from tstream_smbXcli_np as a mapping for EIO. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit a33c1d25e0422483c903001dd246626f84c4cbc1)
* winbindd: add and use ldap_reconnect_need_retry() in winbindd_reconnect_ads.cRalph Boehme2018-04-201-6/+52
| | | | | | | | | | | ldap_reconnect_need_retry() is a copy of reconnect_need_retry() minus the RPC connection invalidation. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit a8d5e4d36768bc199c631626488b2d0acbd6e91a)
* winbind: Keep "force_reauth" in invalidate_cm_connectionVolker Lendecke2018-04-201-1/+1
| | | | | | | | | | | | | | Right now I don't see a way to actually force a re-serverauth from the client side as long as an entry in netlogon_creds_cli.tdb exists. cm_connect_netlogon goes through invalidate_cm_connection, and this wipes our wish to force a reauthenticatoin. Keep this intact until we actually did reauthenticate. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 4b7a9d560a51b51ac88f30276c87edc097b00d0b)
* winbind: Add smbcontrol disconnect-dcVolker Lendecke2018-04-205-1/+64
| | | | | | | | | | Make a winbind child drop all DC connections Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (backported from commit 0af88b98e7e1bba14827305257e77b63dc82d902)
* utils: Add destroy_netlogon_creds_cliVolker Lendecke2018-04-202-0/+146
| | | | | | | | | | | | This is a pure testing utility that will garble the netlogon_creds_cli session_key. This creates a similar effect to our schannel credentials as does a domain controller reboot. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit bffae41842fe218959fe6f8b43df694feec1589c)
* smbclient: Handle ENUM_DIR in "notify" commandVolker Lendecke2018-04-191-2/+7
| | | | | | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13382 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 5 04:05:52 CEST 2018 on sn-devel-144 (cherry picked from commit 1452677ef0044815df0702de5424d4711e18144b) Autobuild-User(v4-8-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-8-test): Thu Apr 19 16:16:41 CEST 2018 on sn-devel-144
* libsmb: Handle IO_TIMEOUT in cli_smb2_notify properlyVolker Lendecke2018-04-191-0/+9
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13382 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit abfe482828e8c1dc233d67657a4d11a91a731f70)
* rpc_server: Init local_server_* in make_internal_rpc_pipe_socketpairVolker Lendecke2018-04-193-24/+43
| | | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13370 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Apr 11 15:19:19 CEST 2018 on sn-devel-144 (cherry picked from commit 212815969f4a706bc8395e2f6dbf225318ff2ad7)
* libads: Fix the build --without-adsVolker Lendecke2018-04-191-0/+4
| | | | | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Feb 6 02:47:44 CET 2018 on sn-devel-144 Bug: https://bugzilla.samba.org/show_bug.cgi?id=13273 (cherry picked from commit 859698d29b547217356851094ed8188236e717b6)