summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-08-14 14:47:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:42 -0500
commit444fd1e8481ae4ec971c4cac5996e47a751b8a17 (patch)
tree5363603744f98dc1945c215bec5ecd99483526cf /source3/utils
parent2da44a2dee1ad425a25f9a188896ce031356630c (diff)
downloadsamba-444fd1e8481ae4ec971c4cac5996e47a751b8a17.tar.gz
samba-444fd1e8481ae4ec971c4cac5996e47a751b8a17.tar.bz2
samba-444fd1e8481ae4ec971c4cac5996e47a751b8a17.zip
r24413: Minor edits for libgpo.
Guenther (This used to be commit 5dc791f4cfdee2bc350c1e65aeed5705c1745356)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads_gpo.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c
index 180e2d509e..5f53982da9 100644
--- a/source3/utils/net_ads_gpo.c
+++ b/source3/utils/net_ads_gpo.c
@@ -52,7 +52,8 @@ static int net_ads_gpo_refresh(int argc, const char **argv)
uint32 flags = 0;
struct GROUP_POLICY_OBJECT *gpo;
NTSTATUS result;
-
+ struct nt_user_token *token = NULL;
+
if (argc < 1) {
printf("usage: net ads gpo refresh <username|machinename>\n");
return -1;
@@ -82,12 +83,17 @@ static int net_ads_gpo_refresh(int argc, const char **argv)
(uac & UF_WORKSTATION_TRUST_ACCOUNT) ? "machine" : "user",
argv[0], dn);
- status = ads_get_gpo_list(ads, mem_ctx, dn, flags, &gpo_list);
+ status = ads_get_sid_token(ads, mem_ctx, dn, &token);
+ if (!ADS_ERR_OK(status)) {
+ goto out;
+ }
+
+ status = ads_get_gpo_list(ads, mem_ctx, dn, flags, token, &gpo_list);
if (!ADS_ERR_OK(status)) {
goto out;
}
- if (!NT_STATUS_IS_OK(result = check_refresh_gpo_list(ads, mem_ctx, gpo_list))) {
+ if (!NT_STATUS_IS_OK(result = check_refresh_gpo_list(ads, mem_ctx, flags, gpo_list))) {
printf("failed to refresh GPOs: %s\n", nt_errstr(result));
goto out;
}
@@ -206,6 +212,7 @@ static int net_ads_gpo_list(int argc, const char **argv)
uint32 uac = 0;
uint32 flags = 0;
struct GROUP_POLICY_OBJECT *gpo_list;
+ struct nt_user_token *token = NULL;
if (argc < 1) {
printf("usage: net ads gpo list <username|machinename>\n");
@@ -235,7 +242,12 @@ static int net_ads_gpo_list(int argc, const char **argv)
(uac & UF_WORKSTATION_TRUST_ACCOUNT) ? "machine" : "user",
argv[0], dn);
- status = ads_get_gpo_list(ads, mem_ctx, dn, flags, &gpo_list);
+ status = ads_get_sid_token(ads, mem_ctx, dn, &token);
+ if (!ADS_ERR_OK(status)) {
+ goto out;
+ }
+
+ status = ads_get_gpo_list(ads, mem_ctx, dn, flags, token, &gpo_list);
if (!ADS_ERR_OK(status)) {
goto out;
}