summaryrefslogtreecommitdiff
path: root/source3/rpcclient
Commit message (Collapse)AuthorAgeFilesLines
* s3:rpcclient: Fix size typesAndreas Schneider2018-03-201-1/+1
| | | | | | | This fixes compilation with -Wstrict-overflow=2 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpcclient: Add FALL_THROUGH statements in rpcclient.cAndreas Schneider2018-03-011-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* rpcclient: add lookupsids_level commandStefan Metzmacher2018-02-211-0/+93
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13286 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* rpcclient: fix variable initialisation and add parenthesis to if clausesRalph Boehme2018-02-211-4/+6
| | | | | | | | | Just a few README.Coding fixes. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13286 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3/rpc_client: return validation from rpccli_netlogon functionsRalph Boehme2018-01-131-1/+13
| | | | | | | | | 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>
* rpcclient: Avoid a ZERO_STRUCT, save a few bytes .textVolker Lendecke2017-11-131-3/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: Fix "capabilities" commandVolker Lendecke2017-09-251-40/+16
| | | | | | | | | | | | This used to not properly store the chained credentials back into the netlogon_creds_cli tdb. This by the way is the bug that all the routines for the NT4 style sam replication had that just disappeared. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Sep 25 13:42:19 CEST 2017 on sn-devel-144
* rpcclient: Remove sam_sync related commandsVolker Lendecke2017-09-201-352/+0
| | | | | | | | | | | | These three commands don't use the netlogon credential chain correctly. They are missing the netlogon_creds_store after the dcerpc call, so they destroy the correct use of the netlogon creds. The only valid server for these calls that I know of would be NT4, and that should be gone long ago. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* cli_netlogon: Eliminate rpccli_setup_netlogon_creds_with_credsVolker Lendecke2017-09-161-5/+6
| | | | | | | Inlining the code from rpccli_setup_netlogon_creds Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* cli_netlogon: Rename rpccli_create_netlogon_creds_with_credsVolker Lendecke2017-09-161-1/+1
| | | | | | | This creates a context with access to a credentials, not credentials Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: Avoid netlogon_creds_cli.h in includes.hVolker Lendecke2017-09-161-0/+1
| | | | | | | There's no point recompiling all of source3 if netlogon_creds_cli.h is changed Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: clients: Use netlogon_creds_cli_close_global_db() in all normal exit paths.Jeremy Allison2017-07-261-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: rpcclient: Use rpcclient_msg_ctx as the long-lived talloc context for ↵Jeremy Allison2017-07-261-2/+2
| | | | | | | | | | | rpcclient_netlogon_creds. Guaranteed to stay around until the command exits. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: rpcclient: Use event context as the talloc parent of the rpcclient_msg_ctx.Jeremy Allison2017-07-261-1/+2
| | | | | | | | | Give control over shutdown. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: rpcclient: Split out initialization and free of event context.Jeremy Allison2017-07-261-1/+10
| | | | | | | | | Allows us to control shutdown. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:trusts_util: pass dcname to trust_pw_change()Stefan Metzmacher2017-06-271-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.Jeremy Allison2017-05-091-0/+1
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: client tools. Remove direct access to struct user_auth_info ↵Jeremy Allison2017-05-092-26/+39
| | | | | | | | | | *cmdline_auth_info. Only access through utility functions. Remove all the local pointer aliases that were just being set to cmdline_auth_info in the client tools. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: Fix enumdata spoolss display of REG_DWORDGünther Deschner2017-05-071-1/+1
| | | | | | | | | | | | | | | | One should not assume a REG_DWORD is always 4 byte long. In an enumdata(ex) context, the first reply will return with content in a buffer that can fill the largest entry in the array of attributes. All subsequent queries then reuse this buffer even if the key/value pair in question then is just a 4 byte DWORD. The remaining buffer will be just empty and of no interest. 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): Sun May 7 03:28:21 CEST 2017 on sn-devel-144
* rpcclient: allow -U'OTHERDOMAIN\user' againStefan Metzmacher2017-04-051-13/+8
| | | | | | | | | | | | | | I guess the primary reason for forcing lp_workgroup() was the usage of -U% together with schannel, see source3/script/tests/test_rpcclient_samlogon.sh BUG: https://bugzilla.samba.org/show_bug.cgi?id=12731 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Apr 5 14:09:23 CEST 2017 on sn-devel-144
* cli_netlogon: Add return parms to rpccli_netlogon_password_logonVolker Lendecke2017-03-071-0/+4
| | | | | | | Just for symmetry with rpccli_netlogon_network_logon() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:popt_common: let POPT_COMMON_CREDENTIALS imply logfile and conffile loadingStefan Metzmacher2016-12-201-15/+0
| | | | | | | | | | | All users of POPT_COMMON_CREDENTIALS basically need the same logic, while some ignore a broken smb.conf and some complain about it. This will allow the future usage of config options in the credential post processing. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:waf: Make PARAM and SMBREGISTRY a subsystem of smbconf onlyAndreas Schneider2016-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is the only way to resolve cirular dependencies with these libraries. I've tried several ways but this is the only way to do it correctly. In future we should try to seperate them by passing down information or making a more lightweight loadparm mechanism. +---------+ +-------------+ | | | | | param <---------+ +--------+ smbregistry | | | | | | | +----+----+ | | +------^------+ | +---+----v--+ | | | | | +----------> smbconf +------------+ | | +-----------+ Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-rpcclient: Add AsyncCorePrinterDriverInstalled commandGünther Deschner2016-11-241-1/+66
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: Add rpcclient IRemoteWinspool commandsGünther Deschner2016-11-243-0/+116
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:rpcclient: Use messaging_init_client()Andreas Schneider2016-11-161-3/+13
| | | | | | | Pair-Programmed-With: Jeremy Allison <jra@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient: Print a new line on exitAndreas Schneider2016-11-161-1/+3
| | | | | | | If you press 'ctrl+d' print a new line for the shell. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:popt_common: simplify popt_common_credentials handlingStefan Metzmacher2016-11-151-14/+1
| | | | | | | | | | | | | | | | This offers a global 'struct user_auth_info *cmdline_auth_info', similar to the 'cmdline_credentials' we have in source4/lib/cmdline/popt_common.c. And we create that in the POPT_CALLBACK_REASON_PRE stage and finalize it in the POPT_CALLBACK_REASON_POST stage. That means much less boring work for the callers and more freedom to change the user_auth_info internals in future. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: add object_uuid argument to cmd_epmapper_map()Günther Deschner2016-11-111-4/+14
| | | | | | | | | | | | | | This allows to test how an epmap-server deals with object_uuid during the epm_Map call. On windows the object_uuid is always ignored expect for the case when the first abstract_syntax in the tower is the mgmt service. Even in that case, the role of the object_uuid is still unclear. Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: Use correct values for secdesc and devmode pointersGünther Deschner2016-11-111-2/+2
| | | | | | | | | | | | | | ULONG_PTR needs to be decoded as a uint3264 and not as a 'uint32 *'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11197 Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: allow to pass down interface and transport to epmmap commandGünther Deschner2016-10-281-2/+47
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: add packet auth level commandGünther Deschner2016-10-261-0/+42
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: support [packet] in rpcclient binding strings.Günther Deschner2016-10-261-0/+4
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-rpcclient: Fix initializing rpcclientAndreas Schneider2016-10-061-7/+19
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_UNKNOWN_LEVEL with WERR_INVALID_LEVEL in ↵Günther Deschner2016-09-281-1/+1
| | | | | | | | | source3/rpcclient/cmd_spoolss.c Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in ↵Günther Deschner2016-09-283-9/+9
| | | | | | | | | source3/rpcclient/ Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in source3/rpcclient/Günther Deschner2016-09-283-9/+9
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/rpcclient/Günther Deschner2016-09-285-17/+17
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpcclient: add getdriverpackagepath command.Günther Deschner2016-09-111-0/+69
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-waf: give rpcclient its own wscript_build.Günther Deschner2016-09-111-0/+54
| | | | | Guenther Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient: make use of SMB_SIGNING_IPC_DEFAULTStefan Metzmacher2016-05-211-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | This means we'll use the "client ipc min protocol", "client ipc max protocol" and "client ipc signing" options. But "--signing=no" or "--signing=required" still overwrite "client ipc signing". The following can be used to alter the max protocol rpcclient --option="client ipc max protocol=SMB2_10" 172.31.9.163 -Uadministrator%A1b2C3d4 -c "getusername" Account Name: Administrator, Authority Name: W4EDOM-L4 rpcclient --option="client ipc max protocol=NT1" 172.31.9.163 -Uadministrator%A1b2C3d4 -c "getusername" Account Name: Administrator, Authority Name: W4EDOM-L4 rpcclient 172.31.9.163 -Uadministrator%A1b2C3d4 -c "getusername" Account Name: Administrator, Authority Name: W4EDOM-L4 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11927 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat May 21 05:01:15 CEST 2016 on sn-devel-144
* Revert "s3:rpcclient add -m option"Stefan Metzmacher2016-05-211-5/+0
| | | | | | | | | | | | This reverts commit a55ac51f5f67c61bda1fee7067ad7d09a0c1efdf. This will be implemented in a more common way using the "client ipc max protocol" option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11927 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:rpcclient add -m optionChristian Ambach2016-05-121-0/+5
| | | | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 12 17:36:09 CEST 2016 on sn-devel-144
* s3:rpcclient make --pw-nt-hash option workChristian Ambach2016-05-121-0/+3
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10796 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* CVE-2016-2118: s3: rpcclient: change the default auth level from ↵Stefan Metzmacher2016-04-121-3/+2
| | | | | | | | | | | DCERPC_AUTH_LEVEL_CONNECT to DCERPC_AUTH_LEVEL_INTEGRITY ncacn_ip_tcp:server should get the same protection as ncacn_np:server if authentication and smb signing is used. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11616 Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: rpcclient: Prevent null ptr access by returning error if no creds availableNoel Power2015-11-041-0/+5
| | | | | | | | | | Prevent rpccli_netlogon_password_logon being called with 'NULL' credentials. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11569 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpcclient: protect against empty witness async notify messages.Günther Deschner2015-09-291-0/+5
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-rpcclient: add client for create enum ex.Günther Deschner2015-08-041-0/+58
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: José A. Rivera <jarrpa@samba.org>
* s3-rpcclient: add cmd_clusapi_get_cluster_version2.Günther Deschner2015-07-141-0/+41
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
* rpcclient: Set internal log level to 0Christof Schmitt2015-07-101-0/+1
| | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>