[PATCH v2] samba-tool dns: Give a better error message when people get the server parameter wrong
simo
idra at samba.org
Wed Nov 14 12:07:32 MST 2012
On Wed, 2012-11-14 at 12:03 +0100, Kai Blin wrote:
> >From 8dc3dfbd50d39a5c8dcd6e5673341e86085fdbb6 Mon Sep 17 00:00:00
> 2001
> From: Kai Blin <kai at samba.org>
> Date: Wed, 14 Nov 2012 11:32:06 +0100
> Subject: [PATCH] samba-tool dns: Give a better error message when
> people get the server parameter wrong
>
> Signed-off-by: Kai Blin <kai at samba.org>
> Reviewed-by: Jelmer Vernooij <jelmer at samba.org>
> ---
> source4/scripting/python/samba/netcmd/dns.py | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/source4/scripting/python/samba/netcmd/dns.py
> b/source4/scripting/python/samba/netcmd/dns.py
> index 8bd3249..0119fda 100644
> --- a/source4/scripting/python/samba/netcmd/dns.py
> +++ b/source4/scripting/python/samba/netcmd/dns.py
> @@ -31,6 +31,8 @@ from samba.dcerpc import dnsp, dnsserver
>
>
> def dns_connect(server, lp, creds):
> + if server.count('.') < 3:
> + raise CommandError("Invalid IP address %r" % server)
> binding_str = "ncacn_ip_tcp:%s[sign]" % server
> dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
> return dns_conn
Doesn't this break IPv6 ? Or are we not supporting IPv6 at all here ?
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>
More information about the samba-technical
mailing list