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-4.0.0alpha6~801^2~3133 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=0552d7df546bfc7db5c75f46b25b0f38577ade9f;hp=2b70174e1bcef3b34acb406c9f8d79b0ec0cacfa 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. (This used to be commit b68caaa81bd75bb882c9363612d11d49dd73cb6f) --- diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index 63748de016e..d62e82a659c 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/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;