r22801: Pass down the token to add_gplink_to_gpo_list().
authorGünther Deschner <gd@samba.org>
Fri, 11 May 2007 13:37:51 +0000 (13:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:21:59 +0000 (12:21 -0500)
Guenther

source/libgpo/gpo_ldap.c

index f82924e415da729b34305149284a819c0b7483d8..fbed60b11d1b5d0cdf53b3b8dd73685e9f7e1439 100644 (file)
@@ -524,7 +524,8 @@ ADS_STATUS add_gplink_to_gpo_list(ADS_STRUCT *ads,
                                  const char *link_dn,
                                  struct GP_LINK *gp_link,
                                  enum GPO_LINK_TYPE link_type,
-                                 BOOL only_add_forced_gpos)
+                                 BOOL only_add_forced_gpos,
+                                 struct GPO_SID_TOKEN *token)
 {
        ADS_STATUS status;
        int i;
@@ -646,6 +647,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
        
        ADS_STATUS status;
        struct GP_LINK gp_link;
+       struct GPO_SID_TOKEN *token = NULL;
        const char *parent_dn, *site_dn, *tmp_dn;
        BOOL add_only_forced_gpos = False;
 
@@ -653,6 +655,11 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
 
        DEBUG(10,("ads_get_gpo_list: getting GPO list for [%s]\n", dn));
 
+       status = ads_get_gpo_sid_token(ads, mem_ctx, dn, &token);
+       if (!ADS_ERR_OK(status)) {
+               return status;
+       }
+
        /* (L)ocal */
        /* not yet... */
        
@@ -677,7 +684,8 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                        
                        status = add_gplink_to_gpo_list(ads, mem_ctx, gpo_list, 
                                                        site_dn, &gp_link, GP_LINK_SITE, 
-                                                       add_only_forced_gpos);
+                                                       add_only_forced_gpos,
+                                                       token);
                        if (!ADS_ERR_OK(status)) {
                                return status;
                        }
@@ -717,7 +725,8 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                                status = add_gplink_to_gpo_list(ads, mem_ctx, 
                                                                gpo_list, parent_dn, 
                                                                &gp_link, GP_LINK_DOMAIN, 
-                                                               add_only_forced_gpos);
+                                                               add_only_forced_gpos,
+                                                               token);
                                if (!ADS_ERR_OK(status)) {
                                        return status;
                                }
@@ -756,7 +765,8 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                                status = add_gplink_to_gpo_list(ads, mem_ctx, 
                                                                gpo_list, parent_dn, 
                                                                &gp_link, GP_LINK_OU, 
-                                                               add_only_forced_gpos);
+                                                               add_only_forced_gpos,
+                                                               token);
                                if (!ADS_ERR_OK(status)) {
                                        return status;
                                }