summaryrefslogtreecommitdiff
path: root/source3/utils/net_util.c
AgeCommit message (Collapse)AuthorFilesLines
2025-06-16libsmb: Remove "source3/libsmb/libsmb.h"Volker Lendecke1-1/+2
libsmb.h added ads_status.h and cli_smb2_fnum.h. Only few users need either. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-04-18s3:libsmb: introduce smbsock_connect.hStefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s3:libsmb: pass struct smb_transports to cli_full_connection_creds()Stefan Metzmacher1-2/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-09-20s3:utils: use the correct secrets.tdb in net_use_krb_machine_account()Stefan Metzmacher1-1/+5
On a cluster we need to use the ctdb controlled database and not a local secrets.tdb... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15714 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Sep 20 05:54:43 UTC 2024 on atb-devel-224
2024-05-14s3:net: finally remove net_context->opt_{user_specified,user_name,password}Stefan Metzmacher1-10/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-05-14s3:net: remove useless net_prompt_pass() wrapperStefan Metzmacher1-12/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-05-14s3:net: add net_context->explicit_credentials to check if credentials were ↵Stefan Metzmacher1-0/+1
passed Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-04-29s3:libsmb: Pass memory context to cli_full_connection_creds()Andreas Schneider1-10/+20
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2022-12-13CVE-2022-38023 s3:net: add and use net_warn_member_options() helperStefan Metzmacher1-0/+14
This makes sure domain member related 'net' commands print warnings about unsecure smb.conf options. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15240 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2021-05-28s3:utils: Use connection and credentials parser in net utilAndreas Schneider1-154/+9
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28auth:creds: Add obtained arg to cli_credentials_set_gensec_features()Andreas Schneider1-1/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28auth:creds: Add obtained arg to cli_credentials_set_kerberos_state()Andreas Schneider1-3/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-03-30s3:utils: Fix net_context_creds() with machine passwordAndreas Schneider1-1/+7
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-11-03auth:creds: Rename CRED_USE_KERBEROS valuesAndreas Schneider1-3/+3
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-08-19s3:net: Use cli_credentials_set_smb_encryption()Andreas Schneider1-10/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-08-19s3:libsmb: Remove signing_state from cli_full_connection_creds()Andreas Schneider1-6/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-08-19s3:libsmb: Introduce CLI_FULL_CONNECTION_IPCAndreas Schneider1-2/+7
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-05-28s3:net: make use of net_context_creds() in connect_to_service()Stefan Metzmacher1-21/+10
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28s3:net: make use of cli_credentials_init_anon() in connect_to_ipc_anonymous()Stefan Metzmacher1-3/+9
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28s3:net: avoid prompting for a password if --use-ccache is usedStefan Metzmacher1-0/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28s3:net: add net_context_creds() helper functionStefan Metzmacher1-0/+103
Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28s3:net: always set ctx->opt_user_specified = true when we overwrite ↵Stefan Metzmacher1-0/+1
opt_user_name If we force changing the used username we should make that clear. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28s3:net: remove unused net_use_machine_account()Stefan Metzmacher1-22/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2018-04-11libsmb: Give namequery.c its own headerVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2016-12-19s3:utils: Use cli_cm_force_encryption() instead of cli_force_encryption()Stefan Metzmacher1-23/+5
This allows SMB3 encryption instead of returning NT_STATUS_NOT_SUPPORTED. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Dec 19 13:41:15 CET 2016 on sn-devel-144
2016-11-23s3-net: use SMB_SIGNING_DEFAULT in connect_to_service()Günther Deschner1-1/+6
For non IPC$ connections we get NT_STATUS_REVISION_MISMATCH otherwise when using the connection. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Nov 23 16:52:38 CET 2016 on sn-devel-144
2016-04-12CVE-2016-2115: net: use SMB_SIGNING_IPC_DEFAULTRalph Boehme1-1/+1
Use SMB_SIGNING_IPC_DEFAULT for RPC connections. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-05s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner1-4/+4
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05s3-net: pass down ndr_interface_table to connect_dst_pipe().Günther Deschner1-2/+2
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2012-12-03net: Use samba_getpass() function in net util.Andreas Schneider1-3/+7
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-02-24Remove unused function.Jeremy Allison1-21/+0
2012-02-23s3-utils: Remove unused connect_to_ipc_krb5()Andrew Bartlett1-53/+0
Found by callcatcher. Andrew Bartlett
2011-11-03s3:utils: s/Undefined/SMB_SIGNING_DEFAULT/Stefan Metzmacher1-3/+4
metze
2011-07-22s3:net_util: use server_name instead of cli->desthostStefan Metzmacher1-1/+1
They should be the same. metze
2011-07-22s3:net_util: pass const sockaddr_storage to net_make_ipc_connection_ex()Stefan Metzmacher1-1/+1
metze
2011-07-22s3:net_util: add some const to sockaddr_storageStefan Metzmacher1-8/+8
metze
2011-06-09s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett1-2/+2
There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
2011-05-18s3-lib Replace StrCaseCmp() with strcasecmp_m()Andrew Bartlett1-1/+1
strcasecmp_m() never needs to call to talloc, and via next_codepoint() still has an ASCII fast-path bypassing iconv() calls. Andrew Bartlett
2011-05-06s3-libsmb: move protos to libsmb/proto.hGünther Deschner1-0/+1
Guenther
2011-02-28s3-rpc_client: Move client pipe functions to own header.Andreas Schneider1-0/+1
2011-02-27s3: Make is_zero_addr take a sockaddr_storageVolker Lendecke1-2/+2
All callers had to cast this anyway Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Feb 27 11:02:53 CET 2011 on sn-devel-104
2011-02-02s3-net: prefer dcerpc_lsa_X functions in net_util.cGünther Deschner1-13/+16
Guenther
2011-02-01s3-net: add net_scan_dc non-ad variant.Günther Deschner1-1/+67
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Feb 1 17:48:40 CET 2011 on sn-devel-104
2011-01-11s3:net: use ndr_dssetup_c.h instead of cli_dssetup.hStefan Metzmacher1-1/+1
metze
2011-01-04s3:net_utils: use dcerpc_dssetup_DsRoleGetPrimaryDomainInformation()Stefan Metzmacher1-2/+8
metze
2010-12-20s3: Remove unused "retry" from cli_full_connectionVolker Lendecke1-3/+3
2010-10-12libcli/security Provide a common, top level libcli/security/security.hAndrew Bartlett1-0/+1
This will reduce the noise from merges of the rest of the libcli/security code, without this commit changing what code is actually used. This includes (along with other security headers) dom_sid.h and security_token.h Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-08-05s3-secrets: only include secrets.h when needed.Günther Deschner1-0/+1
Guenther
2010-05-21s3:dom_sid Global replace of DOM_SID with struct dom_sidAndrew Bartlett1-2/+2
This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-rpc_client: move protos to cli_lsarpc.hGünther Deschner1-0/+1
Guenther