wbinfo: support for local, workstation and routed trust types
authorRalph Boehme <slow@samba.org>
Wed, 13 Dec 2017 15:02:22 +0000 (16:02 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sat, 13 Jan 2018 11:55:08 +0000 (12:55 +0100)
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>
nsswitch/wbinfo.c

index 9cd299a2174f9ec9c8e1a8f891dc70eb8fccc1cb..54d5758aa6c68057f609c23ac8597297f74bfb06 100644 (file)
@@ -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      ");