diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-02-09 16:04:30 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-02-23 16:14:19 +1100 |
commit | a6aa24428add3faeb38461929576dc28670c25c6 (patch) | |
tree | bbe544f64ca6feada5802993a501c42528659b27 | |
parent | 1c7725ae8a4ed3270720ce71de08f4949aa83ea7 (diff) | |
download | samba-a6aa24428add3faeb38461929576dc28670c25c6.tar.gz samba-a6aa24428add3faeb38461929576dc28670c25c6.tar.bz2 samba-a6aa24428add3faeb38461929576dc28670c25c6.zip |
s3-libads: Remove unused ads_pull_sids_from_extendeddn()
Found by callcatcher.
Andrew Bartlett
-rw-r--r-- | source3/libads/ads_ldap_protos.h | 7 | ||||
-rw-r--r-- | source3/libads/ldap.c | 55 |
2 files changed, 0 insertions, 62 deletions
diff --git a/source3/libads/ads_ldap_protos.h b/source3/libads/ads_ldap_protos.h index 83b6fc13da..3024ae2ea6 100644 --- a/source3/libads/ads_ldap_protos.h +++ b/source3/libads/ads_ldap_protos.h @@ -61,13 +61,6 @@ bool ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg, const char *field, struct security_descriptor **sd); char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg); -int ads_pull_sids_from_extendeddn(ADS_STRUCT *ads, - TALLOC_CTX *mem_ctx, - LDAPMessage *msg, - const char *field, - enum ads_extended_dn_flags flags, - struct dom_sid **sids); - ADS_STATUS ads_find_machine_acct(ADS_STRUCT *ads, LDAPMessage **res, const char *machine); ADS_STATUS ads_find_printer_on_server(ADS_STRUCT *ads, LDAPMessage **res, diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 870d4bc11d..70dad2f496 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -3278,61 +3278,6 @@ ADS_STATUS ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx, return ADS_ERROR_NT(NT_STATUS_OK); } -/** - * pull an array of struct dom_sids from a ADS result - * @param ads connection to ads server - * @param mem_ctx TALLOC_CTX for allocating sid array - * @param msg Results of search - * @param field Attribute to retrieve - * @param flags string type of extended_dn - * @param sids pointer to sid array to allocate - * @return the count of SIDs pulled - **/ - int ads_pull_sids_from_extendeddn(ADS_STRUCT *ads, - TALLOC_CTX *mem_ctx, - LDAPMessage *msg, - const char *field, - enum ads_extended_dn_flags flags, - struct dom_sid **sids) -{ - int i; - ADS_STATUS rc; - size_t dn_count, ret_count = 0; - char **dn_strings; - - if ((dn_strings = ads_pull_strings(ads, mem_ctx, msg, field, - &dn_count)) == NULL) { - return 0; - } - - (*sids) = talloc_zero_array(mem_ctx, struct dom_sid, dn_count + 1); - if (!(*sids)) { - TALLOC_FREE(dn_strings); - return 0; - } - - for (i=0; i<dn_count; i++) { - rc = ads_get_sid_from_extended_dn(mem_ctx, dn_strings[i], - flags, &(*sids)[i]); - if (!ADS_ERR_OK(rc)) { - if (NT_STATUS_EQUAL(ads_ntstatus(rc), - NT_STATUS_NOT_FOUND)) { - continue; - } - else { - TALLOC_FREE(*sids); - TALLOC_FREE(dn_strings); - return 0; - } - } - ret_count++; - } - - TALLOC_FREE(dn_strings); - - return ret_count; -} - /******************************************************************** ********************************************************************/ |