From: Ralph Boehme Date: Tue, 4 Jul 2017 07:38:07 +0000 (+0200) Subject: net: fix net cache samlogon list output X-Git-Tag: samba-4.7.0rc1~12 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=ee93e652ba537bffecd7adb02fed6794f647b473 net: fix net cache samlogon list output Don't print the table header for every entry. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12875 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/utils/net_cache.c b/source3/utils/net_cache.c index d3ba2edfd89..f43eb0e88c6 100644 --- a/source3/utils/net_cache.c +++ b/source3/utils/net_cache.c @@ -360,10 +360,6 @@ static int netsamlog_cache_for_all_cb(const char *sid_str, return -1; } - d_printf("%-50s %-40s When cached\n", "SID", "Name"); - d_printf("------------------------------------------------------------" - "------------------------------------------------------------" - "----\n"); d_printf("%-50s %-40s %s\n", sid_str, name, @@ -378,6 +374,11 @@ static int net_cache_samlogon_list(struct net_context *c, { int ret; + d_printf("%-50s %-40s When cached\n", "SID", "Name"); + d_printf("------------------------------------------------------------" + "------------------------------------------------------------" + "----\n"); + ret = netsamlog_cache_for_all(netsamlog_cache_for_all_cb, c); if (ret == -1) { return -1;