summaryrefslogtreecommitdiff
path: root/source4/libcli
AgeCommit message (Collapse)AuthorFilesLines
2026-03-31auth: Use secure variant data_blob_talloc_s() to zero sensitive data blobsPavel Filipenský1-1/+2
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2026-01-15ldb: add "policy hints" controls to be used by password_hash moduleDouglas Bagnall1-0/+72
These won't have any effect yet, but soon they will allow a privileged account to perform a password reset that respects constraints on password history, age, and length, as if the reset was an ordinary password change (that is, where the user provides the old password). A normal user can't reset their own password using this, if the organisation is using a remote service (e.g. Entra ID or Keycloak) to manage passwords, that service can use a policy hints control to ensure it follows AD password policy. Entra ID Self Service Password Reset (SSPR) uses the deprecated OID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12020 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2026-01-07lib: Move a few smb-related constant #defines to common codeVolker Lendecke1-44/+0
No need to have two copies in source3 and source4 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Jan 7 11:00:48 UTC 2026 on atb-devel-224
2026-01-07lib: Don't call a function to initialize an empty DATA_BLOBVolker Lendecke2-4/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-01-07lib: Fix some whitespaceVolker Lendecke1-6/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Anoop C S <anoopcs@samba.org>
2025-08-26s4:smb_composite: session_setup_old() handles no passwordDouglas Bagnall1-0/+4
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2025-08-26s4:smb_composite: session_setup_nt1() handles no passwordDouglas Bagnall1-0/+3
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2025-07-22libcli/smb2: dump encryption key in format for Wireshark ↵Ralph Boehme1-4/+5
~/.wireshark/smb2_seskey_list This allows dumping the keys and quickly feeding them into Wireshark by adding them to ~/.wireshark/smb2_seskey_list. Example: debug encryption: dumping generated session keys Session Id [0000] 7D 00 00 E8 57 E0 31 01 }...W.1. Session Key [0000] 71 54 77 50 C1 DD 66 68 A8 51 D8 DE 23 F4 91 01 qTwP..fh .Q..#... Signing Key [0000] B1 29 AC EF 41 30 AE D2 43 00 1F 67 87 29 BF DB .)..A0.. C..g.).. App Key [0000] 6A 88 5C 51 51 22 FF 5C 25 95 A2 5C E2 2C FC 5D j.\QQ".\ %..\.,.] ServerIn Key [0000] 20 08 EB A2 14 99 17 03 9C A5 9A BB B8 48 88 3C ....... .....H.< ServerOut Key [0000] 15 AA C2 0D 19 AB 4C 26 64 E8 FC 94 B1 FE 27 5A ......L& d.....'Z Wireshark configuration line 7d0000e857e03101,71547750c1dd6668a851d8de23f49101,15aac20d19ab4c2664e8fc94b1fe275a,2008eba2149917039ca59abbb848883c When setting debug encryption = yes debug encryption:wireshark keyfile = /home/slow/.wireshark/smb2_seskey_list the keys are appended directly to Wireshark's keyfile. Wireshark has to be restarted to pick them up. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-07-22s4/libcli/smb2: dump encryption keys if enabledRalph Boehme1-0/+37
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-07-22s4/libcli/smb2: pass lp_ctx to smb2_session_init() and remember debug ↵Ralph Boehme3-1/+15
encryption settings Not yet used, that comes next. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-06-18s3:libsmb: let smbsock_any_connect_recv return smbXcli_transportStefan Metzmacher1-19/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-06-18s4:libcli: let struct smbcli_socket hold struct smbXcli_transport instead of ↵Stefan Metzmacher5-42/+18
sockfd Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-06-18libcli/smb: pass smbXcli_transport to smbXcli_conn_create()Stefan Metzmacher3-11/+37
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: make use of smbsock_any_connect_send/recv()Stefan Metzmacher2-321/+135
This means have only one codepath that connects based on struct smb_transports. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_sock_connect_send()Stefan Metzmacher4-2/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb_composite_connect_send()Stefan Metzmacher4-3/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb_composite_fetchfile_send()Stefan Metzmacher2-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused smb_composite_fetchfile()Stefan Metzmacher2-9/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb_composite_fsinfo_send()Stefan Metzmacher2-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused smb_composite_fsinfo()Stefan Metzmacher2-20/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb_composite_connect()Stefan Metzmacher3-1/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_tree_full_connection()Stefan Metzmacher2-1/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_full_connection()Stefan Metzmacher2-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_sock_connect()Stefan Metzmacher2-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smbcli_socket_connect()Stefan Metzmacher2-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb2_connect_send()Stefan Metzmacher1-0/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb2_connect_ext()Stefan Metzmacher1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb2_connect()Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct loadparm_context to smb_connect_nego_send()Stefan Metzmacher2-0/+2
It will be passed further down in the next commits. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: simplify struct smbcli_socketStefan Metzmacher5-23/+22
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: use the correct talloc parent for smbcli_socket->hostnameStefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from smbcli_full_connection()Stefan Metzmacher2-2/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from smbcli_socket_connect()Stefan Metzmacher2-2/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused dest_ports from smbcli_tree_full_connection()Stefan Metzmacher2-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused dest_ports struct smb_composite_fsinfoStefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from struct smb_composite_fetchfileStefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused dest_ports from struct smb_composite_connectStefan Metzmacher4-4/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports from smb2_connect()Stefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports argument from smb2_connect_ext()Stefan Metzmacher1-2/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused ports argument from smb2_connect_sendStefan Metzmacher1-9/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: remove unused dest_ports from smb_connect_nego_send()Stefan Metzmacher2-4/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: pass struct smbcli_options to smbcli_sock_connect() instead of ↵Stefan Metzmacher5-15/+36
port strings This allows us to build the ports array from options.transports. Pair-Programmed-With: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli: introduce smbcli_options.transports based on lpcfg_smb_ports()Stefan Metzmacher1-0/+1
This will allow us to avoid passing lpcfg_smb_ports() explicitly in a lot of places in the following commits. Once that's done we will change away from "smb ports" to something like "client smb transports". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-18s4:libcli/smb_composite: remove unused struct smb_composite_connectmultiStefan Metzmacher1-18/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-01-29s4:libcli/smb2: add smb2_tree_channel() helperStefan Metzmacher1-0/+25
This can be used after smb2_session_channel() in order to have a smb2_tree structure representing the same logic tree connect but uses a different channel/connection. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14430 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-11-11libnet4: Use netlogon_pings() in finddcs_cldapVolker Lendecke3-89/+67
Enable LDAPS lookups Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11cldap: Make finddcs.out.netlogon a pointerVolker Lendecke2-3/+2
struct netlogon_samlogon_response has subpointers, this patch enables a proper talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11cldap: Make cldap_netlogon.out.netlogon a pointerVolker Lendecke1-5/+7
struct netlogon_samlogon_response has subpointers, this patch enables a proper talloc hierarchy. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-11-11libcli4: Call map_netlogon_samlogon_response directlyVolker Lendecke1-1/+2
Avoid using a boolean flag passed down Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2024-08-29s4:libcli/smb2: let smb2_deltree delete directory streamsStefan Metzmacher1-1/+45
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15656 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>