ctdb-scripts: Use more unique temporary file names
[obnox/samba/samba-obnox.git] / libgpo / gpo_ldap.c
index 6abaf29cf0d333d6f7e572dc5786a4e1b4a93223..9a95f8be028280d77dad31331d4ef542c82bceed 100644 (file)
 #include "includes.h"
 #include "libgpo/gpo.h"
 #include "auth.h"
-#if _SAMBA_BUILD_ == 4
-#include "libgpo/gpo_s4.h"
-#include "source4/libgpo/ads_convenience.h"
-#endif
 #include "../libcli/security/security.h"
 
 /****************************************************************
@@ -299,7 +295,7 @@ ADS_STATUS ads_add_gpo_link(ADS_STRUCT *ads,
        const char *gp_link, *gp_link_new;
        ADS_MODLIST mods;
 
-       /* although ADS allows to set anything here, we better check here if
+       /* although ADS allows one to set anything here, we better check here if
         * the gpo_dn is sane */
 
        if (!strnequal(gpo_dn, "LDAP://CN={", strlen("LDAP://CN={")) != 0) {
@@ -582,7 +578,7 @@ static ADS_STATUS add_gplink_to_gpo_list(ADS_STRUCT *ads,
                        }
                }
 
-               new_gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+               new_gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT);
                ADS_ERROR_HAVE_NO_MEMORY(new_gpo);
 
                status = ads_get_gpo(ads, mem_ctx, gp_link->link_names[i],
@@ -640,7 +636,7 @@ ADS_STATUS ads_get_sid_token(ADS_STRUCT *ads,
                return status;
        }
 
-       token_sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, 1);
+       token_sids = talloc_array(mem_ctx, struct dom_sid, 1);
        ADS_ERROR_HAVE_NO_MEMORY(token_sids);
 
        status = ADS_ERROR_NT(add_sid_to_array_unique(mem_ctx,
@@ -688,7 +684,7 @@ static ADS_STATUS add_local_policy_to_gpo_list(TALLOC_CTX *mem_ctx,
 
        ADS_ERROR_HAVE_NO_MEMORY(gpo_list);
 
-       gpo = TALLOC_ZERO_P(mem_ctx, struct GROUP_POLICY_OBJECT);
+       gpo = talloc_zero(mem_ctx, struct GROUP_POLICY_OBJECT);
        ADS_ERROR_HAVE_NO_MEMORY(gpo);
 
        gpo->name = talloc_strdup(mem_ctx, "Local Policy");
@@ -760,7 +756,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                if (ADS_ERR_OK(status)) {
 
                        if (DEBUGLEVEL >= 100) {
-                               dump_gplink(ads, mem_ctx, &gp_link);
+                               dump_gplink(&gp_link);
                        }
 
                        status = add_gplink_to_gpo_list(ads, mem_ctx, gpo_list,
@@ -798,7 +794,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                        if (ADS_ERR_OK(status)) {
 
                                if (DEBUGLEVEL >= 100) {
-                                       dump_gplink(ads, mem_ctx, &gp_link);
+                                       dump_gplink(&gp_link);
                                }
 
                                /* block inheritance from now on */
@@ -844,7 +840,7 @@ ADS_STATUS ads_get_gpo_list(ADS_STRUCT *ads,
                        if (ADS_ERR_OK(status)) {
 
                                if (DEBUGLEVEL >= 100) {
-                                       dump_gplink(ads, mem_ctx, &gp_link);
+                                       dump_gplink(&gp_link);
                                }
 
                                /* block inheritance from now on */