summaryrefslogtreecommitdiff
path: root/source3/lib/smbldap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-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>
2012-07-03s3-passdb: Remove obsolte ldapsam_compat support.Andreas Schneider1-6/+0
2012-05-24s3-smbldap: Add API for external callback to perform LDAP bind in smbldapAlexander Bokovoy1-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.
2012-03-24lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij1-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
2011-11-16s3-smbldap: remove dependency to secrets subsystem.Günther Deschner1-17/+4
Guenther
2011-11-16s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.Günther Deschner1-0/+3
Guenther
2011-11-16s3-passdb: split out passdb/pdb_ldap_schema.cGünther Deschner1-220/+0
Guenther
2011-10-28s3-smbldap: use tevent_context in smbldap.Günther Deschner1-9/+10
Guenther
2011-08-20Ensure we never wait past absolute entime to do a get_cached_ldap_connect().Jeremy Allison1-8/+15
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Aug 20 20:09:37 CEST 2011 on sn-devel-104
2011-08-19Remove the tortured logic in another_ldap_try() and turn it intoJeremy Allison1-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).
2011-08-19Factor out the ldap_get_option calls into a function.Jeremy Allison1-20/+14
2011-08-19Simplify the logic on the another_ldap_try() loops by breakingJeremy Allison1-95/+105
early out of the loop on success.
2011-08-19Move the alarm setup/teardown out of another_ldap_try() and into separateJeremy Allison1-48/+43
functions that bracket the another_ldap_try() loop. We now never leave a dangling alarm pending on success.
2011-08-19Allow the timeout pointer to ldap_search_ext_s() to be NULL if ↵Jeremy Allison1-4/+8
lp_ldap_timeout() == 0.
2011-08-19Make it clear the time here is an absolute endtime. Don't set the alarm if ↵Jeremy Allison1-15/+35
the LDAP timeout is zero.
2011-08-19Always remove the alarm before changing the handler, not the other way around.Jeremy Allison1-1/+1
2011-08-19Remove old_handler as alarms can't be nested. Use SIG_IGN instead.Jeremy Allison1-4/+2
2011-08-19Change got_alarm from bool to the correct type of SIG_ATOMIC_T.Jeremy Allison1-3/+3
2011-08-05s3/ldap: delay the ldap search alarm termination a bitBjörn Jacke1-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.
2011-07-01s3:smbldap: make smbldap_connect_system self containedGregor Beck1-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
2011-07-01s3:smbldap: add a destructor to smbldap_state, just in caseGregor Beck1-0/+7
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-01s3:smbldap: let smbldap_free_struct do what it claims toGregor Beck1-2/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-01s3:smbldap: free the idle event scheduled in smbldap_open in smbldap_closeGregor Beck1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-01s3:smbldap: use smbldap_state as memory context for idle eventGregor Beck1-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>
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett1-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
2011-05-06More const fixes. Remove CONST_DISCARD.Jeremy Allison1-2/+2
2011-05-05More const fixes for compiler warnings from the waf build.Jeremy Allison1-1/+1
2011-04-06s3-smbldap: make octet_strings/DATA_BLOBs const.Sumit Bose1-4/+4
Signed-off-by: Günther Deschner <gd@samba.org>
2011-04-06s3-smbldap: support storing octet_strings/DATA_BLOBs.Günther Deschner1-21/+91
Guenther Signed-off-by: Günther Deschner <gd@samba.org>
2011-03-30Fix convert_string() to take a *converted_size arg. and return a bool.Jeremy Allison1-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
2011-03-24charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell1-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
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-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
2010-09-08Fix warnings caused by double ";;" at the end of the time_mono() fixes.Jeremy Allison1-3/+3
2010-09-08s3/ldap: use monotonic clock for timeouts in smbldapBjörn Jacke1-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.
2010-08-05s3-secrets: only include secrets.h when needed.Günther Deschner1-0/+1
Guenther
2010-08-05s3: avoid global include of ads.h.Günther Deschner1-4/+0
Guenther
2010-06-28s3: Make some routines static in smbldapVolker Lendecke1-2/+2
2010-02-23s3-lib: Remove obsolete signal type cast.Andreas Schneider1-2/+2
2010-01-14s3:smbldap: add smbldap_talloc_first_attribute()Stefan Metzmacher1-0/+34
metze Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit c992127f8a96c37940a6d298c7c6859c47f83d9b)
2009-12-10s3: add LDAP Alias Dereferencing supportBjörn Jacke1-0/+11
Thanks to Dan Cox for initial patch for 3.0. This closes #2350.
2009-10-26s3: Rename new parameter "ldap ref follow" to "ldap follow referral".Karolin Seeger1-2/+2
This parameter will be introduced with Samba 3.5.0. Karolin
2009-10-15Fix valgrind memory leak in bug #6814 - Fixes for problems reported by valgrindJeremy Allison1-1/+7
Jeremy.
2009-10-12s3/smbldap: add option to disable following LDAP refsJan Engelhardt1-2/+10
Fix bug #6717.
2009-08-06s3/smbldap: Fix typo in debug message.Karolin Seeger1-1/+1
Karolin
2009-05-31Fix some nonempty blank linesVolker Lendecke1-52/+50
2009-05-29Add smbldap_talloc_single_blob()Volker Lendecke1-6/+25
2009-05-28Add smbldap_pull_sidVolker Lendecke1-0/+20