summaryrefslogtreecommitdiff
path: root/source3/winbindd
Commit message (Collapse)AuthorAgeFilesLines
* s3:winbind: Log client process name for PAM authAndreas Schneider2018-11-121-2/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:winbind: Log client process name in winbind_miscAndreas Schneider2018-11-121-16/+30
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:winbind: Log client process nameAndreas Schneider2018-11-1212-13/+46
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:winbindd: Also log the process name in winbinddAndreas Schneider2018-11-122-5/+15
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap: Use dom_sid_str_bufVolker Lendecke2018-11-091-1/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap: Use dom_sid_str_bufVolker Lendecke2018-11-091-2/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-091-27/+27
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-091-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Use dom_sid_str_bufVolker Lendecke2018-11-091-4/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* gencache: Remove transaction-based tdbVolker Lendecke2018-11-061-2/+0
| | | | | | | | | | | | | | | | | | | | | At more than one large site I've seen significant problems due to gencache_stabilize. gencache_stabilize was mainly introduced to survive machine crashes with the cache still being in place. Given that most installations crash rarely and this is still a cache, this safety is overkill and causes real problems. With the recent changes to tdb, we should be safe enough to run on completely corrupted databases and properly detect errors. A further commit will introduce code that wipes the gencache.tdb if such a corruption is detected. There is one kind of corruption that we don't properly handle: Orphaned space in the database. I don't have a good idea yet how to handle this in a graceful and efficient way during normal operations, but maybe this idea pops up at some point. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Use dom_sid_str_bufVolker Lendecke2018-11-021-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Use dom_sid_str_bufVolker Lendecke2018-11-021-7/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap: Use dom_sid_str_bufVolker Lendecke2018-11-021-5/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* windbindd: reword error messageGary Lockyer2018-11-011-1/+2
| | | | | | | Reword the asprintf() out of memory message to make it clear where the issue is. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
* s3: winbind: Remove fstring from wb_acct_info structSamuel Cabrero2018-11-014-14/+22
| | | | | | | | | | | | | | The group enumeration backend functions try to allocate an array of wb_acct_info structs with a number of elements equal to the number of groups. In domains with a large number of groups this allocation may fail due to the size of the chunk. Found while trying to enumerate the groups in a domain with more than 700k groups. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:winbind: Check return code of initialize_password_db()Andreas Schneider2018-10-291-1/+7
| | | | | | | | | See https://retrace.fedoraproject.org/faf/reports/1577174/ BUG: https://bugzilla.samba.org/show_bug.cgi?id=13668 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Remove gencache.h from proto.hVolker Lendecke2018-10-193-0/+3
| | | | | | | | | | It's a pain to recompile the world if gencache.h changes Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Oct 19 18:52:50 CEST 2018 on sn-devel-144
* lib: Move the "expired" for gencache_parse calculation into gencache.cVolker Lendecke2018-10-161-2/+4
| | | | | | | | | | Make it more robust 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): Tue Oct 16 21:20:19 CEST 2018 on sn-devel-144
* namemap_cache: Absorb the expired calculation into namemap_cache.cVolker Lendecke2018-10-161-5/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd_cache: Fix timeout calculation for sid<->name cacheVolker Lendecke2018-10-161-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Rename server_messaging_context() to global_messaging_context()Christof Schmitt2018-09-074-44/+44
| | | | | | | | | | | This reflects that the messaging context is also used outside of the server processes. The command used for the rename: find . -name '*.[hc]' -print0 | xargs -0 sed -i 's/server_messaging_context/global_messaging_context/' Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3: Rename server_event_context() to global_event_context()Christof Schmitt2018-09-0715-68/+68
| | | | | | | | | | | This reflects that the event context is also used outside of the server processes. The command used for the rename: find . -name '*.[hc]' -print0 | xargs -0 sed -i 's/server_event_context/global_event_context/' Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* lib: Pass mem_ctx to state_path()Volker Lendecke2018-08-174-4/+4
| | | | | | | | Fix a confusing API: Many places TALLOC_FREE the path where it's not clear you have to do it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:winbind: Fix memory leak in nss_init()Andreas Schneider2018-08-131-8/+18
| | | | | | | | | | | Found by covscan. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13567 Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap: Make pointer initialization explicitVolker Lendecke2018-07-261-3/+2
| | | | | | | Took me a few seconds to find this NULL initializer Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Move variable declarations close to their useVolker Lendecke2018-07-241-3/+3
| | | | | | | | 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): Tue Jul 24 23:31:43 CEST 2018 on sn-devel-144
* winbind: Align integer typesVolker Lendecke2018-07-241-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Do request profilingVolker Lendecke2018-07-111-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default we log a request that takes more than 60 seconds. This can be changed by setting winbind:request profile threshold = <seconds> Another parameter controls the depth of the request hierarchy printed: winbind:request profile depth = <n> The default request logged to syslog via DEBUG(0) looks like the following for a wbinfo -P: [struct process_request_state] ../source3/winbindd/winbindd.c:683 [2018/06/19 13:33:14.190365] ../source3/winbindd/winbindd.c:853 [2018/06/19 13:33:14.192737] [0.002372] -> TEVENT_REQ_DONE (2 0)) [struct winbindd_ping_dc_state] ../source3/winbindd/winbindd_ping_dc.c:41 [2018/06/19 13:33:14.190369] ../source3/winbindd/winbindd_ping_dc.c:112 [2018/06/19 13:33:14.192681] [0.002312] -> TEVENT_REQ_DONE (2 0)) [struct dcerpc_wbint_PingDc_state] default/librpc/gen_ndr/ndr_winbind_c.c:4335 [2018/06/19 13:33:14.190383] default/librpc/gen_ndr/ndr_winbind_c.c:4396 [2018/06/19 13:33:14.192680] [0.002297] -> TEVENT_REQ_DONE (2 0)) [struct dcerpc_wbint_PingDc_r_state] default/librpc/gen_ndr/ndr_winbind_c.c:4251 [2018/06/19 13:33:14.190385] default/librpc/gen_ndr/ndr_winbind_c.c:4285 [2018/06/19 13:33:14.192678] [0.002293] -> TEVENT_REQ_DONE (2 0)) [struct dcerpc_binding_handle_call_state] ../librpc/rpc/binding_handle.c:371 [2018/06/19 13:33:14.190387] ../librpc/rpc/binding_handle.c:520 [2018/06/19 13:33:14.192675] [0.002288] -> TEVENT_REQ_DONE (2 0)) [struct dcerpc_binding_handle_raw_call_state] ../librpc/rpc/binding_handle.c:149 [2018/06/19 13:33:14.190400] ../librpc/rpc/binding_handle.c:203 [2018/06/19 13:33:14.192646] [0.002246] -> TEVENT_REQ_DONE (2 0)) [struct wbint_bh_raw_call_state] ../source3/winbindd/winbindd_dual_ndr.c:89 [2018/06/19 13:33:14.190402] ../source3/winbindd/winbindd_dual_ndr.c:204 [2018/06/19 13:33:14.192644] [0.002242] -> TEVENT_REQ_DONE (2 0)) [struct wb_domain_request_state] ../source3/winbindd/winbindd_dual.c:473 [2018/06/19 13:33:14.190404] ../source3/winbindd/winbindd_dual.c:708 [2018/06/19 13:33:14.192640] [0.002236] -> TEVENT_REQ_DONE (2 0)) [struct wb_child_request_state] ../source3/winbindd/winbindd_dual.c:198 [2018/06/19 13:33:14.190411] ../source3/winbindd/winbindd_dual.c:273 [2018/06/19 13:33:14.192638] [0.002227] -> TEVENT_REQ_DONE (2 0)) [struct tevent_queue_wait_state] ../lib/tevent/tevent_queue.c:336 [2018/06/19 13:33:14.190412] ../lib/tevent/tevent_queue.c:355 [2018/06/19 13:33:14.190415] [0.000003] -> TEVENT_REQ_DONE (2 0)) [struct wb_simple_trans_state] ../nsswitch/wb_reqtrans.c:375 [2018/06/19 13:33:14.190424] ../nsswitch/wb_reqtrans.c:432 [2018/06/19 13:33:14.192630] [0.002206] -> TEVENT_REQ_DONE (2 0)) [struct req_write_state] ../nsswitch/wb_reqtrans.c:158 [2018/06/19 13:33:14.190425] ../nsswitch/wb_reqtrans.c:194 [2018/06/19 13:33:14.190472] [0.000047] -> TEVENT_REQ_DONE (2 0)) [struct writev_state] ../lib/async_req/async_sock.c:263 [2018/06/19 13:33:14.190432] ../lib/async_req/async_sock.c:412 [2018/06/19 13:33:14.190470] [0.000038] -> TEVENT_REQ_DONE (2 0)) [struct resp_read_state] ../nsswitch/wb_reqtrans.c:222 [2018/06/19 13:33:14.190475] ../nsswitch/wb_reqtrans.c:275 [2018/06/19 13:33:14.192629] [0.002154] -> TEVENT_REQ_DONE (2 0)) [struct read_packet_state] ../lib/async_req/async_sock.c:458 [2018/06/19 13:33:14.190476] ../lib/async_req/async_sock.c:546 [2018/06/19 13:33:14.192626] [0.002150] -> TEVENT_REQ_DONE (2 0)) [struct resp_write_state] ../nsswitch/wb_reqtrans.c:307 [2018/06/19 13:33:14.192693] ../nsswitch/wb_reqtrans.c:344 [2018/06/19 13:33:14.192734] [0.000041] -> TEVENT_REQ_DONE (2 0)) [struct writev_state] ../lib/async_req/async_sock.c:263 [2018/06/19 13:33:14.192694] ../lib/async_req/async_sock.c:412 [2018/06/19 13:33:14.192732] [0.000038] -> TEVENT_REQ_DONE (2 0)) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* winbindd: Convert process_request() to tevent_reqVolker Lendecke2018-07-111-147/+181
| | | | | | | | Having a central tevent_req per winbind child request is prerequisite for request profiling Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* winbindd: Remove ads.h include from nss_infoChristof Schmitt2018-07-111-1/+0
| | | | | | | | | | | | | | | | | | | | nss_info does not use libads. Removing this include fixes a compile error when trying to compile with a system provided heimdal library: [2188/3043] Compiling source3/winbindd/nss_info.c In file included from ../source3/libads/kerberos_proto.h:33:0, from ../source3/include/ads.h:154, from ../source3/winbindd/nss_info.c:24: ../lib/replace/system/kerberos.h:33:10: fatal error: krb5.h: No such file or directory #include <krb5.h> ^~~~~~~~ Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Wed Jul 11 22:39:36 CEST 2018 on sn-devel-144
* s3:winbind: Do not lookup local system accounts in ADAndreas Schneider2018-07-041-0/+2
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Jul 4 23:55:56 CEST 2018 on sn-devel-144
* samba-gpupdate: Change machine option to targetDavid Mulder2018-07-041-1/+1
| | | | | | | | | | | | | | On a Windows client, you designate machine/user apply with a 'target' parameter. This change makes gpupdate work more like that command. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jul 4 13:23:09 CEST 2018 on sn-devel-144
* s3:winbind: Fix regression introduced with bso #12851Andreas Schneider2018-06-211-18/+10
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12851 Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jun 21 01:03:52 CEST 2018 on sn-devel-144
* winbind: Fix a typoVolker Lendecke2018-06-191-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Jun 19 11:43:16 CEST 2018 on sn-devel-144
* idmap_hash: Align integer typesVolker Lendecke2018-06-191-1/+1
| | | | | | | Loop-variable and bound should be the same type Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbindd: Fix winbindd_ping_dc_recvVolker Lendecke2018-06-161-1/+2
| | | | | | | | tevent_req_simple_recv_ntstatus is only for the one-liner without any additional functionality. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Add a missing NULL checkVolker Lendecke2018-06-161-0/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Do an early TALLOC_FREEVolker Lendecke2018-06-161-0/+2
| | | | | | | Leave the if-block without leaking Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Use is_domain_offline() where appropriateVolker Lendecke2018-06-161-2/+2
| | | | | | | That if-condition is precisely covered by the helper routine Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbindd: Align integer types in for loopsVolker Lendecke2018-06-161-2/+2
| | | | | | | Iterate over the same type as the loop limit Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:winbind: Fix uninitialzed variable warningAndreas Schneider2018-05-171-1/+1
| | | | | | | | | Raised by GCC8. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-winbindd: remove unused fill_domain_username()Günther Deschner2018-05-172-21/+0
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: use fill_domain_username_talloc() in winbind.Günther Deschner2018-05-175-17/+46
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437 Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:winbind: Check if we have an open file descriptorAndreas Schneider2018-05-171-1/+4
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:winbind: Add sanity check when closing fdAndreas Schneider2018-05-171-2/+4
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* winbindd: Remove an unused function prototypeVolker Lendecke2018-05-171-1/+0
| | | | | | | | | | This has been moved to async in 2009 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): Thu May 17 11:30:18 CEST 2018 on sn-devel-144
* winbindd: Make "request_error()" static to winbindd.cVolker Lendecke2018-05-172-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbindd: Make "request_ok()" static to winbindd.cVolker Lendecke2018-05-172-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbindd: Remove the "old" non-bool dispatch tableVolker Lendecke2018-05-171-27/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbindd: Make DOMAIN_INFO a proper async requestVolker Lendecke2018-05-175-111/+139
| | | | | | | This has an async code path hidden inside. Expose that properly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>