summaryrefslogtreecommitdiff
path: root/source3/rpcclient
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* s3:rpcclient: Use C99 initializer for cmd_set in cmd_lsarpcAndreas Schneider2019-01-281-38/+337
| | | | | 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_samrAndreas Schneider2019-01-281-38/+339
| | | | | 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_clusapiAndreas Schneider2019-01-281-13/+116
| | | | | 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_ntsvcvsAndreas Schneider2019-01-281-9/+76
| | | | | 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_iremotewinspoolAndreas Schneider2019-01-281-13/+29
| | | | | 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_winregAndreas Schneider2019-01-281-5/+36
| | | | | 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_fssAndreas Schneider2019-01-281-2/+6
| | | | | 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_wkssvcAndreas Schneider2019-01-281-9/+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 cmd_dssetupAndreas Schneider2019-01-281-5/+18
| | | | | 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_drsuapiAndreas Schneider2019-01-281-6/+46
| | | | | 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_echoAndreas Schneider2019-01-281-7/+47
| | | | | 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_srvsvcAndreas Schneider2019-01-281-20/+168
| | | | | 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_netlogonAndreas Schneider2019-01-281-23/+201
| | | | | 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_dfsAndreas Schneider2019-01-281-10/+64
| | | | | 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_spoolssAndreas Schneider2019-01-281-42/+389
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpcclient: Use C99 initializer for poptOption in cmd_witnessAndreas Schneider2019-01-281-17/+129
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:rpclient: rpclient help is not very helpfulTim Beale2019-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The help was not telling me that there was a mandatory 'server' argument that I needed to specify. After trying several different combinations of parameters, I eventually had to run the tool in gdb to work out why it was complaining. This is the output I was getting: bin/rpcclient -U$USERNAME%$PASSWORD -I $SERVER_IP Usage: rpcclient [OPTION...] -c, --command=COMMANDS Execute semicolon separated cmds -I, --dest-ip=IP Specify destination IP address -p, --port=PORT Specify port number ... New help output is: Usage: rpcclient [OPTION...] <server> Options: -c, --command=COMMANDS Execute semicolon separated cmds ... Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org>
* rpcclient: Use dom_sid_str_bufVolker Lendecke2018-12-111-4/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: Use dom_sid_str_bufVolker Lendecke2018-12-082-34/+39
| | | | | | | | 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): Sat Dec 8 02:43:48 CET 2018 on sn-devel-144
* s3:rpcclient: Initialize domain_nameAndreas Schneider2018-11-141-1/+1
| | | | | | | | | | | This could be passed uninitialized to dcerpc_netr_DsRGetDCName() Found by cppcheck. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-rpcclient: Use spoolss_init_spoolss_UserLevel1 in winspool cmdsGünther Deschner2018-09-081-7/+9
| | | | | | | | | Use spoolss initialization function to set client version information for iremotewinspool printer operations Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpcclient: Use cmdline_messaging_contextChristof Schmitt2018-09-071-26/+2
| | | | | | | | | | Use cmdline_messaging_context with its error checking instead of open coding the same steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:lib: Move popt_common_credentials to separate fileChristof Schmitt2018-09-073-3/+3
| | | | | | | | | | | This is only used by command line utilities and has additional dependencies. Move to a separate file to contain the dependencies to the command line tools. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>