summaryrefslogtreecommitdiff
path: root/source4/librpc
AgeCommit message (Collapse)AuthorFilesLines
2025-12-08auth: Use new data_blob_..._s() functions and remove talloc_keep_secret()Pavel Filipenský1-2/+1
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-12-08librpc: Fix trailing white spaces in dcerpc.cPavel Filipenský1-38/+38
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-07-29librpc/idl: Add idl for tpm20_rsakey_blobGary Lockyer1-0/+8
Idl and tests for TPM20_RSAKEY_BLOB, one of the possible encoding of msDSKeyCredentialLink KeyMaterial Derived from: https://dox.ipxe.org/Tpm20_8h_source.html#l00164 https://stackoverflow.com/questions/78958315/cannot-parse-tpm2-0-public-key Note: this is a greatly simplified implementation that only handles TPM version 2, RSA public keys. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-07-29librpc/idl: Add idl for BCRYPT_RSAKEY_BLOBGary Lockyer1-0/+8
Idl and tests for BCRYPT_RSAKEY_BLOB See https://learn.microsoft.com/en-us/windows/win32/api/ bcrypt/ns-bcrypt-bcrypt_rsakey_blob This is one of the encodings of msDSKeyCredentialLink KeyMaterial when KeyUsage is KEY_USAGE_NGC. As there appears to be no official documentation on the contents of KeyMaterial have based this on. https://github.com/p0dalirius/pydsinternals/blob/271dd969e07a8939044bfc498d94443082ec6fa9/ dsinternals/common/data/hello/KeyCredential.py#L75-L92 Note: only RSA public keys are handled Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-06-19librpc/idl: Add idl for msDS-KeyCredentialLinkGary Lockyer1-0/+8
Idl and supporting helpers for msDS-KeyCredentialLinks. See [MS-ADTS] 2.2.20 Key Credential Link Structures Currently the KeyMaterial is treated as a binary blob The naming and casing of the variable names is close as is possible to those in the specification. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Thu Jun 19 00:08:31 UTC 2025 on atb-devel-224
2025-06-14libndr: Simplify indentation in ndr_printVolker Lendecke1-5/+2
printf can take care of the for-loop Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2025-04-18s4:libcli: pass struct loadparm_context to smb_composite_connect_send()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 smb2_connect_send()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 Metzmacher1-0/+3
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: remove unused dest_ports from struct smb_composite_connectStefan 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_sendStefan 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 smb_connect_nego_send()Stefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2025-04-03s4:librpc/idl: remove unused legacy copy of winbind.idlStefan Metzmacher1-35/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2025-02-17librpc:pyrpc: Allow new authenticated rpc connection on the same transport ↵Stefan Metzmacher1-8/+70
as the basis_connection BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2025-01-29s4:librpc: make use of CHECK_DEBUGLVLC(DBGC_RPC_PARSE, ...) in ↵Stefan Metzmacher1-1/+1
dcerpc_bh_do_ndr_print() This makes sure the debug class rpc_parse is used for ndr dump output. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Jan 29 02:11:51 UTC 2025 on atb-devel-224
2025-01-29s4:pyrpc: allow connections with raise_result_exceptions=FalseStefan Metzmacher3-5/+25
This is needed in order to do useful tests with specific error codes and still checking all other out parameters. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-01-13s4:librpc/rpc: implement DCERPC_SCHANNEL_KRB5Stefan Metzmacher3-7/+295
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2024-12-05pyrpc_util: fix error Exception message in py_check_dcerpc_type()Stefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-12-05s4:pyrpc: add conn.auth_info()Stefan Metzmacher1-0/+24
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-12-05s4:librpc/rpc: make use of creds_state->client_requested_flagsStefan Metzmacher1-5/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-11-12idl: Fix trailing whitespaceVolker Lendecke1-1/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-10-30s4:librpc/rpc: make use of netlogon_creds_client_verify()Stefan Metzmacher1-8/+38
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-10-30libcli/auth: also use netlogon_creds_CredentialState_extra_info for the clientStefan Metzmacher1-0/+1
In order to allow backports and cluster updates we simulate a dom_sid, so that the old code is able to parse the blob. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-10-30s4:librpc/rpc: use netr_LogonGetCapabilities query_level=2 to verify the ↵Stefan Metzmacher1-8/+137
proposed capabilities BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-10-30s4:librpc/rpc: define required schannel flags and enforce themStefan Metzmacher1-5/+56
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-10-30s4:librpc/rpc: don't allow any unexpected upgrades of negotiate_flagsStefan Metzmacher1-3/+11
Only remove the unsupported flags from local_negotiate_flags for the next try... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-10-30s4:librpc/rpc: do LogonControl after LogonGetCapabilities downgradeStefan Metzmacher1-10/+66
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-10-10s4:librpc: provide py_schannel bindingsStefan Metzmacher1-0/+7
This will be used in the dcerpc.raw_protocol test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14356 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2024-09-26s4:librpc: make all but dcerpc_pipe->binding_handle internal struct membersStefan Metzmacher12-0/+39
We could use a dcerpc_internal.h for struct dcecli_security and struct dcecli_connection, but in struct dcerpc_pipe we still expose binding_handle and changing that would require way too much work for now... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:librpc/rpc: implement dcerpc_bh_get_binding()Stefan Metzmacher1-0/+9
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:librpc/rpc: call dcerpc_binding_set_abstract_syntax after bind or alter ↵Stefan Metzmacher1-0/+14
context Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:pyrpc: make use of dcerpc_binding_handle_auth_session_key()Stefan Metzmacher1-16/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:librpc/rpc: add dcerpc_bh_auth_session_key()Stefan Metzmacher1-0/+39
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:librpc/rpc: remove unused dcerpc_fetch_session_key()Stefan Metzmacher2-21/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26xss4:pyrpc: make use of dcerpc_binding_handle_transport_session_key()Stefan Metzmacher1-4/+22
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:librpc/rpc: remove unused dcerpc_transport_encrypted()Stefan Metzmacher2-14/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:pyrpc: let py_iface_transport_encrypted() use ↵Stefan Metzmacher1-1/+1
dcerpc_binding_handle_transport_encrypted() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-09-26s4:librpc/rpc: add dcerpc_bh_transport_{encrypted,session_key}()Stefan Metzmacher1-0/+57
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2024-04-23s4:librpc/rpc: make use of tstream_tls_params_client_lpcfg()Stefan Metzmacher1-14/+6
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15621 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2024-04-16lib: Give lib/util/util_file.c its own header fileVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2024-02-27python/tests: Add test for new krb5 keytab parserAndrew Bartlett2-0/+67
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
2024-01-09smbXsrv.idl: add python bindingsStefan Metzmacher1-0/+12
This is useful for some scripting examples and debugging... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2023-12-21librpc: Change type of ‘u16string’ from ‘const uint16_t *’ to ↵Joseph Sutton2-5/+5
‘const unsigned char *’ A u16string is supposed to contain UTF‐16 code units, but ndr_pull_u16string() and ndr_push_u16string() fail to correctly ensure this on big‐endian systems. Code that relies on the u16string array containing correct values will then fail. Fix ndr_pull_u16string() and ndr_push_u16string() to work on big‐endian systems, ensuring that other code can use these strings without having to worry about first encoding them to little‐endian. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-11s4:librpc: Fix code spellingJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-08gkdi.idl: Add definitions for the Group Key Distribution ServiceJoseph Sutton1-0/+7
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20python:tests: Add ndrdump test for GMSA Managed Password blobsJoseph Sutton1-0/+28
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Nov 20 22:51:17 UTC 2023 on atb-devel-224
2023-11-20gmsa.idl: Add definition for MANAGEDPASSWORD_BLOBJoseph Sutton1-0/+7
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20s4:librpc: Produce more helpful error message when bytes length is oddJoseph Sutton1-0/+4
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20Use python.h from libreplaceAndreas Schneider7-7/+7
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-16s4:librpc: Add functions converting between bytes and UTF‐16 stringsJoseph Sutton2-0/+49
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Nov 16 06:23:35 UTC 2023 on atb-devel-224