1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/source4/torture/libnetapi
Samuel Cabrero 8cdb4f2985 netapi: Pass net's cmdline credentials to libnetapi_net_init()
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-11 02:42:41 +00:00
..
libnetapi_group.c s4:torture:libnetapi: Fix code spelling 2023-08-14 21:45:30 +00:00
libnetapi_server.c
libnetapi_user.c lib/util: remove extra safe_string.h file 2020-08-28 02:18:40 +00:00
libnetapi.c netapi: Pass net's cmdline credentials to libnetapi_net_init() 2023-09-11 02:42:41 +00:00
wscript_build torture: Fix build on freebsd, missing deps on cmdline 2021-06-22 02:05:17 +00:00