summaryrefslogtreecommitdiff
path: root/source3/utils/net_dom.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-21 20:40:50 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-24 08:37:04 +0100
commit88d020ade07bfe5cd7570b8c9b80a162adb39891 (patch)
treec37d970b1061b74655d19725c754e15c71816a53 /source3/utils/net_dom.c
parent58920aab0237aaa9f4a81577800bddba97e279a5 (diff)
downloadsamba-88d020ade07bfe5cd7570b8c9b80a162adb39891.tar.gz
samba-88d020ade07bfe5cd7570b8c9b80a162adb39891.tar.bz2
samba-88d020ade07bfe5cd7570b8c9b80a162adb39891.zip
s3-netapi Add libnetapi_net_init(), don't double-init common Samba subsystems
The issue here is that libnet and net were both trying to load the smb.conf files, the case tables and set the debug levels. The set of the debug levels caused problems, because it would force the level to 0, not (say) 10 as requested on the command line. This regression was apparently introduced in cf4de8ec2c8df2ceabbe3d836d296b058e7b19fb when eliminating AllowDebugChange. Andrew Bartlett
Diffstat (limited to 'source3/utils/net_dom.c')
-rw-r--r--source3/utils/net_dom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c
index d07a1d4f04..d1eb9edba8 100644
--- a/source3/utils/net_dom.c
+++ b/source3/utils/net_dom.c
@@ -22,6 +22,7 @@
#include "../librpc/gen_ndr/cli_initshutdown.h"
#include "../librpc/gen_ndr/ndr_winreg.h"
#include "lib/netapi/netapi.h"
+#include "lib/netapi/netapi_net.h"
int net_dom_usage(struct net_context *c, int argc, const char **argv)
{
@@ -372,7 +373,7 @@ int net_dom(struct net_context *c, int argc, const char **argv)
{NULL, NULL, 0, NULL, NULL}
};
- status = libnetapi_init(&c->netapi_ctx);
+ status = libnetapi_net_init(&c->netapi_ctx);
if (status != 0) {
return -1;
}