summaryrefslogtreecommitdiff
path: root/source3/winbindd
AgeCommit message (Collapse)AuthorFilesLines
2013-03-09s3-winbindd: Add new module idmap_rfc2307Christof Schmitt2-0/+880
This module allows querying id mappings from LDAP servers as described in RFC 2307. The LDAP records can be queried from an Active Directory Server or from a stand-alone LDAP server. Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09s3-winbindd: Move connection to AD server from idmap_adChristof Schmitt3-62/+52
Having this in a common place allows reuse by other idmap modules. Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09s3-winbindd: Use common helper function for connecting to ADSChristof Schmitt3-86/+87
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09s3-winbindd: Move code for verifying ADS connection to common helper functionChristof Schmitt3-45/+41
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09s3-winbindd: Move idmap_fetch_secret to idmap_utils.c for reuseChristof Schmitt3-24/+27
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-09s3-winbindd: Move common code for LDAP id mapping to idmap_utilsChristof Schmitt4-83/+53
idmap_ad and idmap_ldap use the same helper functions and the same maximum query size. Move the code to idmap_utils so that it can be shared by every module issuing LDAP queries. Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-08s3:idmap: fix a debug message and lower its levelMichael Adam1-1/+2
It is not an error to be logged at level 1 when a domain has no explicitly configured idmap backend. 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): Fri Mar 8 03:16:54 CET 2013 on sn-devel-104
2013-03-05winbind: Fix no memory check in _wbint_PingDc().Andreas Schneider1-1/+1
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05winbind: Fix samba3.winbind.struct test.Andreas Schneider1-1/+1
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05winbind: Correctly use names in the domain struct.Andreas Schneider7-20/+52
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05winbind: Use talloc for allocating domain, dns, forest and dc name.Andreas Schneider6-61/+142
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-02-22winbind: Don't leak centry memory.Andreas Schneider1-0/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22winbind: Don't leak memory on return.Andreas Schneider1-0/+3
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22winbind: Correctly cast name to messaging_send_buf().Andreas Schneider1-3/+3
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22winbind: Use uint8_t type and use const where needed.Andreas Schneider1-7/+7
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22winbind: Make domain_name const in wcache_ndr_key().Andreas Schneider1-1/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-19s3:winbindd: s/event_add_timed/tevent_add_timerStefan Metzmacher3-13/+13
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:winbindd: s/struct timed_event/struct tevent_timerStefan Metzmacher4-11/+11
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:winbindd: s/struct event_context/struct tevent_contextStefan Metzmacher3-6/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19s3:winbindd: make use of samba_tevent_context_init()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-13s3:idmap_autorid: fix freeing of non-talloced memory (uninitialized pointer) ↵Michael Adam1-1/+1
(bug #9653) Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 13 09:51:53 CET 2013 on sn-devel-104
2013-02-08winbind: Fix an incompatible pointer type warningVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 8 15:27:51 CET 2013 on sn-devel-104
2013-01-29s3:winbindd: change getpwsid() to return a passwd struct for a group sid ↵Michael Adam1-9/+43
id-mapped with ID_TYPE_BOTH Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jan 29 23:46:19 CET 2013 on sn-devel-104
2013-01-29s3:winbindd: check the correct variable for talloc success in rpc_query_user()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-29s3:winbindd:getgrnam: also produce a group struct for a user with ID_TYPE_BOTHMichael Adam1-2/+13
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-29s3:winbindd: create group structs for gids that are coming from a user sid ↵Michael Adam1-0/+49
id-mapped with ID_TYPE_BOTH This "fake" group contains exctly one member, namely the user that the sid is actually belonging to. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-29s3:winbindd: factor add_wbint_Principal_to_dict() out of wb_group_members_done()Michael Adam2-17/+47
for later reuse Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-29s3:winbindd: fix a cut'n'paste comment typo in wb_fill_pwentMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-29s3:winbindd: rename winbindd_getgrnam_lookupsid_done to ↵Michael Adam1-3/+3
winbindd_getgrnam_lookupname_done That's what it is. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-22s3-winbind: fix the build of idmap_ldap.Günther Deschner1-1/+2
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jan 22 14:43:40 CET 2013 on sn-devel-104
2013-01-18winbind: Handle child requests in a tevent_fdVolker Lendecke1-105/+65
This enables the use of standard tevent_loop_once in the child, which now also uses epoll where available. Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18winbind: Introduce "struct child_handler_state"Volker Lendecke1-22/+30
This will make the next patch simpler. child_handler_state contains the information that the handler for the parent fde needs to pass to process_child_request Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18winbind: Use standard tevent_context_initVolker Lendecke3-7/+34
This makes winbind use epoll instead of poll Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-11winbind: Fix some missing NULL checksVolker Lendecke1-24/+29
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jan 11 18:55:41 CET 2013 on sn-devel-104
2013-01-11winbind: Fix error check in unpack_tdc_domainsVolker Lendecke1-2/+5
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-02s3-idmap: Check return value of string_to_sid().Andreas Schneider1-1/+6
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2012-12-21s3-winbind: Fix null pointer dereference in store_memory_creds().Andreas Schneider1-4/+4
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21s3-winbind: Check if we created the directories correctly.Andreas Schneider1-4/+11
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-12s3: Fix a typo in a debug messageVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Dec 12 16:40:23 CET 2012 on sn-devel-104
2012-12-12winbind: Use talloc in resolve_username_to_alias().Andreas Schneider1-3/+5
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-12winbind: Use talloc in resolve_alias_to_username().Andreas Schneider1-3/+5
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-07winbind: Make the code more readable in trustdom_list_done().Andreas Schneider1-15/+19
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): Jim McDonough <jmcd@samba.org> Autobuild-Date(master): Fri Dec 7 22:38:43 CET 2012 on sn-devel-104
2012-12-03s3:winbindd: use the new sid_check_is_for_passdb() in ↵Michael Adam1-6/+2
idmap_find_domain_with_sid() This is more correct than the original one: It also hands the wellknown and "Unix Users" and "Unix Groups" sids to passdb for id mapping. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:winbindd: remove unused function idmap_backends_sid_to_unixid()Michael Adam2-43/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:idmap_autorid: force mapping type to ID_TYPE_BOTH for sid->unixid mappingMichael Adam1-0/+3
This is to remove problems with the same unix-id being used both as a uid and a gid. The autorid backend will map a given number to the same SID, no matter whether this is a uid or a gid. This will prime the idmap cache with mappings. The sid-to-u/gid mapping, when not going through the cache, instead checks for the type of the sid and only allows unix ids of the corresponding type. Hence the rid backend will give different results, depending on whether the cache is filled or not. This patch lets the autorid backend always create sid->id mappings of type both. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:idmap_rid: force mapping type to ID_TYPE_BOTH for sid->unixid mappingMichael Adam1-0/+2
This is to remove problems with the same unix-id being used both as a uid and a gid. The rid backend will map a given number to the same SID, no matter whether this is a uid or a gid. This will prime the idmap cache with mappings. The sid-to-u/gid mapping, when not going through the cache, instead checks for the type of the sid and only allows unix ids of the corresponding type. Hence the rid backend will give different results, depending on whether the cache is filled or not. This patch lets the rid backend always create sid->id mappings of type both. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:winbindd: remove unused idmap_sid_to_gid()Michael Adam2-75/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:winbindd: remove unused idmap_sid_to_uid()Michael Adam2-75/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:winbindd: remove unused server implementation of wbint_Sid2Gid()Michael Adam1-14/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-03s3:winbindd: remove unused server implementation of wbint_Sid2Uid()Michael Adam1-14/+0
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>