summaryrefslogtreecommitdiff
path: root/source4/cldap_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-07-19 09:09:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:41 -0500
commitbfb11862698743ee36bc6050269378321e6e577c (patch)
treed8fc86c593dfd6d81eb3853646d75e30d58ba52a /source4/cldap_server
parentcb060f8bac4114766a1945c2929a75848d0d7185 (diff)
downloadsamba-bfb11862698743ee36bc6050269378321e6e577c.tar.gz
samba-bfb11862698743ee36bc6050269378321e6e577c.tar.bz2
samba-bfb11862698743ee36bc6050269378321e6e577c.zip
r8585: add to ldb and ldap comparison functionality
better pares filters Approx is currently only a stub need to dig more info to understand what it really means and how it works exactly (This used to be commit a9e8cd0bad27ed2b3c6a12302e787ba3c9a70a3c)
Diffstat (limited to 'source4/cldap_server')
-rw-r--r--source4/cldap_server/netlogon.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 8dd7d549b4..3f6c8d4972 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -200,43 +200,43 @@ void cldapd_netlogon_request(struct cldap_socket *cldap,
/* extract the query elements */
for (i=0;i<tree->u.list.num_elements;i++) {
struct ldb_parse_tree *t = tree->u.list.elements[i];
- if (t->operation != LDB_OP_SIMPLE) goto failed;
- if (strcasecmp(t->u.simple.attr, "DnsDomain") == 0) {
+ if (t->operation != LDB_OP_EQUALITY) goto failed;
+ if (strcasecmp(t->u.equality.attr, "DnsDomain") == 0) {
domain = talloc_strndup(tmp_ctx,
- t->u.simple.value.data,
- t->u.simple.value.length);
+ t->u.equality.value.data,
+ t->u.equality.value.length);
}
- if (strcasecmp(t->u.simple.attr, "Host") == 0) {
+ if (strcasecmp(t->u.equality.attr, "Host") == 0) {
host = talloc_strndup(tmp_ctx,
- t->u.simple.value.data,
- t->u.simple.value.length);
+ t->u.equality.value.data,
+ t->u.equality.value.length);
}
- if (strcasecmp(t->u.simple.attr, "DomainGuid") == 0) {
+ if (strcasecmp(t->u.equality.attr, "DomainGuid") == 0) {
NTSTATUS enc_status;
struct GUID guid;
enc_status = ldap_decode_ndr_GUID(tmp_ctx,
- t->u.simple.value, &guid);
+ t->u.equality.value, &guid);
if (NT_STATUS_IS_OK(enc_status)) {
domain_guid = GUID_string(tmp_ctx, &guid);
}
}
- if (strcasecmp(t->u.simple.attr, "DomainSid") == 0) {
+ if (strcasecmp(t->u.equality.attr, "DomainSid") == 0) {
domain_sid = talloc_strndup(tmp_ctx,
- t->u.simple.value.data,
- t->u.simple.value.length);
+ t->u.equality.value.data,
+ t->u.equality.value.length);
}
- if (strcasecmp(t->u.simple.attr, "User") == 0) {
+ if (strcasecmp(t->u.equality.attr, "User") == 0) {
user = talloc_strndup(tmp_ctx,
- t->u.simple.value.data,
- t->u.simple.value.length);
+ t->u.equality.value.data,
+ t->u.equality.value.length);
}
- if (strcasecmp(t->u.simple.attr, "NtVer") == 0 &&
- t->u.simple.value.length == 4) {
- version = IVAL(t->u.simple.value.data, 0);
+ if (strcasecmp(t->u.equality.attr, "NtVer") == 0 &&
+ t->u.equality.value.length == 4) {
+ version = IVAL(t->u.equality.value.data, 0);
}
- if (strcasecmp(t->u.simple.attr, "AAC") == 0 &&
- t->u.simple.value.length == 4) {
- acct_control = IVAL(t->u.simple.value.data, 0);
+ if (strcasecmp(t->u.equality.attr, "AAC") == 0 &&
+ t->u.equality.value.length == 4) {
+ acct_control = IVAL(t->u.equality.value.data, 0);
}
}