summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-12-13 16:02:22 +0100
committerKarolin Seeger <kseeger@samba.org>2018-01-13 12:55:08 +0100
commit05558ddd7e91643c9b8bca92271252e6f5494b69 (patch)
tree5556139394a95ebb021580b6d1ef615656f59356 /nsswitch
parentec85579d87aafba3a78ddd326cf125909007c349 (diff)
downloadsamba-05558ddd7e91643c9b8bca92271252e6f5494b69.tar.gz
wbinfo: support for local, workstation and routed trust types
Prepare wbinfo for additional trust types and trust routing. This also modifies the output line for a "None" trust type by skipping the transitivity and direction -- that just doesn't make sense without a trust. Signed-off-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 9cd299a2174..54d5758aa6c 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -536,7 +536,26 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose)
switch(domain_list[i].trust_type) {
case WBC_DOMINFO_TRUSTTYPE_NONE:
- d_printf("None ");
+ if (domain_list[i].trust_routing != NULL) {
+ d_printf("%s\n", domain_list[i].trust_routing);
+ } else {
+ d_printf("None\n");
+ }
+ continue;
+ case WBC_DOMINFO_TRUSTTYPE_LOCAL:
+ d_printf("Local\n");
+ continue;
+ case WBC_DOMINFO_TRUSTTYPE_RWDC:
+ d_printf("RWDC\n");
+ continue;
+ case WBC_DOMINFO_TRUSTTYPE_RODC:
+ d_printf("RODC\n");
+ continue;
+ case WBC_DOMINFO_TRUSTTYPE_PDC:
+ d_printf("PDC\n");
+ continue;
+ case WBC_DOMINFO_TRUSTTYPE_WKSTA:
+ d_printf("Workstation ");
break;
case WBC_DOMINFO_TRUSTTYPE_FOREST:
d_printf("Forest ");