From 7b1f015675b99c3ee8620bd0113b817a910a0727 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 24 Jun 2008 13:02:03 +0200 Subject: libads: add ads_connect_user_creds() that won't overwrite given user creds. Guenther (This used to be commit 026018c9f1ed0680b3ca5b26dd6b8dc466e27e0d) --- source3/libads/ldap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source3/libads') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 7b9e51068b7..7c64082ab46 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -526,6 +526,18 @@ got_connection: return status; } +/** + * Connect to the LDAP server using given credentials + * @param ads Pointer to an existing ADS_STRUCT + * @return status of connection + **/ +ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads) +{ + ads->auth.flags |= ADS_AUTH_USER_CREDS; + + return ads_connect(ads); +} + /** * Disconnect the LDAP server * @param ads Pointer to an existing ADS_STRUCT -- cgit