From: Amit Kumar Date: Mon, 15 Jul 2019 20:59:44 +0000 (+0530) Subject: net: 'net ads gpo getgpo' command not dumping gpo X-Git-Tag: talloc-2.3.1~265 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=799b05cf7f9e49db71a731fdf9264311703fd3cf;p=thirdparty%2Fsamba.git 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 --- 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);