s3-libgpo: move group policy protos to where they belong.
[sfrench/samba-autobuild/.git] / source3 / include / ads_protos.h
index a566714d629bf04594bede8579e138f318194cbe..97b5728b054bb9f10da52d3bbc5af14d555e0468 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 void ads_msgfree(ADS_STRUCT *ads, LDAPMessage *msg);
-char *ads_get_dn(ADS_STRUCT *ads, LDAPMessage *msg);
+char *ads_get_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg);
 char *ads_get_dn_canonical(ADS_STRUCT *ads, LDAPMessage *msg);
 
 char *ads_pull_string(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg,
@@ -17,15 +17,15 @@ char **ads_pull_strings_range(ADS_STRUCT *ads,
                              char **current_strings,
                              const char **next_attribute,
                              size_t *num_strings,
-                             BOOL *more_strings);
-BOOL ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+                             bool *more_strings);
+bool ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
                     uint32 *v);
-BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
-BOOL ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+bool ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
+bool ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
                  DOM_SID *sid);
 int ads_pull_sids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
                  LDAPMessage *msg, const char *field, DOM_SID **sids);
-BOOL ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
+bool ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
                 LDAPMessage *msg, const char *field, SEC_DESC **sd);
 char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
                        LDAPMessage *msg);
@@ -76,6 +76,12 @@ ADS_STATUS ads_search_retry_extended_dn(ADS_STRUCT *ads, LDAPMessage **res,
                                        const char *dn, 
                                        const char **attrs,
                                        enum ads_extended_dn_flags flags);
+ADS_STATUS ads_search_retry_extended_dn_ranged(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, 
+                                               const char *dn, 
+                                               const char **attrs,
+                                               enum ads_extended_dn_flags flags,
+                                               char ***strings,
+                                               size_t *num_strings);
 ADS_STATUS ads_search_retry_sid(ADS_STRUCT *ads, LDAPMessage **res, 
                                const DOM_SID *sid,
                                const char **attrs);
@@ -83,7 +89,35 @@ ADS_STATUS ads_search_retry_sid(ADS_STRUCT *ads, LDAPMessage **res,
 
 LDAPMessage *ads_first_entry(ADS_STRUCT *ads, LDAPMessage *res);
 LDAPMessage *ads_next_entry(ADS_STRUCT *ads, LDAPMessage *res);
+LDAPMessage *ads_first_message(ADS_STRUCT *ads, LDAPMessage *res);
+LDAPMessage *ads_next_message(ADS_STRUCT *ads, LDAPMessage *res);
 void ads_process_results(ADS_STRUCT *ads, LDAPMessage *res,
-                        BOOL(*fn)(char *, void **, void *),
+                        bool (*fn)(ADS_STRUCT *,char *, void **, void *),
                         void *data_area);
 void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);
+
+struct GROUP_POLICY_OBJECT;
+ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
+                        TALLOC_CTX *mem_ctx,
+                        LDAPMessage *res,
+                        const char *gpo_dn,
+                        struct GROUP_POLICY_OBJECT *gpo);
+ADS_STATUS ads_search_retry_dn_sd_flags(ADS_STRUCT *ads, LDAPMessage **res, 
+                                        uint32 sd_flags,
+                                        const char *dn, 
+                                        const char **attrs);
+ADS_STATUS ads_do_search_all_sd_flags(ADS_STRUCT *ads, const char *bind_path,
+                                      int scope, const char *expr,
+                                      const char **attrs, uint32 sd_flags, 
+                                      LDAPMessage **res);
+ADS_STATUS ads_get_tokensids(ADS_STRUCT *ads,
+                             TALLOC_CTX *mem_ctx,
+                             const char *dn,
+                             DOM_SID *user_sid,
+                             DOM_SID *primary_group_sid,
+                             DOM_SID **sids,
+                             size_t *num_sids);
+ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
+                               TALLOC_CTX *mem_ctx,
+                               char ***ous,
+                               size_t *num_ous);