1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
samba-mirror/source3/lib/netapi
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
..
examples s3:lib: Fix code spelling 2023-09-11 02:42:41 +00:00
tests s3:lib: Fix code spelling 2023-07-13 05:41:36 +00:00
cm.c auth:creds: Add obtained arg to cli_credentials_set_kerberos_state() 2021-04-28 03:43:34 +00:00
Doxyfile
file.c werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source3/lib/netapi/ 2016-09-28 00:04:34 +02:00
getdc.c s3/lib/netapi: clang: Fix 'Value stored during initialization is never read' 2019-09-26 18:41:27 +00:00
group.c libnetapi: Save lines with any_nt_status_not_ok() 2021-08-06 17:22:30 +00:00
joindomain.c s3:libnetapi: Implement NetComposeOfflineDomainJoin_l() 2023-09-05 21:18:32 +00:00
libnetapi.c s3:libnetapi: Add NetComposeOfflineDomainJoin() boilerplate 2023-09-05 21:18:32 +00:00
libnetapi.h s3:libnetapi: Add NetComposeOfflineDomainJoin() boilerplate 2023-09-05 21:18:32 +00:00
localgroup.c libnetapi: Save lines with any_nt_status_not_ok() 2021-08-06 17:22:30 +00:00
netapi_net.h netapi: Pass net's cmdline credentials to libnetapi_net_init() 2023-09-11 02:42:41 +00:00
netapi_private.h s3-libnetapi: add libnetapi_set_logfile() 2021-07-14 16:49:30 +00:00
netapi.c netapi: Pass net's cmdline credentials to libnetapi_net_init() 2023-09-11 02:42:41 +00:00
netapi.h s3:libnetapi: Add NetComposeOfflineDomainJoin() to API. 2023-09-05 21:18:32 +00:00
netlogon.c werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source3/lib/netapi/ 2016-09-28 00:04:34 +02:00
samr.c libnetapi: Save lines with any_nt_status_not_ok() 2021-08-06 17:22:30 +00:00
serverinfo.c smbdotconf: mark "server string" with substitution="1" 2019-11-27 10:25:36 +00:00
share.c werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source3/lib/netapi/ 2016-09-28 00:04:34 +02:00
shutdown.c
sid.c netapi: Use dom_sid_str_buf 2018-12-11 00:40:31 +01:00
user.c libnetapi: Save lines with any_nt_status_not_ok() 2021-08-06 17:22:30 +00:00
wkstainfo.c werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in source3/lib/netapi/ 2016-09-28 00:04:34 +02:00