From 713b296441ec8b1447a0bc451720a8b84fd7e1fc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 28 Jan 2006 20:08:03 +0000 Subject: r13210: Revert my named pipes patch until it passes not just 'make quicktest' but also 'make test' (This used to be commit e3d0676aee84e96e5c87bed4cd0cde75a4191953) --- source4/torture/config.mk | 11 ++-- source4/torture/ipc/np_echo.c | 119 ------------------------------------------ source4/torture/ipc/rap.c | 3 -- source4/torture/torture.c | 1 - 4 files changed, 5 insertions(+), 129 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/config.mk b/source4/torture/config.mk index 8d022cdce2..c7e8e2cc48 100644 --- a/source4/torture/config.mk +++ b/source4/torture/config.mk @@ -121,14 +121,13 @@ REQUIRED_SUBSYSTEMS = \ ################################# ################################# -# Start SUBSYSTEM TORTURE_IPC -[SUBSYSTEM::TORTURE_IPC] +# Start SUBSYSTEM TORTURE_RAP +[SUBSYSTEM::TORTURE_RAP] OBJ_FILES = \ - ipc/rap.o \ - ipc/np_echo.o + rap/rap.o REQUIRED_SUBSYSTEMS = \ LIBSMB -# End SUBSYSTEM TORTURE_IPC +# End SUBSYSTEM TORTURE_RAP ################################# ################################# @@ -211,7 +210,7 @@ REQUIRED_SUBSYSTEMS = \ TORTURE_RAW \ TORTURE_SMB2 \ TORTURE_RPC \ - TORTURE_IPC \ + TORTURE_RAP \ TORTURE_AUTH \ TORTURE_LOCAL \ TORTURE_NBENCH \ diff --git a/source4/torture/ipc/np_echo.c b/source4/torture/ipc/np_echo.c index 7d81d4fd37..e69de29bb2 100644 --- a/source4/torture/ipc/np_echo.c +++ b/source4/torture/ipc/np_echo.c @@ -1,119 +0,0 @@ -/* - Unix SMB/CIFS implementation. - Named Pipe Echo test - Copyright (C) Jelmer Vernooij 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 - 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. -*/ - -#include "includes.h" -#include "librpc/gen_ndr/security.h" -#include "smb.h" -#include "torture/torture.h" -#include "libcli/raw/libcliraw.h" -#include "libcli/libcli.h" - -#define ECHODATA "Good Times, Bad Times" - -int torture_np_echo(void) -{ - NTSTATUS status; - TALLOC_CTX *mem_ctx = NULL; - struct smbcli_state *cli; - const char *pipe_name = "\\NPECHO"; - union smb_open open; - union smb_read read; - union smb_write write; - union smb_close close; - int fnum; - BOOL ret; - - ret = torture_open_connection_share(mem_ctx, &cli, - lp_parm_string(-1, "torture", "host"), - "IPC$", - NULL); - if (!ret) - return False; - - open.ntcreatex.level = RAW_OPEN_NTCREATEX; - open.ntcreatex.in.flags = 0; - open.ntcreatex.in.root_fid = 0; - open.ntcreatex.in.access_mask = - SEC_STD_READ_CONTROL | - SEC_FILE_WRITE_ATTRIBUTE | - SEC_FILE_WRITE_EA | - SEC_FILE_READ_DATA | - SEC_FILE_WRITE_DATA; - open.ntcreatex.in.file_attr = 0; - open.ntcreatex.in.alloc_size = 0; - open.ntcreatex.in.share_access = - NTCREATEX_SHARE_ACCESS_READ | - NTCREATEX_SHARE_ACCESS_WRITE; - open.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; - open.ntcreatex.in.create_options = 0; - open.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_IMPERSONATION; - open.ntcreatex.in.security_flags = 0; - open.ntcreatex.in.fname = pipe_name; - - status = smb_raw_open(cli->tree, cli->tree, &open); - if (NT_STATUS_IS_ERR(status)) - return False; - - fnum = open.ntcreatex.out.fnum; - - write.write.level = RAW_WRITE_WRITE; - write.write.in.fnum = fnum; - write.write.in.count = strlen(ECHODATA); - write.write.in.offset = 0; - write.write.in.remaining = 0; - write.write.in.data = (const uint8_t *)ECHODATA; - - status = smb_raw_write(cli->tree, &write); - if (NT_STATUS_IS_ERR(status)) - return False; - - if (write.write.out.nwritten != strlen(ECHODATA)) - return False; - - read.read.level = RAW_READ_READ; - read.read.in.fnum = fnum; - read.read.in.count = strlen(ECHODATA); - read.read.in.offset = 0; - read.read.in.remaining = 0; - read.read.out.data = talloc_array(mem_ctx, uint8_t, strlen(ECHODATA)); - - status = smb_raw_read(cli->tree, &read); - - if (NT_STATUS_IS_ERR(status)) - return False; - - if (read.read.out.nread != strlen(ECHODATA)) - return False; - - if (memcmp(read.read.out.data, ECHODATA, strlen(ECHODATA)) != 0) { - printf ("np_echo: Returned data did not match!\n"); - return False; - } - - close.close.level = RAW_CLOSE_CLOSE; - close.close.in.fnum = fnum; - close.close.in.write_time = 0; - - status = smb_raw_close(cli->tree, &close); - if (NT_STATUS_IS_ERR(status)) - return False; - - return True; -} diff --git a/source4/torture/ipc/rap.c b/source4/torture/ipc/rap.c index 24cf1bb642..52fc100b23 100644 --- a/source4/torture/ipc/rap.c +++ b/source4/torture/ipc/rap.c @@ -21,9 +21,6 @@ #include "includes.h" #include "rap.h" -#include "libcli/raw/libcliraw.h" -#include "libcli/libcli.h" -#include "torture/torture.h" struct rap_call { uint16_t callno; diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 465c703dc8..a37fde6938 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -2246,7 +2246,6 @@ static struct { {"RAW-ACLS", torture_raw_acls, 0}, {"RAW-RAP", torture_raw_rap, 0}, {"RAW-COMPOSITE", torture_raw_composite, 0}, - {"RAW-PIPE-ECHO", torture_np_echo, 0 }, /* SMB2 tests */ {"SMB2-CONNECT", torture_smb2_connect, 0}, -- cgit