summaryrefslogtreecommitdiffstats
path: root/source3/rpcclient
Commit message (Collapse)AuthorAgeFilesLines
* Allow FSRVP access generic HRESULT error message descriptionsNoel Power2014-04-021-0/+8
| | | | | | | | | | | | FSRVP can possibly return any HRESULT error in addition to it's own specific errors. This change searches the HRESULT errors for a description if the error doesn't match any of the known FSRVP ones. Also removed some errors defined in fsrvp.idl (now that they are defined in hresult.h) Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* rpcclient: abort shadow-copy set on commit failureDavid Disseldorp2014-04-011-3/+26
| | | | | | | | | | | Use similar behaviour to the diskshadow.exe FSRVP client, which aborts the shadow-copy set if it receives a failed commit response. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Apr 1 00:54:06 CEST 2014 on sn-devel-104
* rpcclient: append a trailing slash to FSRVP request UNCsDavid Disseldorp2014-03-311-6/+22
| | | | | | | | | | | | | | | | | | | The Windows Server 2012 FSRVP server exhibits strange behaviour when exposing hidden shadow copy shares. If the hidden share UNC in the AddToShadowCopySet request includes a trailing backslash (e.g. "\\server\share$\"), then the new shadow-copy share will also be hidden (e.g. "\\server\share$@{ShadowCopy.ShadowCopyId}$"). However, if the UNC does not include a trailing backslash, which until now was rpcclient's default behaviour, then the exposed shadow-copy share is not hidden. Thanks to the MS Open Specifications team for helping me track down this one. bug: https://bugzilla.samba.org/show_bug.cgi?id=10521 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient: fix build without HAVE_IPV6Gregor Beck2014-03-311-5/+14
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* For FSRVP use textual error messages instead of hex error codesNoel Power2014-03-081-2/+50
| | | | | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Mar 8 03:52:44 CET 2014 on sn-devel-104
* s3:rpcclient: make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-131-2/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_binding_set_abstract_syntax() in cmd_epmapper.cStefan Metzmacher2014-02-131-1/+7
| | | | | | | We should not use dcerpc_binding internals. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_binding_[g|s]et_*() in rpcclient.cStefan Metzmacher2014-02-131-9/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_parse_binding() to create the bindingStefan Metzmacher2014-02-131-7/+12
| | | | | | | This makes sure the binding is talloc'ed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: initialize struct dcerpc_binding completelyStefan Metzmacher2014-02-111-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: add witness commandGregor Beck2014-02-112-0/+506
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: remove unused code from cmd_lsa_get_username()Stefan Metzmacher2014-01-161-10/+0
| | | | | | | lsa_GetUserName() doesn't require a policy handle. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: add support for DCERPC_AUTH_LEVEL_CONNECTStefan Metzmacher2014-01-161-12/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_client: make cli_rpc_pipe_open_schannel() more flexibleStefan Metzmacher2014-01-071-6/+7
| | | | | | | | | | It expects a messaging_context now and returns a netlogon_creds_cli_context. This way we can finally avoid having a rpc_pipe_client->netlogon_creds. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: make use of rpccli_netlogon_password_logon() in the 'samlogon' cmdStefan Metzmacher2014-01-071-3/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: remove optional auth_level parameter of the 'samlogon' cmdStefan Metzmacher2014-01-071-7/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: give errors and clean up correctly after failing to obtain secretGarming Sam2014-01-071-0/+6
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: make use of rpccli_{create,setup}_netlogon_creds()Stefan Metzmacher2014-01-071-18/+41
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: make use of trust_pw_change()Stefan Metzmacher2014-01-071-5/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: make use of rpcclient_netlogon_creds instead of ↵Stefan Metzmacher2014-01-071-5/+17
| | | | | | | cli->netlogon_creds Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: remove unused rpccli_netlogon_setup_creds() from ↵Stefan Metzmacher2014-01-071-20/+1
| | | | | | | | | cmd_netlogon_database_redo() rpccli_netlogon_setup_creds() is already called in the main do_cmd() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: add rpcclient_netlogon_credsStefan Metzmacher2014-01-072-0/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: add rpcclient_msg_ctxStefan Metzmacher2014-01-072-0/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_client: make use of the new netlogon_creds_cli_contextStefan Metzmacher2014-01-071-8/+49
| | | | | | | | | | | | | | | This exchanges rpc_pipe_client->dc with rpc_pipe_client->netlogon_creds and lets the secure channel session state be stored in node local database. This is the proper fix for a large number of bugs: https://bugzilla.samba.org/show_bug.cgi?id=6563 https://bugzilla.samba.org/show_bug.cgi?id=7944 https://bugzilla.samba.org/show_bug.cgi?id=7945 https://bugzilla.samba.org/show_bug.cgi?id=7568 https://bugzilla.samba.org/show_bug.cgi?id=8599 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: close the connection if setting up the netlogon secure channel ↵Stefan Metzmacher2013-12-231-0/+5
| | | | | | | | | fails This is based on a patch from Garming Sam <garming@catalyst.net.nz>. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* CVE-2013-4408:s3:Ensure LookupRids() replies arrays are range checked.Jeremy Allison2013-12-091-0/+8
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Dec 9 09:00:41 CET 2013 on sn-devel-104
* CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.Jeremy Allison2013-12-092-2/+62
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* CVE-2013-4408:s3:Ensure LookupSids replies arrays are range checked.Jeremy Allison2013-12-091-2/+5
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* rpcclient: fix output of lsalookupsids for sids of type DOMAINMichael Adam2013-11-131-3/+10
| | | | | | | For domain sids, don't print NAME\*unknown* but print NAME instead. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpcclient: fix a leaked talloc_stackframe in cmd_epmapperGregor Beck2013-11-041-5/+7
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10241 Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpcclient: make use of rpcclient_cli_stateStefan Metzmacher2013-10-171-2/+2
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: introduce global rpcclient_cli_stateStefan Metzmacher2013-10-172-1/+5
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix bug #10100 - rpcclient crashes when sending the 'netshareenum 502' commandJeremy Allison2013-08-211-3/+7
| | | | | | | | | | | We are using the wrong variable for the returned count. Reported by <pisymbol@gmail.com>. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Aug 21 17:30:33 CEST 2013 on sn-devel-104
* s3:rpcclient: fix compiler warningsStefan Metzmacher2013-08-121-6/+7
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: try to use NETLOGON_NEG_SUPPORTS_AESStefan Metzmacher2013-08-102-2/+4
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: use talloc_stackframe() in do_cmd()Stefan Metzmacher2013-08-051-2/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to ↵Günther Deschner2013-08-051-1/+1
| | | | | | | | | | cli_rpc_pipe_open_noauth_transport(). Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner2013-08-053-4/+4
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_schannel().Günther Deschner2013-08-051-1/+1
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: add cmd_spoolss_play_gdi_script_on_printer_ic.Günther Deschner2013-01-241-0/+103
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: decode OsVersion{Ex} binary blobs when displaying printerdata.Günther Deschner2013-01-241-0/+21
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* spoolss: make spoolss deal with ndr64 SetForm by using proper container object.Günther Deschner2013-01-171-4/+4
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* spoolss: make spoolss deal with ndr64 AddForm by using proper container object.Günther Deschner2013-01-171-6/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.Günther Deschner2013-01-171-2/+2
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-rpcclient: Fix cmd_eventlog_loginfo() null pointer passing.Andreas Schneider2013-01-021-2/+8
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Found by Coverity.
* s3-rpcclient: Fix cmd_eventlog_readlog() null pointer passing.Andreas Schneider2013-01-021-7/+8
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Found by Coverity.
* s3-rpcclient: Check return value of add_string_to_array().Andreas Schneider2012-12-121-1/+5
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* rpcclient: fix usage docs for rpcclient adddriverDavid Disseldorp2012-11-291-2/+2
| | | | | | The printer driver name is incorrectly referred to as the printer name. Reviewed-by: Andreas Schneider <asn@samba.org>
* s3fs-client: Burn commandline password of client utils.Andreas Schneider2012-11-081-0/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 8 21:24:21 CET 2012 on sn-devel-104
* s3:rpcclient fix a compiler warningChristian Ambach2012-09-221-0/+2
|