diff options
author | Günther Deschner <gd@samba.org> | 2006-09-14 09:44:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:51:44 -0500 |
commit | dda94fdf96e9a2ec77e98ed6304ffb94252e4c7c (patch) | |
tree | ec8aeda22c2eacc33b23451cdc3360735b585938 /source3 | |
parent | 4b57919051aefe93398acd800a98a285adeaf8bc (diff) | |
download | samba-dda94fdf96e9a2ec77e98ed6304ffb94252e4c7c.tar.gz samba-dda94fdf96e9a2ec77e98ed6304ffb94252e4c7c.tar.bz2 samba-dda94fdf96e9a2ec77e98ed6304ffb94252e4c7c.zip |
r18508: A query for the LDAP schema can never be done anonymously against AD.
Guenther
(This used to be commit 8bb6e82f02044a715dbeee020bcc4a01a83c4a64)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/ldap_schema.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/source3/libads/ldap_schema.c b/source3/libads/ldap_schema.c index 30d0cb2c0d..da8b168c21 100644 --- a/source3/libads/ldap_schema.c +++ b/source3/libads/ldap_schema.c @@ -181,7 +181,7 @@ static ADS_STATUS ads_schema_path(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **s * Check for "Services for Unix" or rfc2307 Schema and load some attributes into the ADS_STRUCT * @param ads connection to ads server * @param enum mapping type - * @return BOOL status of search (False if one or more attributes couldn't be + * @return ADS_STATUS status of search (False if one or more attributes couldn't be * found in Active Directory) **/ ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum wb_posix_mapping map_type) @@ -191,7 +191,6 @@ ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum wb_posix_mapping char **oids_out, **names_out; size_t num_names; char *schema_path = NULL; - ADS_STRUCT *ads_s = ads; int i; const char *oids_sfu[] = { ADS_ATTR_SFU_UIDNUMBER_OID, @@ -236,22 +235,6 @@ ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum wb_posix_mapping return ADS_ERROR(LDAP_NO_MEMORY); } - /* establish a new ldap tcp session if necessary */ - - if (!ads->ld) { - if ((ads_s = ads_init(ads->server.realm, ads->server.workgroup, - ads->server.ldap_server)) == NULL) { - status = ADS_ERROR(LDAP_SERVER_DOWN); - goto done; - } - - ads_s->auth.flags = ADS_AUTH_ANON_BIND; - status = ads_connect(ads_s); - if (!ADS_ERR_OK(status)) { - goto done; - } - } - status = ads_schema_path(ads, ctx, &schema_path); if (!ADS_ERR_OK(status)) { DEBUG(3,("ads_check_posix_mapping: Unable to retrieve schema DN!\n")); @@ -321,10 +304,6 @@ ADS_STATUS ads_check_posix_schema_mapping(ADS_STRUCT *ads, enum wb_posix_mapping ads->schema.map_type = map_type; done: - /* free any temporary ads connections */ - if (ads_s != ads) { - ads_destroy(&ads_s); - } if (ctx) { talloc_destroy(ctx); } |