summaryrefslogtreecommitdiff
path: root/source4/winbind
Commit message (Collapse)AuthorAgeFilesLines
* source4/smbd: refactor the process model for preforkGary Lockyer2017-10-191-2/+9
| | | | | | | | | | | | | | | | | | Refactor the process model code to allow the addition of a prefork process model. - Add a process context to contain process model specific state - Add a service details structure to allow service to indicate which process model options they can support. In the new code the services advertise the features they support to the process model. The process model context is plumbed through to allow the process model to keep track of the supported options, and any state the process model may require. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4: Add TALLOC_CTX * to register_server_service().Jeremy Allison2017-05-111-2/+2
| | | | | | | | Use the passed in context from callers. Remove one talloc_autofree_context(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* lib: modules: Change XXX_init interface from XXX_init(void) to ↵Jeremy Allison2017-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | XXX_init(TALLOC_CTX *) Not currently used - no logic changes inside. This will make it possible to pass down a long-lived talloc context from the loading function for modules to use instead of having them internally all use talloc_autofree_context() which is a hidden global. Updated all known module interface numbers, and added a WHATSNEW. Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144
* winbind4: Remove unused codeVolker Lendecke2017-01-024-533/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* idmap4: Use sid_check_is_in_unix_groups()Volker Lendecke2016-12-292-8/+1
| | | | | | | | | | This avoids the need for the special unix groups sid Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Thu Dec 29 00:05:25 CET 2016 on sn-devel-144
* idmap4: Use sid_check_is_in_unix_users()Volker Lendecke2016-12-282-8/+2
| | | | | | | This avoids the need for the special unix users sid Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* idmap4: Slightly simplify idmap_xid_to_sidVolker Lendecke2016-12-281-7/+4
| | | | | | | No need to parse "S-1-22-1", we have global_sid_Unix_Users Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* idmap4: Fix error path memleaks in idmap_initVolker Lendecke2016-12-281-4/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* idmap4: Fix idmap_ctx talloc hierarchyVolker Lendecke2016-12-281-3/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* s4-winbindd: Remove the winbind rewrite from the samba4 effortAndrew Bartlett2015-06-2440-8701/+5
| | | | | | | | | | | | | | This winbind implementation is undermaintained, out of date and not the future of even the AD DC, let alone any other purpose. Removing it will reduce our security and bug exposure on this off by default subsystem Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 24 22:34:57 CEST 2015 on sn-devel-104
* winbindd4: Force home directory in internal winbind to use a lower-case usernameAndrew Bartlett2015-05-062-4/+16
| | | | | | | | | | | | This is a BEHAVIOUR CHANGE from Samba 4.0 and 4.1, if mixed-case usernames were in use. However, it matches the behaviour in winbindd in all other use cases. Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-winbind: Correctly reject the unsupported WBFLAG_PAM_AUTH_PAC flagAndrew Bartlett2015-05-061-0/+4
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-winbind: Correct debug message for starting winbind.Andreas Schneider2015-03-201-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Fix the developer O3 buildVolker Lendecke2015-02-251-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104
* idmap: return the correct id type to *id_to_sid methodsGarming Sam2014-12-031-1/+19
| | | | | | | | | | | | | | We have a pointer to a unixid which is sent down instead of a uid or gid. We can use this as an in-out variable so that pdb_samba_dsdb can be returned ID_TYPE_BOTH to cache correctly instead of leaving it as ID_TYPE_UID or ID_TYPE_GID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10720 Change-Id: I0cef2e419cbb337531244b7b41c708cf2ab883e3 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbindd: Do not use group_list->out.resume_index after freeAndrew Bartlett2014-09-081-2/+3
| | | | | | | | Found by AddressSanitizer Change-Id: I59009144b28c390ddb80b7b3fbb4007dfd16db0e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* winbindd: Do not use user_list->out.resume_index after freeAndrew Bartlett2014-09-081-2/+5
| | | | | | | | Found by AddressSanitizer Change-Id: I9f8b95b65de788994a7404fa8889fce45ccb3a30 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* winbind: Fix template homedir to match source3Andrew Bartlett2014-06-042-4/+4
| | | | | | | | | | | | Fix provided by Andy Igoshin <ai@vsu.ru> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10324 Andrew Bartlett Change-Id: Ie94d207fed91e9dfd85ee3c3339c376b25ac5fa4 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbind: Allow winbindd to be run from inside "samba"Andrew Bartlett2014-04-292-0/+102
| | | | | | | | | Change-Id: I6b90a9b62ba5821e0feedb23cd20642078ba0ca6 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Apr 29 05:28:39 CEST 2014 on sn-devel-104
* winbind4: Remove unused winbind_get_idmap irpc operationVolker Lendecke2014-03-051-72/+0
| | | | | | | Change-Id: Ia5e62d30b277f8a7074d451cfb8675eee8e9d21f Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Revert "winbind4: Remove unused winbind_get_idmap irpc operation"Volker Lendecke2014-02-181-0/+72
| | | | | | | This reverts commit 41ff0f4454ef23d0ac3e31560d78a2b966769fea. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:winbind: make use of dcerpc_binding_[g|s]et_flags()Stefan Metzmacher2014-02-131-9/+31
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:winbind: don't access dcerpc_binding internals in init_domain_binding()Stefan Metzmacher2014-02-131-7/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* winbind4: Remove unused winbind_get_idmap irpc operationVolker Lendecke2014-02-101-72/+0
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Feb 10 13:24:09 CET 2014 on sn-devel-104
* log winbind version (when requested) in winbindd logNoel Power2014-01-221-0/+2
| | | | | | | | | | | | | winbindd currently only logs the INTERFACE version request, it would be useful to additionally have the version returned in the log also. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jim McDonough <jmcd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Jan 22 21:57:04 CET 2014 on sn-devel-104
* s4:winbind: let wb_samr_userdomgroups_send() take ↵Stefan Metzmacher2014-01-162-9/+11
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:winbind: let wb_lsa_lookupnames_send() take ↵Stefan Metzmacher2014-01-162-6/+7
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:winbind: let wb_lsa_lookupsids_send() take ↵Stefan Metzmacher2014-01-163-6/+8
| | | | | | | | | tevent_context/dcerpc_binding_handle This avoids usage/dereferencing 'struct dcerpc_pipe'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:winbind: make clear that we use the global tevent_contextStefan Metzmacher2014-01-164-2/+8
| | | | | | | | | We should avoid using the tevent_context pointer on a dcecli_connection, it's the same as the global per task one anyway. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:winbind: correctly fill the libnet_context lsa and samr binding handlesStefan Metzmacher2014-01-161-0/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.Jeremy Allison2013-12-091-1/+12
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.Jeremy Allison2013-12-091-1/+12
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* s4-winbindd: Do not terminate a connection that is still pending (bug #9820)Andrew Bartlett2013-07-103-2/+64
| | | | | | | | | | | | | | | Instead, wait until the call attempts to reply, and let it terminate then (often this happens in the attempt to then write to the broken pipe). Andrew Bartlett Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-winbind: Add special case for BUILTIN domainAndrew Bartlett2013-06-203-20/+37
| | | | | | | | | | | | | | This should mean that lookups for the BUILTIN domain cause less trouble then they have in the past, because they will no longer go via the trusted domain handler. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Jun 20 15:30:00 CEST 2013 on sn-devel-104
* s4:winbind: don't leak libnet_context into the main event contextStefan Metzmacher2013-06-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be a talloc child of struct wbsrv_domain otherwise the cleanup of a broken connection doesn't work. The following command can trigger the leak on a domain controller. root@dc:~/samba# ls -l /var/lib/samba/sysvol/samba.private/ total 16 drwxrwx---+ 5 root 3000000 4096 May 14 14:46 Policies drwxrwx---+ 2 root 3000000 4096 May 14 11:45 scripts gid 3000000 belongs to Builtin\Administrators. The code triggers a ncacn_np: connection to the local smbd and complains that domain BUILTIN is not available: [2013/05/29 17:28:03, 2] ../source4/winbind/wb_init_domain.c:376(init_domain_recv_queryinfo) Expected domain name BUILTIN, DC dc.samba.private said SAMBA In that case the connection was not closed, which is fixed by this commit. Using ncalrpc: for all local SIDs and serving the BUILTIN domain is a project for another day... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jun 4 11:05:09 CEST 2013 on sn-devel-104
* s4:idmap: break account_type check lines for readability in idmap_sid_to_xid()Michael Adam2013-05-271-2/+7
| | | | | | | | | | Also makes code obey README.Coding, regarding line-length. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon May 27 00:05:19 CEST 2013 on sn-devel-104
* winbind4: Fix bug 9832 -- talloc use after freeVolker Lendecke2013-05-161-1/+1
| | | | | | | | 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 May 16 13:37:41 CEST 2013 on sn-devel-104
* source4/winbind/wb_samba3_cmd.c: Fix typo in comment.Karolin Seeger2013-05-161-1/+1
| | | | | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 16 07:49:24 CEST 2013 on sn-devel-104
* winbind4: Fix bug 9832 -- talloc use after freeVolker Lendecke2013-04-301-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:winbindd: fix spacing and line length in cmd_getpwnam_recv_domain()Michael Adam2013-02-281-1/+2
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 28 03:54:41 CET 2013 on sn-devel-104
* s4:winbindd: do not drop the workgroup name in the getgrgid callMichael Adam2013-02-271-1/+11
| | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 27 05:44:39 CET 2013 on sn-devel-104
* s4:winbindd: do not drop the workgroup name in the getgrnam and getgrent calls.Michael Adam2013-02-271-1/+11
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* wb_samba3_cmd.c: Fix typo in comment.Karolin Seeger2013-02-181-1/+1
| | | | | | redundent -> redundant Signed-off-by: Karolin Seeger <kseeger@samba.org>
* s4-idmap: Remove requirement that posixAccount or posixGroup be set for rfc2307Andrew Bartlett2013-01-101-6/+3
| | | | | | | | | | This change matches the source3/idmap/idmap_ad.c code, and allows this feature to work with only the setting of the UID/GID in Active Directory Users and Computers. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Use the new directory_create_or_exist_strict() function.Andreas Schneider2013-01-091-2/+7
| | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli/auth: rename netlogon_creds_decrypt_samlogon() to ↵Günther Deschner2012-12-151-3/+3
| | | | | | | | | netlogon_creds_decrypt_samlogon_validation(). Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Set trans to a value that is not LDB_SUCCESS (all LDB_ constants areMichele Baldessari2012-09-101-1/+1
| | | | | | | | positive) so that any "goto failed:" call does not end up calling ldb_transaction_cancel() if trans is initialized to 0 (LDB_SUCCESS) by chance. Signed-off-by: Jeremy Allison <jra@samba.org>
* s4:winbind: let wb_update_rodc_dns_send/recv use netlogon_queue (bug #9097)Stefan Metzmacher2012-08-251-3/+30
| | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Aug 25 05:06:18 CEST 2012 on sn-devel-104
* s4:winbind: let wb_sam_logon_send/recv() use the netlogon_queue (bug #9097)Stefan Metzmacher2012-08-251-3/+30
| | | | metze
* s4:winbind: add a netlogon_queue (tevent_queue)Stefan Metzmacher2012-08-252-0/+12
| | | | | | This will protect the netlogon_creds later. metze