From: Gerald W. Carter Date: Thu, 27 Mar 2008 20:23:36 +0000 (-0500) Subject: DIsplay the short domain name in "wbinfo -m " by default. X-Git-Tag: samba-3.3.0pre1~2996 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b68caaa81bd75bb882c9363612d11d49dd73cb6f;p=thirdparty%2Fsamba.git DIsplay the short domain name in "wbinfo -m " by default. This fixes wbinfo -m to make preexisting behavior. Also adds the dns domain to the --verbose output. --- diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c index 63748de016e..d62e82a659c 100644 --- a/source/nsswitch/wbinfo.c +++ b/source/nsswitch/wbinfo.c @@ -374,9 +374,9 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose) TALLOC_CTX *frame = talloc_stackframe(); if (print_all) { - d_printf("%-34s%-12s%-12s%-10s%-10s\n", - "Domain Name", " Trust Type", "Transitive", - "Incoming", "Outgoing"); + d_printf("%-16s%-24s%-12s%-12s%-5s%-5s\n", + "Domain Name", "DNS Domain", "Trust Type", + "Transitive", "In", "Out"); } while(next_token_talloc(frame,&extra_data,&name,"\n")) { @@ -388,16 +388,22 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose) if ((end = strchr(beg, '\\')) == NULL) goto error; *end = 0; - if(*beg == 0) - d_printf("%-34s", name); - else - d_printf("%-34s", beg); + + /* Print short name */ + + d_printf("%-16s", name); if (!print_all) { d_printf("\n"); continue; } + /* Print DNS domain */ + + if (beg) { + d_printf("%-24s", beg); + } + /* Skip SID */ beg = ++end; if ((end = strchr(beg, '\\')) == NULL) @@ -408,7 +414,7 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose) if ((end = strchr(beg, '\\')) == NULL) goto error; *end = 0; - d_printf(" %-12s", beg); + d_printf("%-12s", beg); /* Print Transitive */ beg = ++end; @@ -422,11 +428,11 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose) if ((end = strchr(beg, '\\')) == NULL) goto error; *end = 0; - d_printf("%-10s", beg); + d_printf("%-5s", beg); /* Print Outgoing */ beg = ++end; - d_printf("%-10s\n", beg); + d_printf("%-5s\n", beg); } goto out;