summaryrefslogtreecommitdiff
path: root/source3/rpc_client
Commit message (Collapse)AuthorAgeFilesLines
* mdssvc.idl: pass policy_handle as pointerRalph Boehme2019-10-091-6/+6
| | | | | | | | | | | | No change in behaviour, this just changes all functions to take the policy_handle argument as pointer instead of passing it by value. This is how all other IDLs pass it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Oct 9 15:52:55 UTC 2019 on sn-devel-184
* s3: add mdscli Python bindingsRalph Boehme2019-10-091-0/+567
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* s3:rpc_client: add a mdssvc client libraryRalph Boehme2019-10-095-0/+1778
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* rpcclient: Move rpccli_try_samr_connects() to cmd_samr.cVolker Lendecke2019-10-032-26/+0
| | | | | | | That's the only user, make it static to cmd_samr.c Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpc_client: Don't pass a NULL string to talloc_asprintfVolker Lendecke2019-10-021-7/+23
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/rpc_client: clang: Fix 'Value stored during initialization is never read'Noel Power2019-09-261-2/+2
| | | | | | | | | | | | | Fixes: source3/rpc_client/cli_winreg.c:728:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_OK; ^~~~~~ ~~~~~~~~~~~~ /source3/rpc_client/cli_winreg.c:897:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_OK; ^~~~~~ ~~~~~~~~~~~~ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/rpc_client: clang: 'Value stored during its initialization is never read'Noel Power2019-09-261-2/+2
| | | | | | | | | | | | | | | | Fixes: source3/rpc_client/util_netlogon.c:71:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_UNSUCCESSFUL; ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ source3/rpc_client/util_netlogon.c:199:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_UNSUCCESSFUL; ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/rpc_client: clang: Fix 'Value stored during initialization is never read'Noel Power2019-09-261-1/+1
| | | | | | | | | | | | Fixes: source3/rpc_client/cli_lsarpc.c:182:11: warning: Value stored to 'status' during its initialization is never read <--[clang] NTSTATUS status = NT_STATUS_OK; ^~~~~~ ~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/rpc_client: clang: Fix 'Value stored during initialization is never read'Noel Power2019-09-261-2/+2
| | | | | | | | | | | | | | | Fixes: source3/rpc_client/cli_pipe.c:397:11: warning: Value stored to 'ret' during its initialization is never read <--[clang] NTSTATUS ret = NT_STATUS_OK; ^~~ ~~~~~~~~~~~~ source3/rpc_client/cli_pipe.c:1234:11: warning: Value stored to 'ret' during its initialization is never read <--[clang] NTSTATUS ret = NT_STATUS_OK; ^~~ ~~~~~~~~~~~~ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-librpc: Remove unused init_netr_CryptPassword()Andrew Bartlett2019-08-213-80/+0
| | | | | | | Unused since 38d4dba37406515181e4d6f1a1faffc18e652e27 in 2013 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpc_client: Use init_samr_CryptPassword in cli_samr rpc_clientAndreas Schneider2019-07-261-12/+47
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Use encode_rc4_passwd_buffer() in init_samr_CryptPasswordEx()Andreas Schneider2019-07-261-32/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Use GnuTLS RC4 in init_samr_CryptPassword()Andreas Schneider2019-07-261-2/+21
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Use samba_gnutls_arcfour_confounded_md5 in ↵Andreas Schneider2019-07-261-35/+15
| | | | | | | | | init_samr_CryptPasswordEx BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Return NTSTATUS for init_samr_CryptPasswordEx()Andreas Schneider2019-07-262-11/+22
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Return NTSTATUS for init_samr_CryptPassword()Andreas Schneider2019-07-262-7/+13
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Use C99 inititializer in dcerpc_samr_chgpasswd_user()Andreas Schneider2019-06-271-9/+9
| | | | | | | This also cleans up after using them. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libcli:auth: Return NTSTATUS for netlogon_creds_arcfour_crypt()Andreas Schneider2019-06-271-1/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: Use GnuTLS MD5 for samrAndreas Schneider2019-05-211-9/+31
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3 rpc_client: Fix Asan stack use after scopeGary Lockyer2019-05-101-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Asan error: ==1924==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffe63f873d0 at pc 0x7fb99dae1733 bp 0x7ffe63f86a00 sp 0x7ffe63f861a8 READ of size 24 at 0x7ffe63f873d0 thread T0 #0 0x7fb99dae1732 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79732) #1 0x7fb99cfe5549 in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 #2 0x7fb99cfe5549 in ndr_push_bytes ../../librpc/ndr/ndr_basic.c:729 #3 0x7fb99cfe5646 in ndr_push_array_uint8 ../../librpc/ndr/ndr_basic.c:754 #4 0x7fb99a69dd1b in ndr_push_netr_ChallengeResponse librpc/gen_ndr/ndr_netlogon.c:462 #5 0x7fb99a6c5fab in ndr_push_netr_NetworkInfo librpc/gen_ndr/ndr_netlogon.c:556 #6 0x7fb99a6c749d in ndr_push_netr_LogonLevel librpc/gen_ndr/ndr_netlogon.c:783 #7 0x7fb99a7222de in ndr_push_netr_LogonSamLogonEx librpc/gen_ndr/ndr_netlogon.c:16547 #8 0x7fb99c982c97 in dcerpc_binding_handle_call_send ../../librpc/rpc/binding_handle.c:416 Bug: https://bugzilla.samba.org/show_bug.cgi?id=13936 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri May 10 10:02:21 UTC 2019 on sn-devel-184
* spell "recursive"Douglas Bagnall2019-04-051-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* winbind: Generate and pass logon IDGary Lockyer2019-02-202-4/+10
| | | | | | | Generate a random logon_id and pass it in the SamLogon calls. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc idl: netlogon netr_identity_info logon_id to 64 bitGary Lockyer2019-02-201-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fold the two 32 bit values logon_id_high and logon_id_low into a single 64 bit logon_id in netr_identity_info. This will be used to tie together winbind and SamLogon requests in audit logging. Summary of the of the Query and Response from Microsoft on it's usage. [REG:119013019612095] [MS-NRPC]: NETLOGON_LOGON_IDENTITY_INFO: Does the Reserved field have LogonId meaning? Questions: In NetrLogonSamLogonEx does the Reserved field (of NETLOGON_LOGON_IDENTITY_INFO) have LogonId meaning? What is a valid LogonID, and does have any audit usage? Samba is sending a constant "deadbeef" in hex and would like to understand any usage of this field. Response: The NRPC spec is accurate in defining the field as Reserved, and without protocol significance. In the header file in our source code, it is defined as LogonId and commented as such, but it’s effectively not used. This is probably why the API structure has that field name. It may have been intended as such but it’s not used. Samba will send a random value in this field. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-rpc_client: Advertise Windows 7 client infoJustin Stephenson2018-09-081-3/+4
| | | | | | | | | | | | | | | | | Client printing operations currently fail against Windows Server 2016 with Access Denied if a client os build number lower than 6000 is advertised. Increase the default build number, major, and minor versions to values associated with client OS versoins Windows 7 and Windows Server 2008 R2. The build number value specifically needs to be increased to allow these operations to succeed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13597 Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-spoolss: Make spoolss client os_major,os_minor and os_build configurable.Günther Deschner2018-09-083-16/+46
| | | | | | | | | | | Similar to spoolss server options, make the client advertised OS version values configurable to allow overriding the defaults provided to the print server. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13597 Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Possible memory leak in map_info3_to_validationSwen Schillig2018-06-201-0/+1
| | | | | | | | | | | | In case of a failing call to copy_netr_SamInfo3, the allocated memory for "validation" needs to be free'd before returning. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 20 21:05:40 CEST 2018 on sn-devel-144
* Possible memory leak in map_info6_to_validationSwen Schillig2018-06-161-0/+1
| | | | | | | | | If the call to copy_netr_SamInfo6 returns an error status, the allocated memory for "validation" needs to be free'd before returning. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* libsmb: Give namequery.c its own headerVolker Lendecke2018-04-111-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Revert "Use "localhost" to be ipv6 only friendly"Simo Sorce2018-03-191-1/+1
| | | | This reverts commit 54548f6dde3cf74f0e90ef577a55fd720dca6d93.
* Use "localhost" to be ipv6 only friendlySimo Sorce2018-03-191-1/+1
| | | | Signed-off-by: Simo Sorce <idra@samba.org>
* s3:cli_lsarpc: use talloc_zero_array() in dcerpc_lsa_lookup_names_generic()Stefan Metzmacher2018-02-211-3/+5
| | | | | | | | | | It just feels better for such a complex function. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13281 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:cli_lsarpc: use talloc_zero_array() in dcerpc_lsa_lookup_sids_generic()Stefan Metzmacher2018-02-211-3/+6
| | | | | | | | | | It just feels better for such a complex function. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13281 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3/rpc_client: add map_info6_to_validation()Stefan Metzmacher2018-02-102-0/+29
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13261 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/rpc_client: add copy_netr_SamInfo6() and map_validation_to_info6()Stefan Metzmacher2018-02-102-0/+153
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13260 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3/rpc_client: add rpccli_netlogon_interactive_logon()Stefan Metzmacher2018-02-102-0/+127
| | | | | | | | | This will be used in a subsequent commit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13258 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:rpc_client: pass down lsa_LookupNamesLevel to ↵Stefan Metzmacher2018-02-102-1/+10
| | | | | | | | | dcerpc_lsa_lookup_sids_generic() Bug: https://bugzilla.samba.org/show_bug.cgi?id=13236 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:rpc_client: allow passing NetlogonNetwork[Transitive]Information to ↵Stefan Metzmacher2018-02-102-1/+13
| | | | | | | | | rpccli_netlogon_network_logon() Bug: https://bugzilla.samba.org/show_bug.cgi?id=13234 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:rpc_client: allow Netlogon{Network,Interactive}TransitiveInformation in ↵Stefan Metzmacher2018-02-101-2/+4
| | | | | | | | | rpccli_netlogon_password_logon() Bug: https://bugzilla.samba.org/show_bug.cgi?id=13234 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:rpc_client: Clenup copy_netr_SamInfo3() codeAndreas Schneider2018-01-152-36/+49
| | | | | | | | | | | | | This gets rid of some strange macro and makes sure we clenaup at the end. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13209 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jan 15 22:16:13 CET 2018 on sn-devel-144
* s3/rpc_client: return validation from rpccli_netlogon functionsRalph Boehme2018-01-132-20/+15
| | | | | | | | | Return the validation info instead of the already mapped info3. Higher layers need info6 if available, this is the first step in passing the unmapped info up to callers. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/rpc_client: add map_info3_to_validation()Ralph Boehme2018-01-132-0/+27
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/rpc_client: make map_validation_to_info3() public and move to util_netlogonRalph Boehme2018-01-133-77/+81
| | | | | | | Will be needed in the next commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/rpc_client: in map_validation_to_info3() make a deep copyRalph Boehme2018-01-131-4/+34
| | | | | | | | In later commits we want to map a validation to info3 without modifying the validation data. Otherwise no change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/rpc_client: move copy_netr_SamInfo3() to util_netlogonRalph Boehme2018-01-132-0/+43
| | | | | | | | | | | | The next commit will add an additional caller that in rpc_client and I don't want to pull in AUTH_COMMON. The natural place to consolidate netlogon related helper functions seems to be util_netlogon.c which already has copy_netr_SamBaseInfo(). No change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/rpc_client: fix overly long linesRalph Boehme2018-01-131-25/+27
| | | | | | | Just long lines cleanup, no further changes. Best viewed with git show -w. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/cli_netlogon: remove SEC_CHAN_NULL fallback from rpccli_connect_netlogon()Ralph Boehme2017-11-291-30/+8
| | | | | | | | | | | The caller should handle secure-channel-type SEC_CHAN_NULL. The previous commit already added handling of SEC_CHAN_NULL to cm_connect_netlogon_transport. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13167 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:cli_netlogon: let rpccli_connect_netlogon() retry once after ↵Stefan Metzmacher2017-10-201-1/+3
| | | | | | | | | NT_STATUS_NETWORK_ACCESS_DENIED Otherwise we could easily endup with an endless loop. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:cli_netlogon: make sure rpccli_connect_netlogon only returns NT_STATUS_OK ↵Stefan Metzmacher2017-10-201-4/+7
| | | | | | | on success Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rpc_client: Fix wording in a DEBUG statementVolker Lendecke2017-10-191-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 19 04:57:44 CEST 2017 on sn-devel-144
* netlogon_creds_cli: Pass "capabilities" up from creds_cli_checkVolker Lendecke2017-09-252-2/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>