[SCM] Samba Shared Repository - branch v3-4-test updated -
release-4-0-0alpha7-690-g142c88e
Günther Deschner
gd at samba.org
Wed Apr 8 12:45:13 GMT 2009
The branch, v3-4-test has been updated
via 142c88e51f14d547a96d6e018ba395da4f2017be (commit)
via a8f99c883a90b1884eda614049b03e0607d427fb (commit)
via b43c0aad591f56480e32f5920dc0a4cd50f43bb8 (commit)
from 367fb7b7d28bcdd392ca60806a5f15b4ef260193 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test
- Log -----------------------------------------------------------------
commit 142c88e51f14d547a96d6e018ba395da4f2017be
Author: Günther Deschner <gd at samba.org>
Date: Wed Apr 8 14:37:40 2009 +0200
s3-rpc-server: remove unused rpc_server/srv_util.c file.
Guenther
(cherry picked from commit 5654f141a2067692992d3a83aa3b16fa59b6bab9)
commit a8f99c883a90b1884eda614049b03e0607d427fb
Author: Günther Deschner <gd at samba.org>
Date: Thu Mar 19 23:38:00 2009 +0100
s3-selftest: As Samba3 now passes RPC-SPOOLSS-WIN enable it against ourself.
Guenther
(cherry picked from commit c1b354531faaef43d632f6a77c5eb04d39461069)
commit b43c0aad591f56480e32f5920dc0a4cd50f43bb8
Author: Günther Deschner <gd at samba.org>
Date: Wed Apr 8 13:49:14 2009 +0200
s4-smbtorture: Small fix for RPC-SPOOLSS-WIN to deal with driver-less printers.
The getdriver query failure should only be critical when there is actually a
driver associated to a printer.
Guenther
(cherry picked from commit 1f6646e1351b00c55498fcfb809e9762f4d67c22)
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_server/srv_util.c | 88 ---------------------------------
source3/script/tests/test_posix_s3.sh | 2 +-
source4/torture/rpc/spoolss_win.c | 18 ++++++-
3 files changed, 16 insertions(+), 92 deletions(-)
delete mode 100644 source3/rpc_server/srv_util.c
Changeset truncated at 500 lines:
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
deleted file mode 100644
index b276e75..0000000
--- a/source3/rpc_server/srv_util.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Unix SMB/CIFS implementation.
- * RPC Pipe client / server routines
- * Copyright (C) Andrew Tridgell 1992-1998
- * Copyright (C) Luke Kenneth Casson Leighton 1996-1998,
- * Copyright (C) Paul Ashton 1997-1998,
- * Copyright (C) Andrew Bartlett 2004.
- *
- * 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 3 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, see <http://www.gnu.org/licenses/>.
- */
-
-/* this module apparently provides an implementation of DCE/RPC over a
- * named pipe (IPC$ connection using SMBtrans). details of DCE/RPC
- * documentation are available (in on-line form) from the X-Open group.
- *
- * this module should provide a level of abstraction between SMB
- * and DCE/RPC, while minimising the amount of mallocs, unnecessary
- * data copies, and network traffic.
- *
- * in this version, which takes a "let's learn what's going on and
- * get something running" approach, there is additional network
- * traffic generated, but the code should be easier to understand...
- *
- * ... if you read the docs. or stare at packets for weeks on end.
- *
- */
-
-#include "includes.h"
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_RPC_SRV
-
-#if 0 /* these aren't used currently but are here if you need them */
-
-typedef struct {
- uint32 rid;
- const char *name;
-} rid_name;
-
-/*
- * A list of the rids of well known BUILTIN and Domain users
- * and groups.
- */
-
-static const rid_name builtin_alias_rids[] =
-{
- { BUILTIN_ALIAS_RID_ADMINS , "Administrators" },
- { BUILTIN_ALIAS_RID_USERS , "Users" },
- { BUILTIN_ALIAS_RID_GUESTS , "Guests" },
- { BUILTIN_ALIAS_RID_POWER_USERS , "Power Users" },
-
- { BUILTIN_ALIAS_RID_ACCOUNT_OPS , "Account Operators" },
- { BUILTIN_ALIAS_RID_SYSTEM_OPS , "System Operators" },
- { BUILTIN_ALIAS_RID_PRINT_OPS , "Print Operators" },
- { BUILTIN_ALIAS_RID_BACKUP_OPS , "Backup Operators" },
- { BUILTIN_ALIAS_RID_REPLICATOR , "Replicator" },
- { 0 , NULL }
-};
-
-/* array lookup of well-known Domain RID users. */
-static const rid_name domain_user_rids[] =
-{
- { DOMAIN_USER_RID_ADMIN , "Administrator" },
- { DOMAIN_USER_RID_GUEST , "Guest" },
- { 0 , NULL }
-};
-
-/* array lookup of well-known Domain RID groups. */
-static const rid_name domain_group_rids[] =
-{
- { DOMAIN_GROUP_RID_ADMINS , "Domain Admins" },
- { DOMAIN_GROUP_RID_USERS , "Domain Users" },
- { DOMAIN_GROUP_RID_GUESTS , "Domain Guests" },
- { 0 , NULL }
-};
-#endif
-
diff --git a/source3/script/tests/test_posix_s3.sh b/source3/script/tests/test_posix_s3.sh
index 2832d1d..18e8ef7 100755
--- a/source3/script/tests/test_posix_s3.sh
+++ b/source3/script/tests/test_posix_s3.sh
@@ -40,7 +40,7 @@ raw="$raw RAW-SAMBA3ROOTDIRFID"
rpc="RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC"
rpc="$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC"
rpc="$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME"
-rpc="$rpc RPC-SVCCTL"
+rpc="$rpc RPC-SVCCTL RPC-SPOOLSS-WIN"
# NOTE: to enable the UNIX-WHOAMI test, we need to change the default share
# config to allow guest access. I'm not sure whether this would break other
diff --git a/source4/torture/rpc/spoolss_win.c b/source4/torture/rpc/spoolss_win.c
index c50cbfb..42b6929 100644
--- a/source4/torture/rpc/spoolss_win.c
+++ b/source4/torture/rpc/spoolss_win.c
@@ -34,6 +34,8 @@ struct test_spoolss_win_context {
/* EnumPrinterKeys */
const char **printer_keys;
+
+ bool printer_has_driver;
};
/* This is a convenience function for all OpenPrinterEx calls */
@@ -256,6 +258,12 @@ static bool test_GetPrinter(struct torture_context *tctx,
torture_assert_werr_ok(tctx, gp.out.result, "GetPrinter failed");
ctx->current_info = gp.out.info;
+
+ if (level == 2 && gp.out.info) {
+ ctx->printer_has_driver = gp.out.info->info2.drivername &&
+ strlen(gp.out.info->info2.drivername);
+ }
+
return true;
}
@@ -289,6 +297,7 @@ static bool test_EnumJobs(struct torture_context *tctx,
static bool test_GetPrinterDriver2(struct torture_context *tctx,
struct dcerpc_pipe *p,
+ struct test_spoolss_win_context *ctx,
struct policy_handle *handle)
{
NTSTATUS status;
@@ -313,8 +322,11 @@ static bool test_GetPrinterDriver2(struct torture_context *tctx,
status = dcerpc_spoolss_GetPrinterDriver2(p, tctx, &gpd2);
torture_assert_ntstatus_ok(tctx, status, "GetPrinterDriver2 failed");
- torture_assert_werr_ok(tctx, gpd2.out.result,
- "GetPrinterDriver2 failed.");
+
+ if (ctx->printer_has_driver) {
+ torture_assert_werr_ok(tctx, gpd2.out.result,
+ "GetPrinterDriver2 failed.");
+ }
return true;
}
@@ -527,7 +539,7 @@ static bool test_WinXP(struct torture_context *tctx, struct dcerpc_pipe *p)
ret &= test_ClosePrinter(tctx, p, &handle04);
ret &= test_EnumPrinters(tctx, p, ctx, 1556);
- ret &= test_GetPrinterDriver2(tctx, p, &handle03);
+ ret &= test_GetPrinterDriver2(tctx, p, ctx, &handle03);
ret &= test_EnumForms(tctx, p, &handle03, 0);
ret &= test_EnumPrinterKey(tctx, p, &handle03, "", ctx);
--
Samba Shared Repository
More information about the samba-cvs
mailing list