summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGerald W. Carter <jerry@samba.org>2008-03-27 15:23:36 -0500
committerGerald W. Carter <jerry@samba.org>2008-03-31 13:40:58 -0500
commit0552d7df546bfc7db5c75f46b25b0f38577ade9f (patch)
treeebf830633844c18b8117826c3014daa011afcb0c /source3/nsswitch
parent2b70174e1bcef3b34acb406c9f8d79b0ec0cacfa (diff)
downloadsamba-0552d7df546bfc7db5c75f46b25b0f38577ade9f.tar.gz
samba-0552d7df546bfc7db5c75f46b25b0f38577ade9f.tar.bz2
samba-0552d7df546bfc7db5c75f46b25b0f38577ade9f.zip
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)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wbinfo.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index 63748de016..d62e82a659 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;