summaryrefslogtreecommitdiffstats
path: root/source3/lib/smbldap.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:lib: s/struct timed_event/struct tevent_timerStefan Metzmacher2013-02-191-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-smbldap: use smbldap_ prefix for all functionsAlexander Bokovoy2012-09-071-7/+7
|
* 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-1/+2
| | | | | | | | | | 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-passdb: Remove obsolte ldapsam_compat support.Andreas Schneider2012-07-031-6/+0
|
* s3-smbldap: Add API for external callback to perform LDAP bind in smbldapAlexander Bokovoy2012-05-241-1/+19
| | | | | | | | | | | | | | | | | | | In order to support other bind methods, introduce a generic bind callback. When smbldap_state.bind_callback is set, it means there is an alternative way to perform LDAP bind to ldap_simple_bind_s() so call it instead. The call is wrapped in become_root()/unbecome_root() to allow proper permissions in smbd to access needed resources in the callback, for example, credential caches. When run outside smbd, become_root()/unbecome_root() are no-op. The API expectation is similar to ldap_simple_bind_s(). A caller of smbldap API can pass additional information to the callback by setting smbldap_state.bind_callback_data pointer. Both callback and the data pointer elements of smbldap_state structure get cleaned up if someone sets proper credentials on smbldap_state with smbldap_set_creds() so if you are interested in using smbldap_state.bind_dn with the callback, make sure to set callback after credentials are set.
* lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij2012-03-241-2/+2
| | | | | | | | | The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
* s3-smbldap: remove dependency to secrets subsystem.Günther Deschner2011-11-161-17/+4
| | | | Guenther
* s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.Günther Deschner2011-11-161-0/+3
| | | | Guenther
* s3-passdb: split out passdb/pdb_ldap_schema.cGünther Deschner2011-11-161-220/+0
| | | | Guenther
* s3-smbldap: use tevent_context in smbldap.Günther Deschner2011-10-281-9/+10
| | | | Guenther
* Ensure we never wait past absolute entime to do a get_cached_ldap_connect().Jeremy Allison2011-08-201-8/+15
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Aug 20 20:09:37 CEST 2011 on sn-devel-104
* Remove the tortured logic in another_ldap_try() and turn it intoJeremy Allison2011-08-191-58/+70
| | | | | | | | get_cached_ldap_connect(), which much better describes it's function. Now we always break at the right places in the loop, we can replace the while (another_ldap_try(ldap_state, &rc, &attempts, abs_endtime)) construct with simply while (1).
* Factor out the ldap_get_option calls into a function.Jeremy Allison2011-08-191-20/+14
|
* Simplify the logic on the another_ldap_try() loops by breakingJeremy Allison2011-08-191-95/+105
| | | | early out of the loop on success.
* Move the alarm setup/teardown out of another_ldap_try() and into separateJeremy Allison2011-08-191-48/+43
| | | | | functions that bracket the another_ldap_try() loop. We now never leave a dangling alarm pending on success.
* Allow the timeout pointer to ldap_search_ext_s() to be NULL if ↵Jeremy Allison2011-08-191-4/+8
| | | | lp_ldap_timeout() == 0.
* Make it clear the time here is an absolute endtime. Don't set the alarm if ↵Jeremy Allison2011-08-191-15/+35
| | | | the LDAP timeout is zero.
* Always remove the alarm before changing the handler, not the other way around.Jeremy Allison2011-08-191-1/+1
|
* Remove old_handler as alarms can't be nested. Use SIG_IGN instead.Jeremy Allison2011-08-191-4/+2
|
* Change got_alarm from bool to the correct type of SIG_ATOMIC_T.Jeremy Allison2011-08-191-3/+3
|
* s3/ldap: delay the ldap search alarm termination a bitBjörn Jacke2011-08-051-2/+13
| | | | | | | | | do the alarm termination of the the ldap search a bit delayed so the LDAP server has a chance to tell us that the time limit was reached and the search was abandoned. If the search is terminated this way we also get the correct LDAP return code in the logs. If alarm() stops the search the ldap search routine will report that the LDAP server is down which would trigger us to rebind to the server needlessly which we also want to avoid.
* s3:smbldap: make smbldap_connect_system self containedGregor Beck2011-07-011-6/+11
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jul 1 12:37:50 CEST 2011 on sn-devel-104
* s3:smbldap: add a destructor to smbldap_state, just in caseGregor Beck2011-07-011-0/+7
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbldap: let smbldap_free_struct do what it claims toGregor Beck2011-07-011-2/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbldap: free the idle event scheduled in smbldap_open in smbldap_closeGregor Beck2011-07-011-1/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbldap: use smbldap_state as memory context for idle eventGregor Beck2011-07-011-2/+2
| | | | | | | ensure the event is canceled if the smbldap_state gets freed this fixes a panic of winbindd if verify_idpool fails Signed-off-by: Stefan Metzmacher <metze@samba.org>
* 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-2/+2
| | | | | 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-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett2011-05-181-2/+2
| | | | | | | strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
* More const fixes. Remove CONST_DISCARD.Jeremy Allison2011-05-061-2/+2
|
* More const fixes for compiler warnings from the waf build.Jeremy Allison2011-05-051-1/+1
|
* s3-smbldap: make octet_strings/DATA_BLOBs const.Sumit Bose2011-04-061-4/+4
| | | | Signed-off-by: Günther Deschner <gd@samba.org>
* s3-smbldap: support storing octet_strings/DATA_BLOBs.Günther Deschner2011-04-061-21/+91
| | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org>
* Fix convert_string() to take a *converted_size arg. and return a bool.Jeremy Allison2011-03-301-1/+2
| | | | | | | | Makes these interfaces much harder to misuse and easier to ensure error checking. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
* charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell2011-03-241-1/+1
| | | | | | | | | convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
* libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett2010-10-121-0/+1
| | | | | | | | | | | | | | This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
* Fix warnings caused by double ";;" at the end of the time_mono() fixes.Jeremy Allison2010-09-081-3/+3
|
* s3/ldap: use monotonic clock for timeouts in smbldapBjörn Jacke2010-09-081-17/+23
| | | | | tevent would need monotonic clock features to make also smbldap's idle handling aware of backward clock jumps. Other areas in smbldap are clock jump save now.
* s3-secrets: only include secrets.h when needed.Günther Deschner2010-08-051-0/+1
| | | | Guenther
* s3: avoid global include of ads.h.Günther Deschner2010-08-051-4/+0
| | | | Guenther
* s3: Make some routines static in smbldapVolker Lendecke2010-06-281-2/+2
|
* s3-lib: Remove obsolete signal type cast.Andreas Schneider2010-02-231-2/+2
|
* s3:smbldap: add smbldap_talloc_first_attribute()Stefan Metzmacher2010-01-141-0/+34
| | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c992127f8a96c37940a6d298c7c6859c47f83d9b)
* s3: add LDAP Alias Dereferencing supportBjörn Jacke2009-12-101-0/+11
| | | | Thanks to Dan Cox for initial patch for 3.0. This closes #2350.
* s3: Rename new parameter "ldap ref follow" to "ldap follow referral".Karolin Seeger2009-10-261-2/+2
| | | | | | This parameter will be introduced with Samba 3.5.0. Karolin
* Fix valgrind memory leak in bug #6814 - Fixes for problems reported by valgrindJeremy Allison2009-10-151-1/+7
| | | | Jeremy.
* s3/smbldap: add option to disable following LDAP refsJan Engelhardt2009-10-121-2/+10
| | | | Fix bug #6717.
* s3/smbldap: Fix typo in debug message.Karolin Seeger2009-08-061-1/+1
| | | | Karolin