summaryrefslogtreecommitdiff
path: root/source3/nsswitch/libwbclient
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
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')
-rw-r--r--source3/nsswitch/libwbclient/wbc_util.c15
-rw-r--r--source3/nsswitch/libwbclient/wbclient.h1
2 files changed, 15 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:
diff --git a/source3/nsswitch/libwbclient/wbclient.h b/source3/nsswitch/libwbclient/wbclient.h
index 67fa25691a..f236c43e11 100644
--- a/source3/nsswitch/libwbclient/wbclient.h
+++ b/source3/nsswitch/libwbclient/wbclient.h
@@ -139,6 +139,7 @@ struct wbcDomainInfo {
#define WBC_DOMINFO_DOMAIN_NATIVE 0x00000001
#define WBC_DOMINFO_DOMAIN_AD 0x00000002
#define WBC_DOMINFO_DOMAIN_PRIMARY 0x00000004
+#define WBC_DOMINFO_DOMAIN_OFFLINE 0x00000008
/* wbcDomainInfo->trust_flags */