summaryrefslogtreecommitdiff
path: root/source3/rpcclient
Commit message (Collapse)AuthorAgeFilesLines
* s3: safe_string: do not include string_wrappers.hMatthew DeVore2020-08-282-0/+2
| | | | | | | | | | | | | Rather than have safe_string.h #include string_wrappers.h, make users of string_wrappers.h include it explicitly. includes.h now no longer includes string_wrappers.h transitively. Still allow includes.h to #include safe_string.h for now so that as many modules as possible get the safety checks in it. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient: Remove obsolete force encryption from rpcclientAndreas Schneider2020-08-191-11/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Remove signing_state from cli_full_connection_creds()Andreas Schneider2020-08-192-6/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Introduce CLI_FULL_CONNECTION_IPCAndreas Schneider2020-08-192-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: relicense smb_strtoul(l) under LGPLv3Ralph Boehme2020-08-032-0/+2
| | | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 3 22:21:04 UTC 2020 on sn-devel-184
* s3:rpcclient: avoid using auth related CLI_FULL_CONNECTION_* flagsStefan Metzmacher2020-05-281-12/+0
| | | | | | We use get_cmdline_auth_info_creds() and pass cli_credentials arround. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpcclient: Use get_cmdline_auth_info_creds()Stefan Metzmacher2020-05-281-21/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpcclient: Rename creds to trust_credsAndreas Schneider2020-05-281-5/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:rpcclient: make use of get_cmdline_auth_info_creds() in cmd_spoolss.cStefan Metzmacher2020-05-281-8/+3
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpcclient: Make netfileenum cmd print the path namesVolker Lendecke2020-05-141-0/+8
| | | | | | | | | Needed for the next commit testing netfileenum Bug: https://bugzilla.samba.org/show_bug.cgi?id=14355 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* rpcclient: Use struct initializers in cmd_srvsvc_net_file_enum()Volker Lendecke2020-05-141-11/+10
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=14355 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Fix clang 9 missing-field-initializer warningsGary Lockyer2020-05-081-1/+1
| | | | Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpcclient: Ask for minimal permissions for SID and name lookupsChristof Schmitt2020-03-111-8/+8
| | | | | | | | | | The RPC calls to lookup SIDS and names only require the POLICY_LOOKUP_NAMES permission. Only ask for that instead of the MAXIMUM_ALLOWED flag. This allows these calls to work against a NetApp that does not accept MAXIMUM_ALLOWED (see bugzilla 11105). Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-rpcclient: add clusapi_resume_node command.Günther Deschner2020-01-091-0/+65
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jan 9 01:15:34 UTC 2020 on sn-devel-184
* s3-rpcclient: add clusapi_pause_node command.Günther Deschner2020-01-081-0/+65
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: give slightly better descriptions to clusapi commandsGünther Deschner2020-01-081-11/+11
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: pidlify spoolss_EnumPerMachineConnectionsGünther Deschner2020-01-081-10/+10
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: add delpermachineconnection commandGünther Deschner2020-01-081-0/+50
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: add addpermachineconnection commandGünther Deschner2020-01-081-0/+59
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: add enumpermachineconnections commandGünther Deschner2020-01-081-1/+61
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: properly check and initialize buffers in getdriverpackagepathGünther Deschner2020-01-081-2/+7
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: add cmd_spoolss_get_core_printer_driversGünther Deschner2020-01-081-0/+73
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* session: convert sess_crypt_blob to use gnutlsIsaac Boukris2019-12-101-4/+21
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* mdssvc.idl: pass policy_handle as pointerRalph Boehme2019-10-091-4/+4
| | | | | | | | | | | | 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
* rpcclient: Remove unused global domain sidVolker Lendecke2019-10-031-72/+0
| | | | | | | | | | For the auth_log tests using rpcclient this means one message less 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 3 17:59:13 UTC 2019 on sn-devel-184
* rpcclient: Remove domain sid checkVolker Lendecke2019-10-031-6/+0
| | | | | | | The samr calls can take care of this on their own Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: Make cmd_samr.c independent of global domain_sidVolker Lendecke2019-10-031-8/+75
| | | | | | | | Pure SAMR allows us to figure out the domain sid, we don't need LSA for this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: Fix a commentVolker Lendecke2019-10-031-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: Move rpccli_try_samr_connects() to cmd_samr.cVolker Lendecke2019-10-031-0/+22
| | | | | | | 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>
* rpcclient: Remove rpcclient_cli_stateVolker Lendecke2019-10-032-4/+0
| | | | | | | An unneeded global Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpclient: Remove cmd_testVolker Lendecke2019-10-033-98/+0
| | | | | | | | I can't even properly find why this went in. It's the only user of the global rpcclient_cli_state, which can go if we remove this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: add logongetdomaininfo commandGünther Deschner2019-09-201-1/+51
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Spelling fixes s/Unsuported/Unsupported/Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* rpcclient: free popt context when doneSwen Schillig2019-08-221-0/+1
| | | | | | | | If done with popt context it should be free'd. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* rpcclient: add some simple commands for Spotlight RPCRalph Boehme2019-08-083-0/+465
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: domain_sid is only needed for SAMRRalph Boehme2019-08-081-5/+8
| | | | | | | | This allows using rpcclient commands with servers that don't implement LSA QueryInfoPolicy. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient: Use a stackframe for temporary memoryAndreas Schneider2019-07-261-17/+39
| | | | | 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-261-1/+4
| | | | | | | 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-261-1/+4
| | | | | | | 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>
* source3: Update all consumers of strtoul_err(), strtoull_err() to new APISwen Schillig2019-06-302-2/+6
| | | | | | Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3/rpcclient: cppcheck: Fix shiftTooManyBitsSigned errorNoel Power2019-06-041-1/+1
| | | | | | | | | Fixes source3/rpcclient/cmd_srvsvc.c:44: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3/rpcclient: Fix bad (and illegal) func castNoel Power2019-05-101-2/+1
| | | | | | | | | | | | | | | | ../../source3/rpcclient/cmd_samr.c: In function ‘cmd_samr_get_usrdom_pwinfo’: ../../librpc/ndr/libndr.h:219:76: error: cast between incompatible function types from ‘void (*)(struct ndr_print *, const char *, uint32_t)’ {aka ‘void (*)(struct ndr_print *, const char *, unsigned int)’} to ‘void (*)(struct ndr_print *, const char *, const void *)’ [-Werror=cast-function-type] #define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p) ^ ../../source3/rpcclient/cmd_samr.c:2646:4: note: in expansion of macro ‘NDR_PRINT_STRUCT_STRING’ NDR_PRINT_STRUCT_STRING(mem_ctx, Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri May 10 02:26:02 UTC 2019 on sn-devel-184
* rpcclient: Use wrapper for string to integer conversionSwen Schillig2019-03-012-2/+13
| | | | | | | | | | | | In order to detect an value overflow error during the string to integer conversion with strtoul/strtoull, the errno variable must be set to zero before the execution and checked after the conversion is performed. This is achieved by using the wrapper function strtoul_err and strtoull_err. Signed-off-by: Swen Schillig <swen@linux.ibm.com> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Generate and pass logon IDGary Lockyer2019-02-201-0/+3
| | | | | | | 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>
* s3:rpcclient: Use C99 initializer for cmd_set in cmd_shutdownAndreas Schneider2019-01-281-6/+26
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for cmd_set in cmd_epmapperAndreas Schneider2019-01-281-7/+27
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for cmd_set in cmd_testAndreas Schneider2019-01-281-6/+15
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for cmd_set in cmd_eventlogAndreas Schneider2019-01-281-10/+86
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for cmd_set in cmd_witnessAndreas Schneider2019-01-281-7/+56
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for cmd_set in rpcclientAndreas Schneider2019-01-281-21/+165
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>