diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-11-21 20:40:50 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-11-24 08:37:04 +0100 |
commit | 88d020ade07bfe5cd7570b8c9b80a162adb39891 (patch) | |
tree | c37d970b1061b74655d19725c754e15c71816a53 /source3/utils/net_rpc.c | |
parent | 58920aab0237aaa9f4a81577800bddba97e279a5 (diff) | |
download | samba-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_rpc.c')
-rw-r--r-- | source3/utils/net_rpc.c | 11 |
1 files changed, 6 insertions, 5 deletions
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; } |