summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/netapi_net.h
AgeCommit message (Collapse)AuthorFilesLines
2023-09-11netapi: Pass net's cmdline credentials to libnetapi_net_init()Samuel Cabrero1-1/+2
Avoid unnecessary credentials allocation and initialization by passing the net's cmdline creds to libnetapi_net_init() directly. Fixes the problem of running cli_credentials_guess() (which runs password callbacks) twice, one for the net's cmdline creds and a second time for the creds initialized in libnetapi_net_init(), just to override them immediately after. Example: $ export PASSWD_FD=0 $ ./bin/net offlinejoin composeodj <...> foo bar Password is read from STDIN twice. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-11netapi: Pass loadparm_context to libnetapi_net_init()Samuel Cabrero1-1/+2
The net's tool cmdline lp_ctx can be reused, no need to init a new one except for external library users. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2010-11-24s3-netapi Add libnetapi_net_init(), don't double-init common Samba subsystemsAndrew Bartlett1-0/+24
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