From 88d020ade07bfe5cd7570b8c9b80a162adb39891 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Nov 2010 20:40:50 +1100 Subject: 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 --- source3/utils/net_rpc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source3/utils/net_rpc.c') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 1b0e469afc..228f7eb852 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -35,6 +35,7 @@ #include "../librpc/gen_ndr/cli_winreg.h" #include "secrets.h" #include "lib/netapi/netapi.h" +#include "lib/netapi/netapi_net.h" #include "rpc_client/init_lsa.h" #include "../libcli/security/security.h" @@ -1050,7 +1051,7 @@ int net_rpc_user(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; } @@ -2899,7 +2900,7 @@ int net_rpc_group(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; } @@ -4745,7 +4746,7 @@ int net_rpc_share(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; } @@ -5021,7 +5022,7 @@ int net_rpc_file(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; } @@ -7428,7 +7429,7 @@ int net_rpc(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; } -- cgit