net: 'net ads gpo getgpo' command not dumping gpo
authorAmit Kumar <amitkuma@redhat.com>
Mon, 15 Jul 2019 20:59:44 +0000 (02:29 +0530)
committerRalph Boehme <slow@samba.org>
Tue, 22 Oct 2019 19:39:40 +0000 (19:39 +0000)
We have passed dump_gpo(debuglevel=1), hence gpo is not
dumped at debuglevel=0. But end user will expect gpo
to be dumped without setting debug flag.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/utils/net_ads_gpo.c

index 3be0beef3d0de8213036d04e6c461684092448c4..cd77f93ffd372d97737bbeae92ea52286aea6614 100644 (file)
@@ -585,6 +585,18 @@ out:
 
 #endif
 
+/*
+Arguments:
+- struct net_context *: Pointer to net_context*
+- argc: Number of command line arguments passed to 'net ads gpo getgpo' command
+- **argv: Command line argument string passed to 'net ads gpo getgpo' command
+
+This function performs following operations:
+1. Create  talloc context using talloc_init
+2. Preform ads_startup()
+3. Call ads_get_gpo() to retrieve gpo details inside 'struct GROUP_POLICY_OBJECT'
+4. Call dumps_gpo() to dump GPO on stdout
+*/
 static int net_ads_gpo_get_gpo(struct net_context *c, int argc, const char **argv)
 {
        ADS_STRUCT *ads;
@@ -623,7 +635,7 @@ static int net_ads_gpo_get_gpo(struct net_context *c, int argc, const char **arg
                goto out;
        }
 
-       dump_gpo(&gpo, 1);
+       dump_gpo(&gpo, 0);
 
 out:
        talloc_destroy(mem_ctx);