summaryrefslogtreecommitdiff
path: root/source3/utils/net_ads_gpo.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-09-24 23:44:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:41 -0500
commit82bf0da9d33d84023338498a6fde9f9f91b173d8 (patch)
treecd96b5a5e9b2b15107a40d53220386715f7271ec /source3/utils/net_ads_gpo.c
parent611b5d29fc820e8e1361581e26b42f436c045c2b (diff)
downloadsamba-82bf0da9d33d84023338498a6fde9f9f91b173d8.tar.gz
samba-82bf0da9d33d84023338498a6fde9f9f91b173d8.tar.bz2
samba-82bf0da9d33d84023338498a6fde9f9f91b173d8.zip
r18879: Fix crash for "net ads gpo list".
Guenther (This used to be commit 7df5808d8b1d9458dbd47b92750c0b128325335c)
Diffstat (limited to 'source3/utils/net_ads_gpo.c')
-rw-r--r--source3/utils/net_ads_gpo.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c
index 094ab09938..dc0bcb74d2 100644
--- a/source3/utils/net_ads_gpo.c
+++ b/source3/utils/net_ads_gpo.c
@@ -139,6 +139,16 @@ static int net_ads_gpo_list(int argc, const char **argv)
struct GROUP_POLICY_OBJECT gpo;
TALLOC_CTX *mem_ctx;
char *dn;
+ const char *attrs[] = {
+ "versionNumber",
+ "flags",
+ "gPCFileSysPath",
+ "displayName",
+ "name",
+ "gPCMachineExtensionNames",
+ "gPCUserExtensionNames",
+ NULL
+ };
mem_ctx = talloc_init("net_ads_gpo_list");
if (mem_ctx == NULL) {
@@ -152,7 +162,7 @@ static int net_ads_gpo_list(int argc, const char **argv)
status = ads_do_search_all(ads, ads->config.bind_path,
LDAP_SCOPE_SUBTREE,
- "(objectclass=groupPolicyContainer)", NULL, &res);
+ "(objectclass=groupPolicyContainer)", attrs, &res);
if (!ADS_ERR_OK(status)) {
d_printf("search failed: %s\n", ads_errstr(status));
goto out;