summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rpc_server: Fix NetSessEnum with stale sessionsChristof Schmitt2018-05-072-1/+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-073-0/+62
| | | | | | | | 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-072-0/+80
| | | | | | | | | | | | | | | | | | 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)
* winbindd: add retry to _winbind_SendToSamRalph Boehme2018-05-071-0/+9
| | | | | | | | | | | | 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 (backported from commit c37fbfcb248e5a8d6088a28eb0c1a62423f94502)
* winbindd: add retry to _winbind_DsrUpdateReadOnlyServerDnsRecordsRalph Boehme2018-05-071-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> (backported from commit e608f058b8f2d2295e24498daa35852de3212b23)
* winbindd: add retry to _wbint_DsGetDcNameRalph Boehme2018-05-071-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-05-071-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-05-071-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-05-071-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-05-073-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-05-071-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-05-071-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-05-072-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> (backported from commit 17749a5d9fa08da1c61de45728656a2c9b85782d)
* winbindd: check for NT_STATUS_IO_DEVICE_ERROR in reset_cm_connection_on_error()Ralph Boehme2018-05-071-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-05-071-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-05-071-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-05-076-1/+65
| | | | | | | | | | 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-05-072-0/+145
| | | | | | | | | | | | 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> (backported from commit bffae41842fe218959fe6f8b43df694feec1589c)
* nsswitch: fix memory leak in winbind_open_pipe_sock() when the privileged ↵Stefan Metzmacher2018-05-021-2/+2
| | | | | | | | | | | | | pipe is not accessable. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13400 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit ffe970007bf934955f72ec2d73bf8f94a2b796eb) Autobuild-User(v4-7-test): Stefan Metzmacher <metze@samba.org> Autobuild-Date(v4-7-test): Wed May 2 15:36:48 CEST 2018 on sn-devel-144
* s4:rpc_server: fix call_id truncation in dcesrv_find_fragmented_call()Stefan Metzmacher2018-04-252-5/+1
| | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13289 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Feb 21 19:02:56 CET 2018 on sn-devel-144 (cherry picked from commit 5d113f80944f2e1d2a7e80f73aea7a4cfdfbd140) Autobuild-User(v4-7-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-7-test): Wed Apr 25 13:15:10 CEST 2018 on sn-devel-144
* tests:dcerpc/raw_protocol: reproduce call_id truncation bugStefan Metzmacher2018-04-252-1/+5
| | | | | | | | | | We need to make sure the server handles call_id values > UINT16_MAX. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13289 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 65e8edb382fbc7450919aad8b42cfcae9e779d11)
* winbindd: initialize type = SID_NAME_UNKNOWN in wb_lookupsids_single_done()Stefan Metzmacher2018-04-251-1/+1
| | | | | | | | | | | We check for !NT_STATUS_LOOKUP_ERR(), but wb_lookupsid_recv() only initializes the results together with NT_STATUS_OK. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13280 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit b5ffa0e21f74fa0c452df38cf50e542eb278562d)
* winbindd: don't split the rid for SID_NAME_DOMAIN sids in wb_lookupsidsStefan Metzmacher2018-04-251-1/+3
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13279 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 17c48f26dea5701feed1c24769348f332695391c)
* 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) Autobuild-User(v4-7-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-7-test): Fri Apr 20 16:43:11 CEST 2018 on sn-devel-144
* lib/util: remove unused '#include <sys/syscall.h>' from tests/tfork.cStefan Metzmacher2018-04-201-1/+0
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13342 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit f2ff61ce9e8ab56d8a69fce29c9f214d5d98f89e)
* winbind: Use one queue for all domain childrenStefan Metzmacher2018-04-203-9/+125
| | | | | | | | | | | | | | | | | | | If we have multiple domain children, it's important that the first idle child takes over the next waiting request. Before we had the problem that a request could get stuck in the queue of a busy child, while later requests could get served fine by other children. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13292 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 23 09:04:23 CET 2018 on sn-devel-144 (similar to commit 7f2d45a6c2a88dd8833fc66d314ec21507dd52c3)
* winbind: Maintain a binding handle per domain and always go via ↵Volker Lendecke2018-04-204-14/+66
| | | | | | | | | | | | wb_domain_request_send() Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13292 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> (similar to commit b518cb0597d269002105644302c58ca8f9f0f717)
* winbind: make choose_domain_child() staticStefan Metzmacher2018-04-202-2/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13292 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 5116aff286bdffe4abc9ddda09cf64ab999fd13e)
* winbind: add locator_child_handle() and use it instead of child->binding_handleStefan Metzmacher2018-04-204-7/+13
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13292 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 44ebaaac8933f5fc16a043b8c15a9449746af47b)
* winbind: add idmap_child_handle() and use it instead of child->binding_handleStefan Metzmacher2018-04-205-9/+15
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13292 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit c2d78a0a0a3f9b9ade61cf707f23e59a1a16c61b)
* winbind: improve wb_domain_request_send() to use wb_dsgetdcname_send() for a ↵Stefan Metzmacher2018-04-201-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | foreign domain Commit ed3bc614cccec6167c64ac58d78344b6426cd019 got the logic wrong while trying to implement the logic we had in init_child_connection(), which was removed by commit d61f3626b79e0523beadff355453145aa7b0195c. Instead of doing a WINBINDD_GETDCNAME request (which would caused an error because the implementation was removed in commit 958fdaf5c3ba17969a5110e6b2b08babb9096d7e), we sent the callers request and interpreted the result as WINBINDD_GETDCNAME response, which led to an empty dcname variable. As result the domain child opened a connection to the primary domain in order to lookup a dc. If we want to connect the primary domain from the parent via a domain child of the primary domain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13295 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 1f41193e005df37401a28004f0a95d4d73b98ccd)
* winbind: use state->{ev,request} in wb_domain_request_send()Stefan Metzmacher2018-04-201-8/+9
| | | | | | | | | | This will reduce the diff for the following changes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13295 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 4d804f5f3e65df0e2f646d4f88793cab8e2f32d1)
* winbind: avoid using fstrcpy(dcname,...) in _dual_init_connectionStefan Metzmacher2018-04-201-1/+6
| | | | | | | | | | | | | domain->dcname was converted from fstring to char * by commit 14bae61ba36814ea5eca7c51cf1cc039e9e6803f. Luckily this was only ever called with an empty string in state->request->data.init_conn.dcname. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13294 Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit d73e3d451976e692c6c346f98547d7123f7b9006)
* winbind: cleanup winbindd_cli_state->pwent_state if winbindd_getpwent_recv() ↵Stefan Metzmacher2018-04-201-0/+1
| | | | | | | | | | | | | | returns an error A client may skip the explicit endpwent() if getgrent() fails. This allows client_is_idle() return true in more cases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13293 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit b158d4e4c1c3fee0a8884bc5e8f0c5a5ce49687f)
* winbind: cleanup winbindd_cli_state->grent_state if winbindd_getgrent_recv() ↵Stefan Metzmacher2018-04-201-0/+4
| | | | | | | | | | | | | | returns an error A client may skip the explicit endgrent() if getgrent() fails. This allows client_is_idle() return true in more cases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13293 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit b7789da8468c3f070727011639d5f74aca76cb59)
* winbind: call lp_winbind_enum_{users,groups}() already in set{pw,gr}ent()Stefan Metzmacher2018-04-204-10/+10
| | | | | | | | | | | | | This way we don't keep winbindd_cli_state->{pw,gr}ent_state arround forever, if the client forgets an explicit end{pw,gr}ent(). This allows client_is_idle() return true in more cases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13293 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 6548b82b5c1ed30ce14e17e4ba9d4bc24ab49c42)
* winbind: protect a pending wb_child_request against a talloc_free()Stefan Metzmacher2018-04-201-0/+29
| | | | | | | | | | | | | | | | If the (winbind) client gave up we call TALLOC_FREE(state->mem_ctx) in remove_client(). This triggers a recursive talloc_free() for all in flight requests. In order to maintain the winbindd parent-child protocol, we need to keep the orphaned wb_simple_trans request until the parent got the response from the child. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13290 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 43af57d8728883c5ddbe169e1483181246fb68a8)
* winbind: use tevent_queue_wait_send/recv in wb_child_request_*()Stefan Metzmacher2018-04-201-8/+23
| | | | | | | | | | | | | We need a way to keep the child->queue blocked without relying on the current 'req' (wb_child_request_state). The next commit will make use of this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13290 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit d29dda141e08af42c535e8718226f95c45aadab8)
* winbind: Improve child selectionVolker Lendecke2018-04-201-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | This improves the situation when a client request blocks a winbind child. This might be a slow samlogon or lookupnames to a domain that's far away. With random selection of the child for new request coming in we could end up with a long queue when other, non-blocked children could serve those new requests. Choose the shortest queue. This is an immediate and simple fix. Step two will be to have a per-domain and not a per-child queue. Right now we're pre-selecting the check-out queue at Fry's randomly without looking at the queue length. With this change we're picking the shortest queue. The better change will be what Fry's really does: One central queue and red/green lights on the busy/free checkout counters. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13290 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Feb 12 19:51:35 CET 2018 on sn-devel-144 (cherry picked from commit b4384b7f0ecf3b47dd60acaf77636b679e3adc05)
* smbclient: Handle ENUM_DIR in "notify" commandVolker Lendecke2018-04-201-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)
* libsmb: Handle IO_TIMEOUT in cli_smb2_notify properlyVolker Lendecke2018-04-201-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)
* libsmb: Handle long-running smb2cli_notifyVolker Lendecke2018-04-201-9/+45
| | | | | | | | | | | | | | This likely runs into a timeout. Properly cancel the smb2 request, allowing the higher-level caller to re-issue this request on an existing handle. I did not see a proper way to achieve this with tevent_req_set_endtime or something like that. 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 91c0f497816bb88d8935a8a79c146c08379ecf53)
* libsmb: Enable "cli_notify" for SMB2+Volker Lendecke2018-04-201-1/+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> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 26 01:33:25 CEST 2017 on sn-devel-144 (cherry picked from commit 5005a3a6961d40fe349f76db67c980be7dc9f3ea)
* libsmb: Add cli_smb2_notifyVolker Lendecke2018-04-202-0/+97
| | | | | | | | | | | | | | | | | | | | We have to do the parsing manually. Looking at librpc/gen_ndr/ndr_notify.c we have the following code snippet: size_FileName1_0 = strlen_m(r->FileName1); NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->FileName1, size_FileName1_0, sizeof(uint16_t), CH_UTF16)); which means that we take strlen_m(r->FileName1) before we pull it off the wire. Not sure how to fix this, but that is clearly broken pidl output. Once that is fixed, we can convert this to ndr_pull_struct. 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 18011343d80a28fb46894d712b22c84dce067342)
* libsmb: Add smb2cli_notify()Volker Lendecke2018-04-203-0/+205
| | | | | | | 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 ad33964f8c85b67a2d2b451bece208d8bfb8cad6)
* rpc_server: Init local_server_* in make_internal_rpc_pipe_socketpairVolker Lendecke2018-04-203-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)