From 8d429db41075618372b6a18e7d4eb064f7839467 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 3 Jul 2000 04:26:37 +0000 Subject: first pass at merging rpcclient from TNG to HEAD. You can get a semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. The changes to the header files were minor. A few struct's and a few additional fields to existing ones. No deletions. **minimal change necessary** :-) Well, maybe not minimal, but I tried. All other programs compile, link and run ok from what I can tell so I don;t think I broke anything. --jerry (This used to be commit cd7f0b0b91afd3331c0607ba2fcb3ccdd41ecebf) --- source3/include/rpc_client.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 source3/include/rpc_client.h (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h new file mode 100644 index 0000000000..1d7bee4105 --- /dev/null +++ b/source3/include/rpc_client.h @@ -0,0 +1,27 @@ +/* + Unix SMB/Netbios implementation. + Version 1.9. + SMB parameters and setup + Copyright (C) Elrond 2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _RPC_CLIENT_H +#define _RPC_CLIENT_H + +#include "rpc_client_proto.h" + +#endif /* _RPC_CLIENT_H */ -- cgit From e40449fa720d0934abd06cd0b0b05d0ca0f4e257 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 28 Apr 2001 00:32:56 +0000 Subject: rpcclient merge from 2.2 (including Jeremy's non-void return fix) (This used to be commit 0a6ceed279cc8111008b21f75c6791efbd993f4b) --- source3/include/rpc_client.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 1d7bee4105..270545c2a3 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -22,6 +22,8 @@ #ifndef _RPC_CLIENT_H #define _RPC_CLIENT_H +#if 0 /* JERRY */ #include "rpc_client_proto.h" +#endif #endif /* _RPC_CLIENT_H */ -- cgit From cd68afe31256ad60748b34f7318a180cfc2127cc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 30 Jan 2002 06:08:46 +0000 Subject: Removed version number from file header. Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa) --- source3/include/rpc_client.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 270545c2a3..bce9ec7f27 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. SMB parameters and setup Copyright (C) Elrond 2000 -- cgit From 9d009834a63e45e8a348419d4f5313757cff8c8d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Mar 2005 18:05:31 +0000 Subject: r6040: finish out 'net rpc service list' (This used to be commit 42588ba50cb1b47a00f3e0bed33ca3431eb8af14) --- source3/include/rpc_client.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index bce9ec7f27..4ac2f43ee0 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -1,7 +1,7 @@ /* Unix SMB/CIFS implementation. SMB parameters and setup - Copyright (C) Elrond 2000 + Copyright (C) Gerald (Jerry) Carter 2005. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,8 +21,21 @@ #ifndef _RPC_CLIENT_H #define _RPC_CLIENT_H -#if 0 /* JERRY */ -#include "rpc_client_proto.h" -#endif +/* macro to expand cookie-cutter code in cli_xxx() */ + +#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, q_ps, r_ps, q_io_fn, r_io_fn, default_error) \ +{ r_out.status = default_error;\ + prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \ + prs_init( &r_ps, 0, ctx, UNMARSHALL );\ + if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ + if ( rpc_api_pipe_req(pcli, pipe_num, opnum, &q_ps, &r_ps) ) {\ + if (!r_io_fn("", &r_out, &r_ps, 0)) {\ + r_out.status = default_error;\ + }\ + }\ + }\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ +} #endif /* _RPC_CLIENT_H */ -- cgit From fed660877c16562265327c6093ea645cf4176b5c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 8 Jun 2005 22:10:34 +0000 Subject: r7415: * big change -- volker's new async winbindd from trunk (This used to be commit a0ac9a8ffd4af31a0ebc423b4acbb2f043d865b8) --- source3/include/rpc_client.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 4ac2f43ee0..9ca2d5aa8c 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -21,9 +21,10 @@ #ifndef _RPC_CLIENT_H #define _RPC_CLIENT_H -/* macro to expand cookie-cutter code in cli_xxx() */ +/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, q_ps, r_ps, q_io_fn, r_io_fn, default_error) \ +#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ { r_out.status = default_error;\ prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \ prs_init( &r_ps, 0, ctx, UNMARSHALL );\ @@ -38,4 +39,22 @@ prs_mem_free( &r_ps );\ } +/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req_int() */ + +#define CLI_DO_RPC_EX( pcli, ctx, pipe_num, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ +{ r_out.status = default_error;\ + prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \ + prs_init( &r_ps, 0, ctx, UNMARSHALL );\ + if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ + if ( rpc_api_pipe_req_int(pcli, opnum, &q_ps, &r_ps) ) {\ + if (!r_io_fn("", &r_out, &r_ps, 0)) {\ + r_out.status = default_error;\ + }\ + }\ + }\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ +} + #endif /* _RPC_CLIENT_H */ -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/include/rpc_client.h | 68 ++++++++++++++++++++++++++++++++------------ 1 file changed, 50 insertions(+), 18 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 9ca2d5aa8c..8a83c0f8ae 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -22,36 +22,68 @@ #define _RPC_CLIENT_H /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ - -#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, \ + +#define CLI_DO_RPC( pcli, ctx, p_idx, opnum, q_in, r_out, \ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ -{ r_out.status = default_error;\ - prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \ - prs_init( &r_ps, 0, ctx, UNMARSHALL );\ +{\ + SMB_ASSERT(pcli->pipe_idx == p_idx); \ + if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ + return NT_STATUS_NO_MEMORY;\ + }\ + if (!prs_init( &r_ps, 0, ctx, UNMARSHALL )) {\ + prs_mem_free( &q_ps );\ + return NT_STATUS_NO_MEMORY;\ + }\ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ - if ( rpc_api_pipe_req(pcli, pipe_num, opnum, &q_ps, &r_ps) ) {\ - if (!r_io_fn("", &r_out, &r_ps, 0)) {\ - r_out.status = default_error;\ - }\ + NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ + if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ + return _smb_pipe_stat_;\ + }\ + if (!r_io_fn("", &r_out, &r_ps, 0)) {\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ + return default_error;\ }\ + } else {\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ + return default_error;\ }\ prs_mem_free( &q_ps );\ prs_mem_free( &r_ps );\ } -/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req_int() */ +/* Arrrgg. Same but with WERRORS. Needed for registry code. */ -#define CLI_DO_RPC_EX( pcli, ctx, pipe_num, opnum, q_in, r_out, \ +#define CLI_DO_RPC_WERR( pcli, ctx, p_idx, opnum, q_in, r_out, \ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ -{ r_out.status = default_error;\ - prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \ - prs_init( &r_ps, 0, ctx, UNMARSHALL );\ +{\ + SMB_ASSERT(pcli->pipe_idx == p_idx); \ + if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ + return WERR_NOMEM;\ + }\ + if (!prs_init( &r_ps, 0, ctx, UNMARSHALL )) {\ + prs_mem_free( &q_ps );\ + return WERR_NOMEM;\ + }\ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ - if ( rpc_api_pipe_req_int(pcli, opnum, &q_ps, &r_ps) ) {\ - if (!r_io_fn("", &r_out, &r_ps, 0)) {\ - r_out.status = default_error;\ - }\ + NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ + if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ + return ntstatus_to_werror(_smb_pipe_stat_);\ + }\ + if (!r_io_fn("", &r_out, &r_ps, 0)) {\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ + return default_error;\ }\ + } else {\ + prs_mem_free( &q_ps );\ + prs_mem_free( &r_ps );\ + return default_error;\ }\ prs_mem_free( &q_ps );\ prs_mem_free( &r_ps );\ -- cgit From 54b1c585bbe2e60e9251fcaaf4d95b68b31e2618 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 11 Jan 2006 19:18:40 +0000 Subject: r12853: Fix segfault in "net rpc vampire|samdump" (Bugzilla #3390). The session key, after beeing set, was zeroed later on by the prs_init in the CLI_DO_RPC macro. Guenther (This used to be commit eaaeaa767e86151886964dcdd9f3186f0b31ed53) --- source3/include/rpc_client.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 8a83c0f8ae..0524f037e2 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -23,8 +23,8 @@ /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -#define CLI_DO_RPC( pcli, ctx, p_idx, opnum, q_in, r_out, \ - q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ +#define CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error, copy_sess_key ) \ {\ SMB_ASSERT(pcli->pipe_idx == p_idx); \ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ @@ -34,6 +34,7 @@ prs_mem_free( &q_ps );\ return NT_STATUS_NO_MEMORY;\ }\ + if ( copy_sess_key) prs_set_session_key(&q_ps, (const char *)pcli->dc->sess_key);\ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ @@ -41,6 +42,7 @@ prs_mem_free( &r_ps );\ return _smb_pipe_stat_;\ }\ + if ( copy_sess_key ) prs_set_session_key(&r_ps, (const char *)pcli->dc->sess_key);\ if (!r_io_fn("", &r_out, &r_ps, 0)) {\ prs_mem_free( &q_ps );\ prs_mem_free( &r_ps );\ @@ -55,6 +57,21 @@ prs_mem_free( &r_ps );\ } +#define CLI_DO_RPC_COPY_SESS_KEY( pcli, ctx, p_idx, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ +{\ + CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error, True ); \ +} + +#define CLI_DO_RPC( pcli, ctx, p_idx, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ +{\ + CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ + q_ps, r_ps, q_io_fn, r_io_fn, default_error, False ); \ +} + + /* Arrrgg. Same but with WERRORS. Needed for registry code. */ #define CLI_DO_RPC_WERR( pcli, ctx, p_idx, opnum, q_in, r_out, \ -- cgit From 85e4a7a5b36f1131ee742f108811e994af9efce9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Sep 2006 19:33:27 +0000 Subject: r18394: get the lsa client code to link (This used to be commit 96e412a04cedc4c361c08e0ed1d141f3b018728b) --- source3/include/rpc_client.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 0524f037e2..0b3bd0505a 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -21,6 +21,11 @@ #ifndef _RPC_CLIENT_H #define _RPC_CLIENT_H +/* autogenerated client stubs */ + +#include "librpc/gen_ndr/cli_unixinfo.h" +#include "librpc/gen_ndr/cli_lsa.h" + /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ #define CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ -- cgit From 8be112a81bf7d7fb48ee82fd38c1f8d0f85bbc75 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Sep 2006 13:42:23 +0000 Subject: r18469: Use new pidl-generated DFS client code. (This used to be commit e277fb067b1a12d816c8a066839751c1824d27bb) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 0b3bd0505a..407d5d97a7 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -24,6 +24,7 @@ /* autogenerated client stubs */ #include "librpc/gen_ndr/cli_unixinfo.h" +#include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From e5db7fee0f5cb3bd7434cdefebabc7a8376aa0d4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 15 Sep 2006 22:49:27 +0000 Subject: r18572: Use the autogenerated client and server for the echo interface and implement some of the missing functions. RPC-ECHO now passes against Samba3. (This used to be commit 9e9a05366176454cc1779acc6c2b6070743f5939) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 407d5d97a7..09aa57acc0 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -23,6 +23,7 @@ /* autogenerated client stubs */ +#include "librpc/gen_ndr/cli_echo.h" #include "librpc/gen_ndr/cli_unixinfo.h" #include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" -- cgit From a6ddf9bf5d2258a26f6cb5d1913ebc949678f216 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Sep 2006 15:58:48 +0000 Subject: r18711: Replace the following hand code client routines: * rpccli_reg_abort_shutdown() * rpccli_reg_flush_key() Remove the cmd_reg.c from rpcclient since the entire file was unused (This used to be commit c4788f0c1398feb098f131aa5c4d0398d7489527) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 09aa57acc0..766b35a2f9 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -27,6 +27,7 @@ #include "librpc/gen_ndr/cli_unixinfo.h" #include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" +#include "librpc/gen_ndr/cli_winreg.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From ed7f4ad60e8beb5dd473a6fccf4786e921dc2cdc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Sep 2006 16:46:55 +0000 Subject: r18717: remove old defines in preference of the flags in librpc/gen_ndr/srvsvc.h (This used to be commit 080c51dd8046cb19cca90035efe73529a3f6970b) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 766b35a2f9..78efc7c2fc 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -28,6 +28,7 @@ #include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" #include "librpc/gen_ndr/cli_winreg.h" +#include "librpc/gen_ndr/cli_wkssvc.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From eab57a0a0fe90be464f5061691f57ca1da150885 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 21 Sep 2006 17:51:06 +0000 Subject: r18789: Replace the winreg server code with the libndr parsing code. Many things work (OpenHKLM, etc...) but some still don't. This shouldn't block anyone so I'm checking it in. Will probably move to a bzr tree after this for longer dev cycles between checkins. (This used to be commit cf1404a0d7538288b9370ba80df328f81b713ce0) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 78efc7c2fc..ee66682df1 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -28,6 +28,7 @@ #include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" #include "librpc/gen_ndr/cli_winreg.h" +#include "librpc/gen_ndr/cli_initshutdown.h" #include "librpc/gen_ndr/cli_wkssvc.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From 7ba2554d88a187ca1f4f40014363fdf9de2223a0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Sep 2006 23:57:32 +0000 Subject: r18802: Use the pidl-generated code for the srvsvc interface, both client and server code. This has had some basic testing. I'll do more during the next couple of days and hopefully also make RPC-SRVSVC from Samba4 pass against it. (This used to be commit ef10672399c4b82700dc431b4d93431ffdd42d98) --- source3/include/rpc_client.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index ee66682df1..72737eafaf 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -27,6 +27,8 @@ #include "librpc/gen_ndr/cli_unixinfo.h" #include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" +#include "librpc/gen_ndr/cli_srvsvc.h" +#include "librpc/gen_ndr/cli_svcctl.h" #include "librpc/gen_ndr/cli_winreg.h" #include "librpc/gen_ndr/cli_initshutdown.h" #include "librpc/gen_ndr/cli_wkssvc.h" -- cgit From 0389cad7c492eda5aee590d0396748c7da9b44ff Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Apr 2007 12:28:40 +0000 Subject: r22055: Port the endpoint mapper (and functions it requires) to Samba 3. (This used to be commit ad981261877e6a2dce0c4f4e71fd9127aa31538a) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 72737eafaf..94803dbaea 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -25,6 +25,7 @@ #include "librpc/gen_ndr/cli_echo.h" #include "librpc/gen_ndr/cli_unixinfo.h" +#include "librpc/gen_ndr/cli_epmapper.h" #include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" #include "librpc/gen_ndr/cli_srvsvc.h" -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/include/rpc_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 94803dbaea..444c124a97 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/include/rpc_client.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 444c124a97..95aeffdcb9 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef _RPC_CLIENT_H -- cgit From e5a951325a6cac8567af3a66de6d2df577508ae4 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Wed, 10 Oct 2007 15:34:30 -0500 Subject: [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab) --- source3/include/rpc_client.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 95aeffdcb9..66c4f58987 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -23,15 +23,14 @@ /* autogenerated client stubs */ #include "librpc/gen_ndr/cli_echo.h" -#include "librpc/gen_ndr/cli_unixinfo.h" -#include "librpc/gen_ndr/cli_epmapper.h" -#include "librpc/gen_ndr/cli_dfs.h" #include "librpc/gen_ndr/cli_lsa.h" -#include "librpc/gen_ndr/cli_srvsvc.h" #include "librpc/gen_ndr/cli_svcctl.h" -#include "librpc/gen_ndr/cli_winreg.h" -#include "librpc/gen_ndr/cli_initshutdown.h" #include "librpc/gen_ndr/cli_wkssvc.h" +#include "librpc/gen_ndr/cli_eventlog.h" +#include "librpc/gen_ndr/cli_dfs.h" +#include "librpc/gen_ndr/cli_initshutdown.h" +#include "librpc/gen_ndr/cli_winreg.h" +#include "librpc/gen_ndr/cli_srvsvc.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From 10a55fb4ea8cbfec5b58fb00389ff4d48e4e527e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 17 Jan 2008 10:35:55 +0100 Subject: Include auto-generated client headers for netlogon/samr. Guenther (This used to be commit ad8f6933322e7175b74cc3de525fda58ae150baa) --- source3/include/rpc_client.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 66c4f58987..01e2a8421b 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -31,6 +31,8 @@ #include "librpc/gen_ndr/cli_initshutdown.h" #include "librpc/gen_ndr/cli_winreg.h" #include "librpc/gen_ndr/cli_srvsvc.h" +#include "librpc/gen_ndr/cli_samr.h" +#include "librpc/gen_ndr/cli_netlogon.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From 05ff7fd46e19d9c1aab8524495c9b926290927c7 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 25 Jan 2008 13:26:10 +0100 Subject: Use generated DSSETUP client & server rpc functions and remove the hand-written ones. Guenther (This used to be commit d5ebfccebb1f1b56b45673a506fcdb414103c43b) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 01e2a8421b..c560fd0909 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -33,6 +33,7 @@ #include "librpc/gen_ndr/cli_srvsvc.h" #include "librpc/gen_ndr/cli_samr.h" #include "librpc/gen_ndr/cli_netlogon.h" +#include "librpc/gen_ndr/cli_dssetup.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From 082392d975808747ce1f485e6abf3a796e7ae233 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Sun, 17 Feb 2008 20:25:05 +0100 Subject: Use pidl for NTSVCS. Guenther (This used to be commit 84a9bf0b7372bd7b7d4a1490c45e68b69889af8a) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index c560fd0909..e1ebb2509d 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -34,6 +34,7 @@ #include "librpc/gen_ndr/cli_samr.h" #include "librpc/gen_ndr/cli_netlogon.h" #include "librpc/gen_ndr/cli_dssetup.h" +#include "librpc/gen_ndr/cli_ntsvcs.h" /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -- cgit From e06aa46b9fab1e107fea8f6453fb13deffa91e96 Mon Sep 17 00:00:00 2001 From: Marc VanHeyningen Date: Fri, 14 Mar 2008 14:26:28 -0800 Subject: Coverity fixes (This used to be commit 3fc85d22590550f0539215d020e4411bf5b14363) --- source3/include/rpc_client.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index e1ebb2509d..c552271ee7 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -36,6 +36,8 @@ #include "librpc/gen_ndr/cli_dssetup.h" #include "librpc/gen_ndr/cli_ntsvcs.h" +#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) + /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ #define CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ @@ -45,10 +47,7 @@ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return NT_STATUS_NO_MEMORY;\ }\ - if (!prs_init( &r_ps, 0, ctx, UNMARSHALL )) {\ - prs_mem_free( &q_ps );\ - return NT_STATUS_NO_MEMORY;\ - }\ + prs_init_empty( &r_ps, ctx, UNMARSHALL );\ if ( copy_sess_key) prs_set_session_key(&q_ps, (const char *)pcli->dc->sess_key);\ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ @@ -96,10 +95,7 @@ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return WERR_NOMEM;\ }\ - if (!prs_init( &r_ps, 0, ctx, UNMARSHALL )) {\ - prs_mem_free( &q_ps );\ - return WERR_NOMEM;\ - }\ + prs_init_empty( &r_ps, ctx, UNMARSHALL );\ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ -- cgit From f56eedb95c64593ceff0ef91b99729c5071aa7ac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 20 Apr 2008 11:45:41 +0200 Subject: Remove the pipe_idx variable from rpc_pipe_client (This used to be commit 4840febcd481563c3d9b2fabc1fe1b2ae5a76cf6) --- source3/include/rpc_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index c552271ee7..ce0c932981 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -91,7 +91,7 @@ #define CLI_DO_RPC_WERR( pcli, ctx, p_idx, opnum, q_in, r_out, \ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ {\ - SMB_ASSERT(pcli->pipe_idx == p_idx); \ + SMB_ASSERT(rpccli_is_pipe_idx(pcli, p_idx)); \ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return WERR_NOMEM;\ }\ -- cgit From 44fbd895e83cb92b462782b73954b4294d46428b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 24 Apr 2008 22:45:28 +0200 Subject: Compile endpoint mapper pidl output (This used to be commit fe8f9e427af3eb42d63fde96c4fe20a255facb95) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index ce0c932981..4d1b1a77d1 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -35,6 +35,7 @@ #include "librpc/gen_ndr/cli_netlogon.h" #include "librpc/gen_ndr/cli_dssetup.h" #include "librpc/gen_ndr/cli_ntsvcs.h" +#include "librpc/gen_ndr/cli_epmapper.h" #define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) -- cgit From 6b3bcb3724eed0ddff26dd7af638b606502081ad Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 23 May 2008 23:56:21 +0200 Subject: drsuapi: add all code required for our drsuapi rpc client. Guenther (This used to be commit 7c93190843e77764be4d0f6d4f0b93061c192c98) --- source3/include/rpc_client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 4d1b1a77d1..466370ef7a 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -36,6 +36,7 @@ #include "librpc/gen_ndr/cli_dssetup.h" #include "librpc/gen_ndr/cli_ntsvcs.h" #include "librpc/gen_ndr/cli_epmapper.h" +#include "librpc/gen_ndr/cli_drsuapi.h" #define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) -- cgit From 86bb7464066ff3743eb19e874ef7dfe86dd1fcb4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 21 Jul 2008 12:50:32 +0200 Subject: Refactoring: CLI_DO_RPC_* uses interface instead of pipe_idx (This used to be commit 6d2209ba5da0937ce17e71951a1628ff1f5deacb) --- source3/include/rpc_client.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index 466370ef7a..d1af6f958d 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -42,10 +42,10 @@ /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -#define CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ +#define CLI_DO_RPC_INTERNAL( pcli, ctx, interface, opnum, q_in, r_out, \ q_ps, r_ps, q_io_fn, r_io_fn, default_error, copy_sess_key ) \ {\ - SMB_ASSERT(pcli->pipe_idx == p_idx); \ + SMB_ASSERT(ndr_syntax_id_equal(&pcli->abstract_syntax, interface)); \ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return NT_STATUS_NO_MEMORY;\ }\ @@ -90,10 +90,10 @@ /* Arrrgg. Same but with WERRORS. Needed for registry code. */ -#define CLI_DO_RPC_WERR( pcli, ctx, p_idx, opnum, q_in, r_out, \ +#define CLI_DO_RPC_WERR( pcli, ctx, interface, opnum, q_in, r_out, \ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ {\ - SMB_ASSERT(rpccli_is_pipe_idx(pcli, p_idx)); \ + SMB_ASSERT(ndr_syntax_id_equal(&pcli->abstract_syntax, interface)); \ if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return WERR_NOMEM;\ }\ -- cgit From c97880e979d49e0afca8ad0d2e2362e24ca0cfde Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 2 Sep 2008 09:44:39 +0200 Subject: Remove unused CLI_DO_RPC macros (This used to be commit f5212c64d23a28fa40a14b45a8d1c0181f01a6da) --- source3/include/rpc_client.h | 48 -------------------------------------------- 1 file changed, 48 deletions(-) (limited to 'source3/include/rpc_client.h') diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h index d1af6f958d..684044b871 100644 --- a/source3/include/rpc_client.h +++ b/source3/include/rpc_client.h @@ -42,54 +42,6 @@ /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ -#define CLI_DO_RPC_INTERNAL( pcli, ctx, interface, opnum, q_in, r_out, \ - q_ps, r_ps, q_io_fn, r_io_fn, default_error, copy_sess_key ) \ -{\ - SMB_ASSERT(ndr_syntax_id_equal(&pcli->abstract_syntax, interface)); \ - if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ - return NT_STATUS_NO_MEMORY;\ - }\ - prs_init_empty( &r_ps, ctx, UNMARSHALL );\ - if ( copy_sess_key) prs_set_session_key(&q_ps, (const char *)pcli->dc->sess_key);\ - if ( q_io_fn("", &q_in, &q_ps, 0) ) {\ - NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \ - if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ - prs_mem_free( &q_ps );\ - prs_mem_free( &r_ps );\ - return _smb_pipe_stat_;\ - }\ - if ( copy_sess_key ) prs_set_session_key(&r_ps, (const char *)pcli->dc->sess_key);\ - if (!r_io_fn("", &r_out, &r_ps, 0)) {\ - prs_mem_free( &q_ps );\ - prs_mem_free( &r_ps );\ - return default_error;\ - }\ - } else {\ - prs_mem_free( &q_ps );\ - prs_mem_free( &r_ps );\ - return default_error;\ - }\ - prs_mem_free( &q_ps );\ - prs_mem_free( &r_ps );\ -} - -#define CLI_DO_RPC_COPY_SESS_KEY( pcli, ctx, p_idx, opnum, q_in, r_out, \ - q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ -{\ - CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ - q_ps, r_ps, q_io_fn, r_io_fn, default_error, True ); \ -} - -#define CLI_DO_RPC( pcli, ctx, p_idx, opnum, q_in, r_out, \ - q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ -{\ - CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ - q_ps, r_ps, q_io_fn, r_io_fn, default_error, False ); \ -} - - -/* Arrrgg. Same but with WERRORS. Needed for registry code. */ - #define CLI_DO_RPC_WERR( pcli, ctx, interface, opnum, q_in, r_out, \ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \ {\ -- cgit