summaryrefslogtreecommitdiffstats
path: root/source3/passdb/pdb_ldap.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: Always cache idmapping results of pdb backend.Alexander Werth2014-05-031-14/+0
| | | | | | | | | | | And don't cache in the pdb_ldap module on the id_to_sid calls. Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat May 3 04:14:05 CEST 2014 on sn-devel-104
* passdb: Patch memory leak in pdb_ldap.cJose A. Rivera2014-02-211-4/+6
| | | | | | | | | | | | | Moved the call to the talloc autofree function to as early a point as possible. init_ldap_from_sam() already calls smbldap_set_mod(), and there's a chance that the init will fail after having already allocated memory for &mods. Coverity-Id: 1167997 Change-Id: Ic26bfb3c530f90aa885e447b8409deba49708d64 Reviewed-by: Ira Cooper <ira@samba.org> Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Simo Sorce <idra@samba.org>
* param: rename lp function and variable from "renameuser_script" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "rename_user_script" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-lib: Add grpname to talloc_sub_specified().Andreas Schneider2013-11-211-3/+21
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:passdb/pdb_ldap remove an unnecessary checkChristian Ambach2013-06-211-4/+0
| | | | | | | | | | | as general passdb code already verifies for which idmap domains the module is responsible, requests for other domains should not come in here any more Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
* s3:passdb/pdb_ldap make the module handle well-knownChristian Ambach2013-06-211-0/+7
| | | | | | | overwrite the passdb defaults and let this module handle well-knowns Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* pdb_ldap: Do not skip accounts without a sambaAcctFlags valueAndrew Bartlett2013-05-161-4/+4
| | | | | | | | | | | | | We allow this to mean a sambaAcctFlags value of zero in other parts of the code and by allowing these users to show up in a search, we can read and correct them during the classicupgrade, rather than not know they exist at all. Most parts of the code do not look for ACB_NORMAL, which is why these users appear to work. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Rename pdb_ldap to pdb_ldapsamAndreas Schneider2013-02-061-3/+9
| | | | | | | This patch moves pdb_ldap to pdb_ldapsam unconditionally and makes possible to load ldapsam.so dynamically Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3:passdb:pdb_ldap: treat "Unix User" and "Unix Group" in sid_to_id()Michael Adam2012-12-031-0/+5
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:passdb:pdb_ldap: pre-validate sid with sid_check_object_is_for_passdb()Michael Adam2012-12-031-3/+3
| | | | | | | | | | | instead of sid_check_sid_is_in_our_sam). This allows for builtin sids, wellknown sids and "Unix User" and "Unix Group" domains. This broadens up the check moved here in commit 02e25b2a43ae02205a3412f862a1482d24b70aa4. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:pdb_ldap remove unused functionChristian Ambach2012-09-221-23/+0
| | | | | Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Sat Sep 22 04:28:37 CEST 2012 on sn-devel-104
* s3-smbldap: use smbldap_ prefixed functionsAlexander Bokovoy2012-09-071-39/+39
|
* s3-passdb: convert pdb_ldap to use secrets wrappersAlexander Bokovoy2012-09-071-2/+2
|
* s3-passdb: Allow pdb_sid_to_id to work on any SIDAndrew Bartlett2012-08-211-0/+5
| | | | | | | | | | This is needed so that pdb_samba4 can map any SID during a provision. At runtime, winbindd will be asked first, but this shortcut direct to the ldb file makes it possible to set the permissions on the sysvol share at provision time. Andrew Bartlett
* Correctly check for errors in strlower_m() returns.Jeremy Allison2012-08-091-2/+7
|
* s3-pdb: remove unused variables.Günther Deschner2012-07-241-2/+0
| | | | | | | Guenther Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jul 24 14:49:42 CEST 2012 on sn-devel-104
* lib/param: Move all enum declarations to lib/paramAndrew Bartlett2012-07-241-0/+1
| | | | | | | | This is in preperation for the parameter table being made common. Andrew Bartlett Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-27/+27
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3: rename sid_check_is_in_our_domain() to sid_check_is_in_our_sam()Michael Adam2012-07-121-4/+4
| | | | | | | | | This does not check whether the given sid is in our domain, but but whether it belongs to the local sam, which is a different thing on a domain member server. Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 12 18:36:02 CEST 2012 on sn-devel-104
* s3: rename sid_check_is_domain() to sid_check_is_our_sam()Michael Adam2012-07-121-2/+2
| | | | | | This does not check whether the given sid is the domain sid, but whether it is the sid of the local sam, which is different for a domain member server.
* s3-passdb: Remove obsolte ldapsam_compat support.Andreas Schneider2012-07-031-96/+3
|
* s3-idmap: convert most idmap_cache callers to unixid APIAndrew Bartlett2012-05-021-9/+26
| | | | | | | | | This will eventually allow the struct unixid to be passed all the way up and down the stack. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
* s3-passdb: Change pdb_sid_to_id() to return struct unixidAndrew Bartlett2012-05-021-8/+8
| | | | | | | | | This will make it easier to consistantly pass a struct unixid all the way up and down the idmap stack, and allow ID_TYPE_BOTH to be handled correctly. Andrew Bartlett Signed-off-by: Michael Adam <obnox@samba.org>
* s3:passdb: do not use the in-memory idmap cache (it will be removed)Michael Adam2012-04-201-9/+0
|
* s3: Remove an unused variableVolker Lendecke2012-04-201-1/+0
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Apr 20 12:44:20 CEST 2012 on sn-devel-104
* s3-passdb: Remove unused sampass->pass_must_change_timeAndrew Bartlett2012-04-191-20/+0
| | | | | | | | | | | | There is no need to call pdb_set_pass_must_change_time() because nothing ever consults that value. It is always calculated from the domain policy. Also, this means we no longer store the value in LDAP. The value would only ever be set when migrating from tdbsam or smbpasswd, not on password changes, so would become incorrect over time. Andrew Bartlett
* s3: Fix bug 8567 -- segfault in dom_sid_compareVolker Lendecke2012-02-201-0/+1
| | | | | | | | The underlying problem was that with ldapsam:trusted we require the a group mapping for the primary group of every user, including root. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Feb 20 22:36:23 CET 2012 on sn-devel-104
* Finally remove all malloc()'s from the substitute code. Now totallyJeremy Allison2012-01-271-3/+3
| | | | | | | talloc() based. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 27 03:43:21 CET 2012 on sn-devel-104
* s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.Günther Deschner2011-11-161-2/+12
| | | | Guenther
* s3-passdb: split out passdb/pdb_ldap_schema.cGünther Deschner2011-11-161-0/+1
| | | | Guenther
* s3: move smbldap_util to pdb_ldap_util.Günther Deschner2011-11-161-0/+1
| | | | Guenther
* s3-passdb Initialise the correct level of pointer dereferenceAndrew Bartlett2011-11-091-1/+1
| | | | | | | | *pp_rmap may be NULL or un-initialised data. This was introduced by 995d1567265be178b4e45f79ea4562a7041ffa52. Andrew Bartlett
* s3-passdb: use tevent_context in passdb.Günther Deschner2011-10-281-1/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Oct 28 13:09:47 CEST 2011 on sn-devel-104
* pdb-interface: Do not use unid_t hereSimo Sorce2011-10-181-7/+8
| | | | | | | | This interface needs to be publicly available, unid_t here is not really useful and makes it harder to use it as unid_t is not a public union. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
* s3-group-mapping: Remove fstrings from GROUP_MAP.Simo Sorce2011-10-121-13/+34
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Oct 12 19:28:12 CEST 2011 on sn-devel-104
* s3-passdb: split out passdb/pdb_ipa.h.Günther Deschner2011-10-111-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Oct 11 12:15:36 CEST 2011 on sn-devel-104
* s3-passdb: split out passdb/pdb_nds.h.Günther Deschner2011-10-111-0/+1
| | | | Guenther
* s3-passdb: split out passdb/pdb_ldap.h.Günther Deschner2011-10-111-0/+1
| | | | Guenther
* s3/ldap: don't continue if we couldn't get the domain info on startupBjörn Jacke2011-08-181-7/+4
| | | | | | | | | while some things work without the domain info, some important things don't, which is highly irritating. As even calls like EnumTrustDom fail and thus clients' domain logins fail we are sufficiently broken to refuse to go on. Autobuild-User: Björn Jacke <bj@sernet.de> Autobuild-Date: Thu Aug 18 12:48:37 CEST 2011 on sn-devel-104
* s3-passdb Make pdb_element_is_changed available to all passdb modulesAndrew Bartlett2011-08-131-29/+6
| | | | | | This will allow pdb_samba4 to use this Andrew Bartlett
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-5/+5
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()Andrew Bartlett2011-06-091-1/+1
| | | | | | | Using the standard macro makes it easier to move code into common, as TALLOC_REALLOC_ARRAY isn't standard talloc. Andrew Bartlett
* More const fixes. Remove CONST_DISCARD.Jeremy Allison2011-05-061-6/+6
|
* s3-passdb: add passdb.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-winbind: remove global inclusion of libwbclient.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* lib/util/util_pw: share more code between lib/util/util_pw.c and ↵Günther Deschner2011-03-301-0/+1
| | | | | | source3/lib/username.c Guenther
* s3: Fix Coverity ID 513: UNINITVolker Lendecke2011-03-271-1/+1
|
* s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.Günther Deschner2011-03-241-1/+1
| | | | | | | | | We were not taking into account the existing posix attributes and thus failed while trying to add a 2nd uid attribute. Found by Sumit. Guenther