summaryrefslogtreecommitdiff
path: root/source3/nsswitch/libwbclient/wbc_util.c
diff options
context:
space:
mode:
authorGerald W. Carter <jerry@samba.org>2008-04-22 15:29:53 -0500
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:47:50 -0500
commitde154dcf92ebaed23a33b6849af8aa14dc767a7d (patch)
treeb2d3ef1f425cd3b33d6d709b27989c371bdcd8d0 /source3/nsswitch/libwbclient/wbc_util.c
parent5984097e0921996aacad0d6077e7f866f74d8c23 (diff)
downloadsamba-de154dcf92ebaed23a33b6849af8aa14dc767a7d.tar.gz
samba-de154dcf92ebaed23a33b6849af8aa14dc767a7d.tar.bz2
samba-de154dcf92ebaed23a33b6849af8aa14dc767a7d.zip
Mark a domain offline in the wbcDomainInfo structure using the domain_flags.
Use the existing domain_flags fiueld in wbcDomainInfo to set a bit if the domain is marked as offline by Winbind. (This used to be commit 59cfba2c3d6d4594f08cbe3b7295ab36a7cfb044)
Diffstat (limited to 'source3/nsswitch/libwbclient/wbc_util.c')
-rw-r--r--source3/nsswitch/libwbclient/wbc_util.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source3/nsswitch/libwbclient/wbc_util.c b/source3/nsswitch/libwbclient/wbc_util.c
index c1b3affc72..3afd8a29d3 100644
--- a/source3/nsswitch/libwbclient/wbc_util.c
+++ b/source3/nsswitch/libwbclient/wbc_util.c
@@ -373,15 +373,28 @@ static wbcErr process_domain_info_string(TALLOC_CTX *ctx,
/* Outgoing */
r = s;
- if (r == NULL) {
+ if ((s = strchr(r, '\\')) == NULL) {
wbc_status = WBC_ERR_INVALID_RESPONSE;
BAIL_ON_WBC_ERROR(wbc_status);
}
+ *s = '\0';
+ s++;
if (strcmp(r, "Yes") == 0) {
info->trust_flags |= WBC_DOMINFO_TRUST_OUTGOING;
}
+ /* Online/Offline status */
+
+ r = s;
+ if (r == NULL) {
+ wbc_status = WBC_ERR_INVALID_RESPONSE;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
+ if ( strcmp(r, "Offline") == 0) {
+ info->domain_flags |= WBC_DOMINFO_DOMAIN_OFFLINE;
+ }
+
wbc_status = WBC_ERR_SUCCESS;
done: