From 065561932c660be13f80fefa2a310a51b0c07f9c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 11 Apr 2003 04:09:14 +0000 Subject: A new RPC pipe! The \pipe\echo named pipe is for testing large RPC requests and responses and is only compiled in when --enable-developer is passed to configure. It includes server and client side code for generating and responding to functions on this pipe. The functions are: - AddOne: add one to the uint32 argument and return ig - EchoData: echo back a variable sized char array to the caller - SourceData: request a variable sized char array - SinkData: send a variable sized char array and throw it away There's a win32 implementation of the client and server in the junkcode CVS repository in the rpcecho-win32 subdirectory. (This used to be commit 4ccd34ef836eba05f81dc2da73fd7cfaac201798) --- source3/rpc_server/srv_echo_nt.c | 78 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 source3/rpc_server/srv_echo_nt.c (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c new file mode 100644 index 0000000000..ddb76b3a21 --- /dev/null +++ b/source3/rpc_server/srv_echo_nt.c @@ -0,0 +1,78 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines for rpcecho + * Copyright (C) Tim Potter 2003. + * + * 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. + */ + +/* This is the interface to the rpcecho pipe. */ + +#include "includes.h" +#include "nterr.h" + +#ifdef DEVELOPER + +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_SRV + +/* Add one to the input and return it */ + +void _echo_add_one(pipes_struct *p, ECHO_Q_ADD_ONE *q_u, ECHO_R_ADD_ONE *r_u) +{ + DEBUG(10, ("_echo_add_one\n")); + + r_u->response = q_u->request + 1; +} + +/* Echo back an array of data */ + +void _echo_data(pipes_struct *p, ECHO_Q_ECHO_DATA *q_u, + ECHO_R_ECHO_DATA *r_u) +{ + DEBUG(10, ("_echo_data\n")); + + r_u->data = talloc(p->mem_ctx, q_u->size); + r_u->size = q_u->size; + memcpy(r_u->data, q_u->data, q_u->size); +} + +/* Sink an array of data */ + +void _sink_data(pipes_struct *p, ECHO_Q_SINK_DATA *q_u, + ECHO_R_SINK_DATA *r_u) +{ + DEBUG(10, ("_sink_data\n")); + + /* My that was some yummy data! */ +} + +/* Source an array of data */ + +void _source_data(pipes_struct *p, ECHO_Q_SOURCE_DATA *q_u, + ECHO_R_SOURCE_DATA *r_u) +{ + uint32 i; + + DEBUG(10, ("_source_data\n")); + + r_u->data = talloc(p->mem_ctx, q_u->size); + r_u->size = q_u->size; + + for (i = 0; i < r_u->size; i++) + r_u->data[i] = i & 0xff; +} + +#endif /* DEVELOPER */ -- cgit From acf9d61421faa6c0055d57fdee7db300dc5431aa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 7 Dec 2004 18:25:53 +0000 Subject: r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a) --- source3/rpc_server/srv_echo_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index ddb76b3a21..86fcce28c7 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -44,7 +44,7 @@ void _echo_data(pipes_struct *p, ECHO_Q_ECHO_DATA *q_u, { DEBUG(10, ("_echo_data\n")); - r_u->data = talloc(p->mem_ctx, q_u->size); + r_u->data = TALLOC(p->mem_ctx, q_u->size); r_u->size = q_u->size; memcpy(r_u->data, q_u->data, q_u->size); } @@ -68,7 +68,7 @@ void _source_data(pipes_struct *p, ECHO_Q_SOURCE_DATA *q_u, DEBUG(10, ("_source_data\n")); - r_u->data = talloc(p->mem_ctx, q_u->size); + r_u->data = TALLOC(p->mem_ctx, q_u->size); r_u->size = q_u->size; for (i = 0; i < r_u->size; i++) -- cgit From 430fa0eba08cbf180d83740a895a0018af1c7f21 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 31 Jul 2006 21:40:25 +0000 Subject: r17348: Some C++ warnings (This used to be commit ae6b9b34e59167e3958bfdb9997fa25340b9a0a3) --- source3/rpc_server/srv_echo_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 86fcce28c7..c861c74cc6 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -44,7 +44,7 @@ void _echo_data(pipes_struct *p, ECHO_Q_ECHO_DATA *q_u, { DEBUG(10, ("_echo_data\n")); - r_u->data = TALLOC(p->mem_ctx, q_u->size); + r_u->data = (char *)TALLOC(p->mem_ctx, q_u->size); r_u->size = q_u->size; memcpy(r_u->data, q_u->data, q_u->size); } @@ -68,7 +68,7 @@ void _source_data(pipes_struct *p, ECHO_Q_SOURCE_DATA *q_u, DEBUG(10, ("_source_data\n")); - r_u->data = TALLOC(p->mem_ctx, q_u->size); + r_u->data = (char *)TALLOC(p->mem_ctx, q_u->size); r_u->size = q_u->size; for (i = 0; i < r_u->size; i++) -- 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/rpc_server/srv_echo_nt.c | 86 +++++++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 15 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index c861c74cc6..221f4bc8b2 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -30,29 +30,25 @@ /* Add one to the input and return it */ -void _echo_add_one(pipes_struct *p, ECHO_Q_ADD_ONE *q_u, ECHO_R_ADD_ONE *r_u) +void _echo_AddOne(pipes_struct *p, uint32_t in_data, uint32_t *out_data) { DEBUG(10, ("_echo_add_one\n")); - r_u->response = q_u->request + 1; + *out_data = in_data + 1; } /* Echo back an array of data */ -void _echo_data(pipes_struct *p, ECHO_Q_ECHO_DATA *q_u, - ECHO_R_ECHO_DATA *r_u) +void _echo_EchoData(pipes_struct *p, uint32_t len, uint8_t *in_data, uint8_t *out_data) { DEBUG(10, ("_echo_data\n")); - r_u->data = (char *)TALLOC(p->mem_ctx, q_u->size); - r_u->size = q_u->size; - memcpy(r_u->data, q_u->data, q_u->size); + memcpy(out_data, in_data, len); } /* Sink an array of data */ -void _sink_data(pipes_struct *p, ECHO_Q_SINK_DATA *q_u, - ECHO_R_SINK_DATA *r_u) +void _echo_SinkData(pipes_struct *p, uint32_t len, uint8_t *data) { DEBUG(10, ("_sink_data\n")); @@ -61,18 +57,78 @@ void _sink_data(pipes_struct *p, ECHO_Q_SINK_DATA *q_u, /* Source an array of data */ -void _source_data(pipes_struct *p, ECHO_Q_SOURCE_DATA *q_u, - ECHO_R_SOURCE_DATA *r_u) +void _echo_SourceData(pipes_struct *p, uint32_t len, uint8_t *data) { uint32 i; DEBUG(10, ("_source_data\n")); - r_u->data = (char *)TALLOC(p->mem_ctx, q_u->size); - r_u->size = q_u->size; + for (i = 0; i < len; i++) + data[i] = i & 0xff; +} - for (i = 0; i < r_u->size; i++) - r_u->data[i] = i & 0xff; +void _echo_TestCall(pipes_struct *p, const char *s1, const char **s2) +{ + *s2 = talloc_strdup(p->mem_ctx, s1); +} + +NTSTATUS _echo_TestCall2(pipes_struct *p, uint16_t level, union echo_Info *info) +{ + switch (level) { + case 1: + info->info1.v = 10; + break; + case 2: + info->info2.v = 20; + break; + case 3: + info->info3.v = 30; + break; + case 4: + info->info4.v = 40; + break; + case 5: + info->info5.v1 = 50; + info->info5.v2 = 60; + break; + case 6: + info->info6.v1 = 70; + info->info6.info1.v= 80; + break; + case 7: + info->info7.v1 = 80; + info->info7.info4.v = 90; + break; + default: + return NT_STATUS_INVALID_LEVEL; + } + + return NT_STATUS_OK; +} + +uint32 _echo_TestSleep(pipes_struct *p, uint32_t seconds) +{ + sleep(seconds); + return seconds; +} + +void _echo_TestEnum(pipes_struct *p, enum echo_Enum1 *foo1, struct echo_Enum2 *foo2, union echo_Enum3 *foo3) +{ +} + +void _echo_TestSurrounding(pipes_struct *p, struct echo_Surrounding *data) +{ + data->x *= 2; + data->surrounding = talloc_zero_array(p->mem_ctx, uint16_t, data->x); +} + +uint16 _echo_TestDoublePointer(pipes_struct *p, uint16_t ***data) +{ + if (!*data) + return 0; + if (!**data) + return 0; + return ***data; } #endif /* DEVELOPER */ -- 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/rpc_server/srv_echo_nt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 221f4bc8b2..b6c5442e03 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -2,6 +2,7 @@ * Unix SMB/CIFS implementation. * RPC Pipe client / server routines for rpcecho * Copyright (C) Tim Potter 2003. + * Copyright (C) Jelmer Vernooij 2006. * * 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 -- cgit From d6b3fce078869de35334c0805ff141dc8bcf5f65 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 18 Jan 2007 10:18:59 +0000 Subject: r20875: Pass DCE/RPC server call arguments as a struct rather than as separate arguments. This makes it a bit more similar to the Samba4 code. (This used to be commit 0596badb410a58e7a715e2b17bc0bef0489a2448) --- source3/rpc_server/srv_echo_nt.c | 66 ++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index b6c5442e03..eb095f6bfe 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -31,25 +31,25 @@ /* Add one to the input and return it */ -void _echo_AddOne(pipes_struct *p, uint32_t in_data, uint32_t *out_data) +void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r) { DEBUG(10, ("_echo_add_one\n")); - *out_data = in_data + 1; + *r->out.out_data = r->in.in_data + 1; } /* Echo back an array of data */ -void _echo_EchoData(pipes_struct *p, uint32_t len, uint8_t *in_data, uint8_t *out_data) +void _echo_EchoData(pipes_struct *p, struct echo_EchoData *r) { DEBUG(10, ("_echo_data\n")); - memcpy(out_data, in_data, len); + memcpy(r->out.out_data, r->in.in_data, r->in.len); } /* Sink an array of data */ -void _echo_SinkData(pipes_struct *p, uint32_t len, uint8_t *data) +void _echo_SinkData(pipes_struct *p, struct echo_SinkData *r) { DEBUG(10, ("_sink_data\n")); @@ -58,47 +58,47 @@ void _echo_SinkData(pipes_struct *p, uint32_t len, uint8_t *data) /* Source an array of data */ -void _echo_SourceData(pipes_struct *p, uint32_t len, uint8_t *data) +void _echo_SourceData(pipes_struct *p, struct echo_SourceData *r) { uint32 i; DEBUG(10, ("_source_data\n")); - for (i = 0; i < len; i++) - data[i] = i & 0xff; + for (i = 0; i < r->in.len; i++) + r->out.data[i] = i & 0xff; } -void _echo_TestCall(pipes_struct *p, const char *s1, const char **s2) +void _echo_TestCall(pipes_struct *p, struct echo_TestCall *r) { - *s2 = talloc_strdup(p->mem_ctx, s1); + *r->out.s2 = talloc_strdup(p->mem_ctx, r->in.s1); } -NTSTATUS _echo_TestCall2(pipes_struct *p, uint16_t level, union echo_Info *info) +NTSTATUS _echo_TestCall2(pipes_struct *p, struct echo_TestCall2 *r) { - switch (level) { + switch (r->in.level) { case 1: - info->info1.v = 10; + r->out.info->info1.v = 10; break; case 2: - info->info2.v = 20; + r->out.info->info2.v = 20; break; case 3: - info->info3.v = 30; + r->out.info->info3.v = 30; break; case 4: - info->info4.v = 40; + r->out.info->info4.v = 40; break; case 5: - info->info5.v1 = 50; - info->info5.v2 = 60; + r->out.info->info5.v1 = 50; + r->out.info->info5.v2 = 60; break; case 6: - info->info6.v1 = 70; - info->info6.info1.v= 80; + r->out.info->info6.v1 = 70; + r->out.info->info6.info1.v= 80; break; case 7: - info->info7.v1 = 80; - info->info7.info4.v = 90; + r->out.info->info7.v1 = 80; + r->out.info->info7.info4.v = 90; break; default: return NT_STATUS_INVALID_LEVEL; @@ -107,29 +107,29 @@ NTSTATUS _echo_TestCall2(pipes_struct *p, uint16_t level, union echo_Info *info) return NT_STATUS_OK; } -uint32 _echo_TestSleep(pipes_struct *p, uint32_t seconds) +uint32 _echo_TestSleep(pipes_struct *p, struct echo_TestSleep *r) { - sleep(seconds); - return seconds; + sleep(r->in.seconds); + return r->in.seconds; } -void _echo_TestEnum(pipes_struct *p, enum echo_Enum1 *foo1, struct echo_Enum2 *foo2, union echo_Enum3 *foo3) +void _echo_TestEnum(pipes_struct *p, struct echo_TestEnum *r) { } -void _echo_TestSurrounding(pipes_struct *p, struct echo_Surrounding *data) +void _echo_TestSurrounding(pipes_struct *p, struct echo_TestSurrounding *r) { - data->x *= 2; - data->surrounding = talloc_zero_array(p->mem_ctx, uint16_t, data->x); + r->out.data->x *= 2; + r->out.data->surrounding = talloc_zero_array(p->mem_ctx, uint16_t, r->in.data->x); } -uint16 _echo_TestDoublePointer(pipes_struct *p, uint16_t ***data) +uint16 _echo_TestDoublePointer(pipes_struct *p, struct echo_TestDoublePointer *r) { - if (!*data) + if (!*r->in.data) return 0; - if (!**data) + if (!**r->in.data) return 0; - return ***data; + return ***r->in.data; } #endif /* DEVELOPER */ -- cgit From 12ba88574bf91bdcc4447bfc3d429b799064bfd9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 27 Apr 2007 23:18:41 +0000 Subject: r22542: Move over to using the _strict varients of the talloc calls. No functional changes. Looks bigger than it is :-). Jeremy. (This used to be commit f6fa3080fee1b20df9f1968500840a88cf0ee592) --- source3/rpc_server/srv_echo_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index eb095f6bfe..58ab51e2b0 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -120,7 +120,7 @@ void _echo_TestEnum(pipes_struct *p, struct echo_TestEnum *r) void _echo_TestSurrounding(pipes_struct *p, struct echo_TestSurrounding *r) { r->out.data->x *= 2; - r->out.data->surrounding = talloc_zero_array(p->mem_ctx, uint16_t, r->in.data->x); + r->out.data->surrounding = TALLOC_ZERO_ARRAY(p->mem_ctx, uint16_t, r->in.data->x); } uint16 _echo_TestDoublePointer(pipes_struct *p, struct echo_TestDoublePointer *r) -- cgit From e6e577b845db9530aa95d696d9f4f7d31a2b4140 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 30 May 2007 21:43:48 +0000 Subject: r23248: Merge echo pipe implementation chanegs from SAMBA_3_0_26 just to stay in sink. This was more or less just for me to play with. (This used to be commit 6c4b85cce0f947771fd9aa93451c53adb1795e3f) --- source3/rpc_server/srv_echo_nt.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 58ab51e2b0..08d54ceba4 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -1,8 +1,9 @@ /* * Unix SMB/CIFS implementation. * RPC Pipe client / server routines for rpcecho - * Copyright (C) Tim Potter 2003. - * Copyright (C) Jelmer Vernooij 2006. + * Copyright (C) Tim Potter 2003 + * Copyright (C) Jelmer Vernooij 2006 + * Copyright (C) Gerald (Jerry) Carter 2007 * * 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 @@ -31,9 +32,9 @@ /* Add one to the input and return it */ -void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r) +void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r ) { - DEBUG(10, ("_echo_add_one\n")); + DEBUG(10, ("_echo_AddOne\n")); *r->out.out_data = r->in.in_data + 1; } @@ -42,18 +43,26 @@ void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r) void _echo_EchoData(pipes_struct *p, struct echo_EchoData *r) { - DEBUG(10, ("_echo_data\n")); + DEBUG(10, ("_echo_EchoData\n")); - memcpy(r->out.out_data, r->in.in_data, r->in.len); + if ( r->in.len == 0 ) { + r->out.out_data = NULL; + return; + } + + r->out.out_data = TALLOC(p->mem_ctx, r->in.len); + memcpy( r->out.out_data, r->in.in_data, r->in.len ); + return; } /* Sink an array of data */ void _echo_SinkData(pipes_struct *p, struct echo_SinkData *r) { - DEBUG(10, ("_sink_data\n")); + DEBUG(10, ("_echo_SinkData\n")); /* My that was some yummy data! */ + return; } /* Source an array of data */ @@ -62,10 +71,20 @@ void _echo_SourceData(pipes_struct *p, struct echo_SourceData *r) { uint32 i; - DEBUG(10, ("_source_data\n")); + DEBUG(10, ("_echo_SourceData\n")); + + if ( r->in.len == 0 ) { + r->out.data = NULL; + return; + } + + r->out.data = TALLOC(p->mem_ctx, r->in.len ); - for (i = 0; i < r->in.len; i++) + for (i = 0; i < r->in.len; i++ ) { r->out.data[i] = i & 0xff; + } + + return; } void _echo_TestCall(pipes_struct *p, struct echo_TestCall *r) -- cgit From 824b3f82acd09315a68cc7f66a6bbab4f50f6eb7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Jul 2007 22:28:04 +0000 Subject: r23709: C++ warnings (This used to be commit 2d5e3322d6ecd00c0e936ee64483e63a3ad87c0b) --- source3/rpc_server/srv_echo_nt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 08d54ceba4..426cd2fded 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -50,7 +50,7 @@ void _echo_EchoData(pipes_struct *p, struct echo_EchoData *r) return; } - r->out.out_data = TALLOC(p->mem_ctx, r->in.len); + r->out.out_data = TALLOC_ARRAY(p->mem_ctx, uint8, r->in.len); memcpy( r->out.out_data, r->in.in_data, r->in.len ); return; } @@ -78,7 +78,7 @@ void _echo_SourceData(pipes_struct *p, struct echo_SourceData *r) return; } - r->out.data = TALLOC(p->mem_ctx, r->in.len ); + r->out.data = TALLOC_ARRAY(p->mem_ctx, uint8, r->in.len ); for (i = 0; i < r->in.len; i++ ) { r->out.data[i] = i & 0xff; -- 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/rpc_server/srv_echo_nt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 426cd2fded..155fe14516 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -7,7 +7,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 153cfb9c83534b09f15cc16205d7adb19b394928 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 05:23:25 +0000 Subject: r23801: The FSF has moved around a lot. This fixes their Mass Ave address. (This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227) --- source3/rpc_server/srv_echo_nt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 155fe14516..58c59aa506 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -16,8 +16,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 . */ /* This is the interface to the rpcecho pipe. */ -- 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/rpc_server/srv_echo_nt.c | 52 ++++++++++------------------------------ 1 file changed, 12 insertions(+), 40 deletions(-) (limited to 'source3/rpc_server/srv_echo_nt.c') diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index 58c59aa506..1179a162b0 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -35,7 +35,7 @@ void _echo_AddOne(pipes_struct *p, struct echo_AddOne *r ) { DEBUG(10, ("_echo_AddOne\n")); - *r->out.out_data = r->in.in_data + 1; + *r->out.out_data = r->in.in_data + 1; } /* Echo back an array of data */ @@ -88,66 +88,38 @@ void _echo_SourceData(pipes_struct *p, struct echo_SourceData *r) void _echo_TestCall(pipes_struct *p, struct echo_TestCall *r) { - *r->out.s2 = talloc_strdup(p->mem_ctx, r->in.s1); + p->rng_fault_state = True; + return; } NTSTATUS _echo_TestCall2(pipes_struct *p, struct echo_TestCall2 *r) { - switch (r->in.level) { - case 1: - r->out.info->info1.v = 10; - break; - case 2: - r->out.info->info2.v = 20; - break; - case 3: - r->out.info->info3.v = 30; - break; - case 4: - r->out.info->info4.v = 40; - break; - case 5: - r->out.info->info5.v1 = 50; - r->out.info->info5.v2 = 60; - break; - case 6: - r->out.info->info6.v1 = 70; - r->out.info->info6.info1.v= 80; - break; - case 7: - r->out.info->info7.v1 = 80; - r->out.info->info7.info4.v = 90; - break; - default: - return NT_STATUS_INVALID_LEVEL; - } - + p->rng_fault_state = True; return NT_STATUS_OK; } uint32 _echo_TestSleep(pipes_struct *p, struct echo_TestSleep *r) { - sleep(r->in.seconds); - return r->in.seconds; + p->rng_fault_state = True; + return 0; } void _echo_TestEnum(pipes_struct *p, struct echo_TestEnum *r) { + p->rng_fault_state = True; + return; } void _echo_TestSurrounding(pipes_struct *p, struct echo_TestSurrounding *r) { - r->out.data->x *= 2; - r->out.data->surrounding = TALLOC_ZERO_ARRAY(p->mem_ctx, uint16_t, r->in.data->x); + p->rng_fault_state = True; + return; } uint16 _echo_TestDoublePointer(pipes_struct *p, struct echo_TestDoublePointer *r) { - if (!*r->in.data) - return 0; - if (!**r->in.data) - return 0; - return ***r->in.data; + p->rng_fault_state = True; + return 0; } #endif /* DEVELOPER */ -- cgit