From 05558ddd7e91643c9b8bca92271252e6f5494b69 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 13 Dec 2017 16:02:22 +0100 Subject: 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 --- nsswitch/wbinfo.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'nsswitch') 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 "); -- cgit v1.2.1