From 95e3307917b5731ab883ee5fce530c5b559b4934 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 13 Dec 2017 16:01:50 +0100 Subject: libwbclient: add more trust types Prepare libwbclient for additional trust types and trust routing. Signed-off-by: Ralph Boehme --- nsswitch/libwbclient/wbc_util.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'nsswitch') diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c index 3dab0a2de1b..ecfcaa0fb60 100644 --- a/nsswitch/libwbclient/wbc_util.c +++ b/nsswitch/libwbclient/wbc_util.c @@ -455,8 +455,22 @@ static wbcErr process_domain_info_string(struct wbcDomainInfo *info, *s = '\0'; s++; - if (strcmp(r, "None") == 0) { + if (strcmp(r, "Local") == 0) { info->trust_type = WBC_DOMINFO_TRUSTTYPE_NONE; + } else if (strncmp(r, "Routed", strlen("Routed")) == 0) { + info->trust_type = WBC_DOMINFO_TRUSTTYPE_NONE; + info->trust_routing = strdup(r); + BAIL_ON_PTR_ERROR(info->trust_routing, wbc_status); + } else if (strcmp(r, "Local") == 0) { + info->trust_type = WBC_DOMINFO_TRUSTTYPE_LOCAL; + } else if (strcmp(r, "Workstation") == 0) { + info->trust_type = WBC_DOMINFO_TRUSTTYPE_WKSTA; + } else if (strcmp(r, "RWDC") == 0) { + info->trust_type = WBC_DOMINFO_TRUSTTYPE_RWDC; + } else if (strcmp(r, "RODC") == 0) { + info->trust_type = WBC_DOMINFO_TRUSTTYPE_RODC; + } else if (strcmp(r, "PDC") == 0) { + info->trust_type = WBC_DOMINFO_TRUSTTYPE_PDC; } else if (strcmp(r, "External") == 0) { info->trust_type = WBC_DOMINFO_TRUSTTYPE_EXTERNAL; } else if (strcmp(r, "Forest") == 0) { -- cgit v1.2.1