summaryrefslogtreecommitdiffstats
path: root/source3/winbindd
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:winbindd: use struct unixid instead of uint64 in Sids2Xids parent<->childMichael Adam2012-12-032-4/+7
| | | | | | | | | | This implicitly also hands the type of the resulting unix-id that the idmap backend has created back to the caller. This is important for backends that would set a broader type than the requested one, e.g. rid backend returning BOTH instead of UID or GID. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: add an explanatory comment to _wbint_Sids2UnixIDs()Michael Adam2012-12-031-0/+3
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: add an explanatory comment to _wbint_Sids2UnixIDs()Michael Adam2012-12-031-0/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: use wb_sids2xids instead of wb_sid2gid in winbindd_sid_to_gidMichael Adam2012-12-031-2/+16
| | | | | | | | | | | | | | | | | | | | The main purpose of the change is to hand the sid into the idmap backend and handle responsiblity for handling the sid-type correctly to the idmap backend instead of failing directly when the sid is not of group type. Hence backends like rid who are sid-type agnostic, can return gids also for sids of other types. This is an important fix to make sid_to_gid behave the consistently with and without the presence of cache entries. We need to additionally filter the result for id type GID or more general (BOTH) to keep the behaviour. This is a step towards using only one codepath to id_mapping. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: use wb_sids2xids instead of wb_sid2uid in winbindd_sid_to_uidMichael Adam2012-12-031-2/+16
| | | | | | | | | | | | | | | | | | | | The main purpose of the change is to hand the sid into the idmap backend and handle responsiblity for handling the sid-type correctly to the idmap backend instead of failing directly when the sid is not of type user. Hence backends like rid who are sid-type agnostic, can return uids also for sids of other types. This is an important fix to make sid_to_uid behave the consistently with and without the presence of cache entries. We need to additionally filter the result for id type UID or more general (BOTH) to keep the behaviour. This is a step towards using only one codepath to id_mapping. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: factor winbindd_sids_to_xids into external and internal partMichael Adam2012-12-033-165/+284
| | | | | | | | | | | | | | | | - external part takes winbindd request/reponse structs (with sid strings) - internal part takes sid lists The new internal part implements functions wb_sids2xids_* that are moved into the new module wb_sids2xids.c. The purpose of this change is to use wb_sids2xids in winbindd_sid_to_uid and winbindd_sid_to_gid instead of the currently used wb_sid2uid and wb_sid2gid. We should just have one code path into id mapping and not several that behave differently. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: convert some spaces to tabs in winbindd_sids_to_xids_send()Michael Adam2012-12-031-4/+4
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: add explaining comment winbindd_sids_to_xids_send()Michael Adam2012-12-031-0/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: factor lsa_SidType_to_id_type() out of ↵Michael Adam2012-12-031-14/+25
| | | | | | | | | winbindd_sids_to_xids_lookupsids_done() for readability Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd: simplify winbindd_sids_to_xids_recv() a bit.Michael Adam2012-12-031-40/+25
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:winbindd:util: add a comment explaining the function parse_sidlist()Michael Adam2012-12-031-0/+9
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-winbind: use new reconnect logic in rpc_lookup_sids() also.Günther Deschner2012-11-301-16/+7
| | | | | | | | | Volker, please check. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: rework reconnect logic in winbindd_lookup_names().Günther Deschner2012-11-301-12/+13
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: rework reconnect logic in winbindd_lookup_sids().Günther Deschner2012-11-301-12/+14
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: remove lookup_sids_fn_t.Günther Deschner2012-11-301-21/+12
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: remove lookup_names_fn_t.Günther Deschner2012-11-301-23/+13
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-winbindd: add cm_connect_lsat().Günther Deschner2012-11-302-0/+35
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* BUG 9436: Fix leaking sockets of SMB connections to a DC.Andreas Schneider2012-11-281-0/+4
| | | | | | | | | | | | As this is a burst of 3 unbound sockets with each try to reach a DC we're running out of file descriptors pretty fast. So winbind is then mostly spinning in an accept loop failing with EMFILE. 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): Wed Nov 28 17:17:21 CET 2012 on sn-devel-104
* s3: Do not free a string where we should notVolker Lendecke2012-11-261-1/+1
| | | | | | | Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 26 22:03:05 CET 2012 on sn-devel-104
* s3: Do not free a string where we should notVolker Lendecke2012-11-261-1/+1
| | | | Reviewed by: Jeremy Allison <jra@samba.org>
* s3:winbind: BUG 9386: Failover if netlogon pipe is not available.Andreas Schneider2012-11-121-13/+39
| | | | | | | | | | | | | Samba continues to query a broken DC while the DC did not finish to rebuild Sysvol (after a Windows crash, for example). It causes end users to received strange codes while trying to authenticate, even if there is a secondary DC available. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Nov 12 18:57:18 CET 2012 on sn-devel-104
* Revert "s3-winbindd: make sure we obey the -n switch also for samlogon cache ↵David Disseldorp2012-11-094-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | access." This reverts commit ae6a779bf9f816680e724ede37324b7f5355996b. Bug 9125 analysis from Volker: The problem is that there are no network calls possible at all that would do what the samlogon cache does for us. There is just no way to retrieve the group membership in a complex trusted environment. If you have just a single domain with Samba as domain controller it might be possible, but even within a single domain it is not possible to correctly retrieve all group memberships using LDAP calls due to ACLs on directory objects. The call to get that is called NetSamLogon on the NETLOGON pipe. But this call requires user credentials and might trigger updating counts on the server. So to correctly implement wbinfo -r after a user has logged in, you have two alternatives: Save the info3 struct or the PAC in the netsamlogon cache. If you insist on doing network calls, you need to cache the user credentials somewhere to re-do the NetSamLogon call every time the wbinfo -r is requested. Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:winbindd: use PROTOCOL_LATEST instead of PROTOCOL_SMB2_02 (bug #9175)Stefan Metzmacher2012-11-011-1/+1
| | | | | | | | | | We should use the latest supported dialect. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewd-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Nov 1 18:11:27 CET 2012 on sn-devel-104
* s3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175)Stefan Metzmacher2012-11-011-0/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:winbindd:cache: fix offline logons with cached credentials (bug #9321)Michael Adam2012-11-011-0/+7
| | | | | | | | | | | | | The removal of consumption of the time field from the centry as "removal of unused variable" in 21528da9cd12a4f5c3792a482a5d18fe946a6f7a had the side effect of changing the offset for reading the following nt password hash, so the read password hash was wrong. This patch re-installs the consumption of the time, thereby fixing the bug without changing the disk format of the cache. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: Remove a call to procid_self()Volker Lendecke2012-10-191-1/+1
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Oct 19 23:15:04 CEST 2012 on sn-devel-104
* s3: Add "msg_ctx" param to winbindd_register_handlers()Volker Lendecke2012-10-191-12/+13
|
* s3: Make winbindd_register_handlers staticVolker Lendecke2012-10-192-2/+1
|
* s3-winbindd: Adjust error code loop logic in rpc_trusted_domains().Günther Deschner2012-09-291-1/+1
| | | | | | | Guenther Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Sat Sep 29 00:34:04 CEST 2012 on sn-devel-104
* s3-winbindd: Allow DNS resolution of trusted domains if DNS name is avaliableSumit Bose2012-09-283-25/+58
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3: Fix some blank line endingsVolker Lendecke2012-09-271-4/+4
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Sep 27 07:57:03 CEST 2012 on sn-devel-104
* s3:winbindd fix a compiler warningChristian Ambach2012-09-241-1/+1
| | | | | | | about type potentially being used uninitialized Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Mon Sep 24 03:49:53 CEST 2012 on sn-devel-104
* s3:winbindd fix a compiler warningChristian Ambach2012-09-221-1/+1
| | | | about result being potentially uninitialized
* build: Fix enabled handling for HAVE_LDAP, we need to use bld.CONFIG_SETAndrew Bartlett2012-09-221-6/+6
| | | | | Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Sep 22 09:09:17 CEST 2012 on sn-devel-104
* winbind: Extend wbcAuthenticateUserEx to provide PACChristof Schmitt2012-09-203-6/+153
| | | | | | | | | | | | | | With this new interface, external applications that have authenticated to an ADS can pass the PAC from the Kerberos ticket to wbcAuthenticateUserEx. winbindd decodes and extracts the info3 information for the external application. If winbindd can verify the PAC signature, the info3 from the PACis also added to the netsamlogon_cache. The info3 data can be used by the external application to get the uid and primary gid. The data in netsamlogon_cache allows to retrieve the complete group list through the NSS function getgrouplist. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"Michael Adam2012-09-201-3/+5
| | | | in idmap_tdb_common_sids_to_unixids()
* s3:winbind:idmap_tdb_common: improve readability of assignment by adding an "if"Michael Adam2012-09-201-3/+5
| | | | in idmap_tdb_common_unixids_to_sids()
* s3: Fix idmap_hashVolker Lendecke2012-09-201-1/+1
| | | | | | | | | Calling be_init with NULL safely crashes, because we dereference NULL. We don't need to call it here, this is called in all workers anyway. Thanks to Jiri Sasek <jiri.sasek@oracle.com> for finding this. Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Sep 20 05:03:54 CEST 2012 on sn-devel-104
* s3: make smbldaphelper subsystem an internal libraryAlexander Bokovoy2012-09-141-1/+1
| | | | | | | | | | | | | | | | | Break pdb_ldap -> smbldaphelper -> pdb -> pdb_ldap loop by making smbldaphelp intentionally underlinked internal library. It means that libsmbldaphelp is not usable unless its user is also linked to libpdb (that is the case for both its users, idmap_ldap and pdb_ldap, already) but gives us a break of the circular dependency in case pdb_ldap statically linked into pdb (default). This should solve case when idmap_ldap and pdb_ldap are dynamically loaded modules Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Fri Sep 14 01:02:21 CEST 2012 on sn-devel-104
* s3: make ldapsam-related functions a smbldaphelper subsystemAlexander Bokovoy2012-09-131-1/+1
| | | | | | | | | | | | | | | Since these functions are used in pdb_ldap and idmap_ldap, and pdb_ldap might be statically linked to libpdb (default), it is better to keep them as separate subsystem to avoid polluting libpdb namespace. This is first step in refactoring libpdb. Right now I cannot move these functions into proper libsmbldaphelper as it uses more of libpdb-included functions and linking pdb_ldap against libsmbldaphelper library would have created a loop if pdb_ldap is included into libpdb. Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Thu Sep 13 17:36:07 CEST 2012 on sn-devel-104
* Avoid overriding default ccache for ads operations.Simo Sorce2012-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Avoid overriding default ccache for ads operations. Nowadays various samba components may need to use GSSAPI and a default cred cache to perform their tasks. This code was completely overriding the whole process default ccache name, thus altering the current credentials and sometimes hijacking them (or getting preemptively hijaked). By using gss_krb5_import_cred we can instead use a private ccache (necessary sometimes to use a different set of credentials fromt he default cifs/fqdn@realm one, for example when contacting foreign DCs using trust credentials) that does not affect the rest of the process. For the kerberos versions which don't have gss_krb5_import_cred we fallback to temp override of KRB5CCNAME and gss_acquire_cred. Signed-off-by: Alexander Bokovoy <ab@samba.org> Signed-off-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Wed Sep 12 21:18:09 CEST 2012 on sn-devel-104
* docs: Move idmap manpage to there old location.Andreas Schneider2012-09-118-891/+0
| | | | | | | This wasn't planned and slipped trough, sorry. Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Sep 11 14:28:53 CEST 2012 on sn-devel-104
* s3-smbldap: use smbldap_ prefixed functionsAlexander Bokovoy2012-09-071-1/+1
|
* wafsamba: Add support for manpages in SAMBA_MODULE.Andreas Schneider2012-09-078-0/+891
|
* s3-winbind: DON'T PANIC if we couldn't find the domain.Andreas Schneider2012-09-041-1/+9
| | | | | | | | If we don't have a connection to a trusted domain but still try to do a lookup we shouldn't segfault. Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Sep 4 18:16:06 CEST 2012 on sn-devel-104
* param: Add startup checks for valid server role/binary combinationsAndrew Bartlett2012-08-231-0/+6
| | | | | | | This should eliminate confusion from our users about what they can expect to successfully run. Andrew Bartlett
* Fix bug #9098 - winbind does not refresh kerberos tickets.Jeremy Allison2012-08-213-0/+39
| | | | | | | Based on work from Ian Gordon <ian.gordon@strath.ac.uk>. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 21 22:01:15 CEST 2012 on sn-devel-104
* Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes ↵Herb Lewis2012-08-211-1/+2
| | | | | | | | | | | | | and NDR parsing errors. A connection is idle when both struct winbindd_cli_state->request AND struct winbindd_cli_state->response are NULL. Otherwise we can flag as idle a connection in the state of having sent the request to the winbindd child (request != NULL) but not yet received a reply (response == NULL). Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 21 01:31:46 CEST 2012 on sn-devel-104
* s3-winbind: Return the DC name from DC_PINGChristof Schmitt2012-08-152-1/+13
| | | | | | | The DC that was attempted to ping is useful for troubleshooting. Return the DC name in the response to the wbclient. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3-winbind: Pass ping-dc result to clientChristof Schmitt2012-08-151-1/+9
| | | | | | | The client checks for an error code in response.data.auth.nt_status, make sure the result is stored there. Signed-off-by: Andrew Bartlett <abartlet@samba.org>