diff options
author | Jeremy Allison <jra@samba.org> | 2010-12-15 10:57:23 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-12-15 20:45:25 +0100 |
commit | b3630b4739b8cb7cf99e46ae13bbe52819a95750 (patch) | |
tree | f240e128ef8e763f611164b2480d8b3844250ba5 /source3/utils/net_lookup.c | |
parent | 4a2d39697159c575721dfb3d2ff3940c6259f44b (diff) | |
download | samba-b3630b4739b8cb7cf99e46ae13bbe52819a95750.tar.gz samba-b3630b4739b8cb7cf99e46ae13bbe52819a95750.tar.bz2 samba-b3630b4739b8cb7cf99e46ae13bbe52819a95750.zip |
Fix bug 7866 - "net" in v3-6-test broken.
Someone wasn't careful about testing when not running as root :-).
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Dec 15 20:45:25 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/utils/net_lookup.c')
-rw-r--r-- | source3/utils/net_lookup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index 0a85da346f..2afa75c609 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -410,6 +410,12 @@ static int net_lookup_dsgetdcname(struct net_context *c, int argc, const char ** site_name = argv[2]; } + if (!c->msg_ctx) { + d_fprintf(stderr, _("Could not initialise message context. " + "Try running as root\n")); + return -1; + } + status = dsgetdcname(mem_ctx, c->msg_ctx, domain_name, NULL, site_name, flags, &info); if (!NT_STATUS_IS_OK(status)) { |