s3-libads: Remove unused ads_pull_sids_from_extendeddn()
[ira/wip.git] / source3 / libads / ldap.c
index 870d4bc11da8dde00d065f702a1a1ae2ff4d600d..70dad2f4968062d5aba17b498ea1fb9ad52764c8 100644 (file)
@@ -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;
-}
-
 /********************************************************************
 ********************************************************************/