diff options
author | Julien Kerihuel <j.kerihuel@openchange.org> | 2010-08-27 14:04:07 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-07 09:55:14 +1000 |
commit | e5e5a1110fb4092a1221512627b1f9d03ec8839c (patch) | |
tree | abdc1fe26c4a6199494b12dca4e80b97e3f75dd1 /source4/librpc/tests | |
parent | 35aed17b2651bc6dd9be415f8b8060357ee78ecb (diff) | |
download | samba-e5e5a1110fb4092a1221512627b1f9d03ec8839c.tar.gz samba-e5e5a1110fb4092a1221512627b1f9d03ec8839c.tar.bz2 samba-e5e5a1110fb4092a1221512627b1f9d03ec8839c.zip |
Add unique IP address binding for client connections (EPM and ncacn_ip_tcp levels)
This allows for binding strings like this:
ncacn_ip_tcp:host[localaddress=192.168.2.1,seal]
which will force the connection to be locally bound to the specified
IP address
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/librpc/tests')
-rw-r--r-- | source4/librpc/tests/binding_string.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/librpc/tests/binding_string.c b/source4/librpc/tests/binding_string.c index 6de94eb58b..dfb6d2967a 100644 --- a/source4/librpc/tests/binding_string.c +++ b/source4/librpc/tests/binding_string.c @@ -128,6 +128,12 @@ static bool test_parse_check_results(struct torture_context *tctx) torture_assert_int_equal(tctx, b->object.if_version, 0, "object version"); torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(tctx, "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:$SERVER", &b), "parse"); + torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(tctx, "ncacn_ip_tcp:$SERVER[,sign,localaddress=192.168.1.1]", &b), "parse"); + torture_assert(tctx, b->transport == NCACN_IP_TCP, "ncacn_ip_tcp expected"); + torture_assert(tctx, b->flags == (DCERPC_SIGN | DCERPC_LOCALADDRESS), "sign flag"); + torture_assert_str_equal(tctx, b->localaddress, "192.168.1.1", "localaddress"); + torture_assert_str_equal(tctx, "ncacn_ip_tcp:$SERVER[,sign,localaddress=192.168.1.1]", + dcerpc_binding_string(tctx, b), "back to string"); return true; } |