[PATCH] samba-tool dns: Give a better error message when people get the server parameter wrong
jelmer at samba.org
Wed Nov 14 03:45:16 MST 2012
On Wed, 2012-11-14 at 11:37 +0100, Kai Blin wrote:
> If people call e.g. samba-tool dns serverinfo localhost, samba-tool
> gives a pretty confusing backtrace like
> ERROR(runtime): uncaught exception - (-1073741801, 'Memory allocation
> File "bin/python/samba/netcmd/__init__.py", line 175, in _run
> return self.run(*args, **kwargs)
> File "bin/python/samba/netcmd/dns.py", line 699, in run
> dns_conn = dns_connect(server, self.lp, self.creds)
> File "bin/python/samba/netcmd/dns.py", line 35, in dns_connect
> dns_conn = dnsserver.dnsserver(binding_str, lp, creds)
> The attached patch tries a simple heuristic to improve the error message.
> I'm aware it's not perfect, but I assume the most common way to call
> samba-tool dns is against the local host, so this easy check should
> make the error output more easy to understand for most people.
> Can someone ack and push or propose a better patch?
The change itself is a bit of a hack, though I guess not too harmful.
ACK. (I don't do reviewer-push).
It'd be nice to get to the bottom of this issue too. Something in the
DCE/RPC layer is incorrectly returning NT_STATUS_NO_MEMORY.
More information about the samba-technical