diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-11-01 10:52:02 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-11-08 18:10:16 +0100 |
commit | 4a5d10cd8e90f4a23963a6679d67599b06260e36 (patch) | |
tree | 14ce958574390a399c3cfe5be84b554365e83a89 | |
parent | c930fad1c05d98563572386fe350f2cec7b3557f (diff) | |
download | samba-4a5d10cd8e90f4a23963a6679d67599b06260e36.tar.gz samba-4a5d10cd8e90f4a23963a6679d67599b06260e36.tar.bz2 samba-4a5d10cd8e90f4a23963a6679d67599b06260e36.zip |
s4:cldap_server: Do not handle netlogon ourself anymore
Netlogon is now handled by the ldb rootdse module.
The netlogon files will be moved to dsdb in the next commit.
-rw-r--r-- | source4/cldap_server/cldap_server.c | 12 | ||||
-rw-r--r-- | source4/cldap_server/netlogon.c | 50 | ||||
-rw-r--r-- | source4/cldap_server/rootdse.c | 5 |
3 files changed, 5 insertions, 62 deletions
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c index a6248d4493..774142e2ea 100644 --- a/source4/cldap_server/cldap_server.c +++ b/source4/cldap_server/cldap_server.c @@ -80,18 +80,6 @@ static void cldapd_request_handler(struct cldap_socket *cldap, return; } - if (search->num_attributes == 1 && - strcasecmp(search->attributes[0], "netlogon") == 0) { - cldapd_netlogon_request(cldap, - cldapd, - in, - in->ldap_msg->messageid, - search->tree, - in->src); - talloc_free(in); - return; - } - cldapd_rootdse_request(cldap, cldapd, in, in->ldap_msg->messageid, search, in->src); diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c index 0894b2bea7..231bd169e9 100644 --- a/source4/cldap_server/netlogon.c +++ b/source4/cldap_server/netlogon.c @@ -458,53 +458,3 @@ NTSTATUS parse_netlogon_request(struct ldb_parse_tree *tree, failed: return NT_STATUS_UNSUCCESSFUL; } - -/* - handle incoming cldap requests -*/ -void cldapd_netlogon_request(struct cldap_socket *cldap, - struct cldapd_server *cldapd, - TALLOC_CTX *tmp_ctx, - uint32_t message_id, - struct ldb_parse_tree *tree, - struct tsocket_address *src) -{ - const char *domain, *host, *user, *domain_guid; - struct dom_sid *domain_sid; - int acct_control, version; - struct netlogon_samlogon_response netlogon; - NTSTATUS status = NT_STATUS_INVALID_PARAMETER; - - DEBUG(5,("cldap netlogon query domain=%s host=%s user=%s version=%d guid=%s\n", - domain, host, user, version, domain_guid)); - - status = parse_netlogon_request(tree, cldapd->task->lp_ctx, tmp_ctx, - &domain, &host, &user, &domain_guid, - &domain_sid, &acct_control, &version); - if (!NT_STATUS_IS_OK(status)) { - goto failed; - } - - status = fill_netlogon_samlogon_response(cldapd->samctx, tmp_ctx, - domain, NULL, domain_sid, - domain_guid, - user, acct_control, - tsocket_address_inet_addr_string(src, tmp_ctx), - version, cldapd->task->lp_ctx, - &netlogon, false); - if (!NT_STATUS_IS_OK(status)) { - goto failed; - } - - status = cldap_netlogon_reply(cldap, message_id, src, version, &netlogon); - if (!NT_STATUS_IS_OK(status)) { - goto failed; - } - - return; - -failed: - DEBUG(2,("cldap netlogon query failed domain=%s host=%s version=%d - %s\n", - domain, host, version, nt_errstr(status))); - cldap_empty_reply(cldap, message_id, src); -} diff --git a/source4/cldap_server/rootdse.c b/source4/cldap_server/rootdse.c index b8956169d2..3f389ce822 100644 --- a/source4/cldap_server/rootdse.c +++ b/source4/cldap_server/rootdse.c @@ -158,6 +158,11 @@ void cldapd_rootdse_request(struct cldap_socket *cldap, reply.response = NULL; reply.result = &result; + /* Note: The remoteAddress should rather be set on a ldb request. + * We can set this savely on the context here, + * since cldapd_rootdse_fill operates synchronously. */ + ldb_set_opaque(cldapd->samctx, "remoteAddress", src); + cldapd_rootdse_fill(cldapd, tmp_ctx, search, &reply.response, reply.result); |