1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-09 17:49:29 +03:00

libads: add ads_connect_user_creds() that won't overwrite given user creds.

Guenther
(This used to be commit 026018c9f1)
This commit is contained in:
Günther Deschner
2008-06-24 13:02:03 +02:00
parent 6b4b76c40e
commit 7b1f015675
2 changed files with 13 additions and 0 deletions

View File

@ -2063,6 +2063,7 @@ bool ads_sitename_match(ADS_STRUCT *ads);
bool ads_closest_dc(ADS_STRUCT *ads);
bool ads_try_connect(ADS_STRUCT *ads, const char *server );
ADS_STATUS ads_connect(ADS_STRUCT *ads);
ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
void ads_disconnect(ADS_STRUCT *ads);
ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
int scope, const char *expr, const char **attrs,

View File

@ -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