From 799b05cf7f9e49db71a731fdf9264311703fd3cf Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Tue, 16 Jul 2019 02:29:44 +0530 Subject: [PATCH] net: 'net ads gpo getgpo' command not dumping gpo 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 Reviewed-by: Ralph Boehme Reviewed-by: Noel Power --- source3/utils/net_ads_gpo.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source3/utils/net_ads_gpo.c b/source3/utils/net_ads_gpo.c index 3be0beef3d0..cd77f93ffd3 100644 --- a/source3/utils/net_ads_gpo.c +++ b/source3/utils/net_ads_gpo.c @@ -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); -- 2.47.3