diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-10-27 21:53:15 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-10-27 21:53:15 +0100 |
commit | 35110a62d78836376d851242cb6b0aeba8daf735 (patch) | |
tree | 851146973dcb1286b8d6943ad9af99a48c26c134 /source4/dsdb/samdb | |
parent | fdd92e8914ac0496a034dded52c8777d69aad856 (diff) | |
download | samba-35110a62d78836376d851242cb6b0aeba8daf735.tar.gz samba-35110a62d78836376d851242cb6b0aeba8daf735.tar.bz2 samba-35110a62d78836376d851242cb6b0aeba8daf735.zip |
rootdse/netlogon: Pass client ip address
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 6683ebf26c..b7e9fecc88 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -34,6 +34,7 @@ #include "param/param.h" #include "lib/messaging/irpc.h" #include "librpc/gen_ndr/ndr_irpc_c.h" +#include "lib/tsocket/tsocket.h" #include "cldap_server/cldap_server.h" struct private_data { @@ -750,8 +751,10 @@ static int rootdse_handle_netlogon(struct rootdse_context *ac) struct ldb_context *ldb; struct ldb_parse_tree *tree; struct loadparm_context *lp_ctx; + struct tsocket_address *src_addr; TALLOC_CTX *tmp_ctx = talloc_new(ac->req); const char *domain, *host, *user, *domain_guid; + char *src_addr_s; struct dom_sid *domain_sid; int acct_control = -1; int version = -1; @@ -765,6 +768,9 @@ static int rootdse_handle_netlogon(struct rootdse_context *ac) tree = ac->req->op.search.tree; lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"), struct loadparm_context); + src_addr = talloc_get_type(ldb_get_opaque(ldb, "remoteAddress"), + struct tsocket_address); + src_addr_s = tsocket_address_inet_addr_string(src_addr, tmp_ctx); status = parse_netlogon_request(tree, lp_ctx, tmp_ctx, &domain, &host, &user, &domain_guid, @@ -777,7 +783,7 @@ static int rootdse_handle_netlogon(struct rootdse_context *ac) domain, NULL, domain_sid, domain_guid, user, acct_control, - NULL, /* FIXME: How to retrieve client ip addr here? */ + src_addr_s, version, lp_ctx, &netlogon, false); if (!NT_STATUS_IS_OK(status)) { |