summaryrefslogtreecommitdiffstats
path: root/source3/utils/net_rpc.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:rpc_client: make cli_rpc_pipe_open_schannel() more flexibleStefan Metzmacher2014-01-071-3/+3
| | | | | | | | | | 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:net_rpc: make use of trust_pw_change()Stefan Metzmacher2014-01-071-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:net_rpc: add net_context->netlogon_credsStefan Metzmacher2014-01-071-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libnet_join: make use of rpccli_{create,setup}_netlogon_creds()Stefan Metzmacher2014-01-071-1/+3
| | | | | 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-1/+6
| | | | | | | | | | 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-091-1/+39
| | | | | | | 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>
* s3-net: do not use rpc_pipe_np_smb_conn()Gregor Beck2013-10-171-23/+26
| | | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-net: avoid confusing output in net_rpc_oldjoin() if ↵Stefan Metzmacher2013-08-051-2/+13
| | | | | | | | | | | NET_FLAGS_EXPECT_FALLBACK is passed "net rpc join" tries net_rpc_oldjoin() first and falls back to net_rpc_join_newstyle(). We should not print the join failed if just net_rpc_oldjoin() failed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-net: use libnetjoin for "net rpc join" newstyle.Günther Deschner2013-08-051-0/+106
| | | | | | | | 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-net: use libnetjoin for "net rpc testjoin".Günther Deschner2013-08-051-0/+66
| | | | | | | | 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-libnetjoin: move "net rpc oldjoin" to use libnetjoin.Günther Deschner2013-08-051-98/+84
| | | | | | | | 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-051-10/+10
| | | | | | | | 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-net: pass down ndr_interface_table to connect_dst_pipe().Günther Deschner2013-08-051-2/+2
| | | | | | | | 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-net: Don't leak username.Andreas Schneider2013-02-221-1/+2
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-net: Check the return value of strlower_m().Andreas Schneider2012-12-121-1/+3
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-net: Check return value of string_to_sid().Andreas Schneider2012-12-121-1/+7
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* net: Use new samba_getpass() function for 'net rpc'.Andreas Schneider2012-12-031-1/+8
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* s3: Fix bug 8966, Fix net rpc share allowedusers to work with 2008r2Jeremy Allison2012-10-011-37/+44
| | | | | | | | The RAP NetShareEnum command was removed in 2008r2, so use the RPC equivalent instead. Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Oct 1 07:59:34 CEST 2012 on sn-devel-104
* Check error returns from strupper_m() (in all reasonable places).Jeremy Allison2012-08-091-7/+31
|
* s3:utils/net_rpc*: make use of cli_get_session_key()Stefan Metzmacher2012-08-011-1/+10
| | | | metze
* s3:libsmb: get rid of cli_negprotLuk Claes2012-05-281-2/+3
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: get rid of cli_state_protocolLuk Claes2012-05-281-1/+1
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: get rid of cli_state_remote_nameLuk Claes2012-05-281-3/+3
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: get rid of cli_state_*_sockaddrLuk Claes2012-05-281-1/+2
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* More strlcat/strlcpy truncate checks.Jeremy Allison2012-03-301-3/+9
|
* s3-librpc: pass struct ndr_interface_table down to ↵Andrew Bartlett2012-01-181-1/+1
| | | | | | | | | | | cli_pipe_open_generic/spnego() This allows the target service (as determined from the IDL) to be passed to GSSAPI (rather than the current, incorrect, "cifs"). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-utils/net: pass struct ndr_interface_table downAndrew Bartlett2012-01-181-69/+68
| | | | | | | | | This will allow the target service (as determined from the IDL) to be passed to GSSAPI (rather than the current, incorrect, "cifs"). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-librpc Rename and rework cli_rpc_pipe_open_ntlmssp() to be genericAndrew Bartlett2012-01-111-1/+3
| | | | | | | | | | This also includes renaming the helper function rpccli_ntlmssp_bind_data, and allows this function to operate on any gensec-supplied auth type. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-net: Fix the return codes. 0 on success, -1 on failureAmitay Isaacs2011-12-191-2/+2
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Mon Dec 19 01:57:24 CET 2011 on sn-devel-104
* s3:utils: make use of cli_tree_connect()Stefan Metzmacher2011-11-241-2/+2
| | | | metze
* s3:utils: s/Undefined/SMB_SIGNING_DEFAULT/Stefan Metzmacher2011-11-031-1/+2
| | | | metze
* s3:libsmb: pass max_protocol to cli_negprot()Stefan Metzmacher2011-09-151-1/+1
| | | | metze
* s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb()Stefan Metzmacher2011-09-081-1/+1
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Sep 8 10:21:50 CEST 2011 on sn-devel-104
* s3-net: Added the command rpc conf to the net binary.Vicentiu Ciorbaru2011-08-221-0/+8
| | | | | | | The net binary now has an extra item linked to it, the net_rpc_conf.c module. Signed-off-by: Michael Adam <obnox@samba.org>
* s3-net: Fixed whitespace errorsVicentiu Ciorbaru2011-08-221-7/+7
| | | | | | Fixed previously existing whitespace errors in net_rpc.c Signed-off-by: Michael Adam <obnox@samba.org>
* s3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hashAndrew Bartlett2011-08-031-6/+6
| | | | | | | | | | | | | | | | | | | The session key we want here (the only one that is availble to the encryption layer) is the one obtained by cli_get_session_key(), as NTLMSSP creates a per-session session key via key exchange and NTLMv2 negotiation. The key was never directly the NT hash anyway (this is simply a mistake, the extra MD4() was lost during my previous cleanup f28f113d8e76824b080359c90efd9c92de533740 in 2008), but was MD4(NT hash) in early implementations of NTLMSSP. However, regardless this call is not available on domain trusts between AD domains and Windows 2003 R2, making this less useful. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3:net_rpc: make use of cli_state_protocol()Stefan Metzmacher2011-08-021-1/+1
| | | | metze
* s3-utils/net_rpc.c: replace cli_query_secdesc_old()Björn Baumbach2011-07-231-1/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()Björn Baumbach2011-07-231-1/+1
| | | | | | Will introduce new cli_query_secdesc() function Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:net_rpc: make use of cli_state_remote_name()Stefan Metzmacher2011-07-221-2/+2
| | | | metze
* s3:net_rpc: use netr->desthost instead of cli->desthostStefan Metzmacher2011-07-221-1/+1
| | | | metze
* s3:net_rpc: make use of cli_state_remote_sockaddr()Stefan Metzmacher2011-07-221-1/+2
| | | | metze
* s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind ↵Stefan Metzmacher2011-07-201-2/+2
| | | | | | cli_state_[g|s]et_tid() metze
* s3:utils: avoid cli_nt_error()/cli_errstr() if we already have the statusStefan Metzmacher2011-07-071-2/+2
| | | | metze
* s3: make cli_resolve_path return NTSTATUSVolker Lendecke2011-07-061-2/+4
| | | | This looks larger than it is. No parameters needed changing.
* s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett2011-06-091-7/+7
| | | | | | | | There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
* s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3: fix more -Wunused-but-set-variable build warnings.Günther Deschner2011-06-011-3/+0
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Jun 1 00:29:30 CEST 2011 on sn-devel-104