[SCM] Samba Shared Repository - branch v3-6-test updated
Günther Deschner
gd at samba.org
Thu Sep 30 12:10:31 MDT 2010
The branch, v3-6-test has been updated
via 2c029ea s3-spoolss: make sure to exit early and with the appropriate error code in _spoolss_GetPrinterDriver2.
via 742fe0a spoolss: use the correct flags for spoolss_PrinterInfo1 struct.
via 1dcc97d s3-printing: remove unused old structs.
via 84e6075 samr: add three new ACB flags to IDL.
via f3f9dfe s3-spoolss: Fix _spoolss_EnumPrintProcDataTypes error handling (cherry picked from commit 77d4c280323ffc9f5f5f17023c90d0a904e14126)
via 02b14b6 s3-spoolss: Fix _spoolss_EnumPrintProcessors error handling (cherry picked from commit 2921888a0808efbe765e3f52a83a91c2e03a44a6)
from 12f6df2 s4-smbtorture: add new EnumPrinters test to test printername/servername behaviour in EnumPrinter and GetPrinter calls.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 2c029eab80639452cab578db7a184d3958ed8125
Author: Günther Deschner <gd at samba.org>
Date: Thu Sep 30 02:28:41 2010 +0200
s3-spoolss: make sure to exit early and with the appropriate error code in
_spoolss_GetPrinterDriver2.
Guenther
(cherry picked from commit c82d6c0b96817129ab6fa23ef8f5d421fd6c7001)
commit 742fe0ae92562740d088759694c347942dc6fe2e
Author: Günther Deschner <gd at samba.org>
Date: Thu Sep 30 02:05:36 2010 +0200
spoolss: use the correct flags for spoolss_PrinterInfo1 struct.
Guenther
(cherry picked from commit 575ae3ed728974236512b029f8217d99c6fc8526)
commit 1dcc97d3cad95f58c9458ffaa2d46438711944aa
Author: Günther Deschner <gd at samba.org>
Date: Tue Sep 28 05:39:42 2010 +0200
s3-printing: remove unused old structs.
Guenther
(cherry picked from commit 314d738f907958a86e2638689f5c45f3b931047e)
commit 84e6075f97c21f9561850eb37b1c863dedf6f69d
Author: Günther Deschner <gd at samba.org>
Date: Tue Sep 28 01:10:57 2010 +0200
samr: add three new ACB flags to IDL.
Guenther
(cherry picked from commit 48adfb264f0a8772ac04fc51af1c39460c011acb)
commit f3f9dfef45917bd6df39d58475c3a28a59a75640
Author: Günther Deschner <gd at samba.org>
Date: Tue Sep 28 00:10:54 2010 +0200
s3-spoolss: Fix _spoolss_EnumPrintProcDataTypes error handling
(cherry picked from commit 77d4c280323ffc9f5f5f17023c90d0a904e14126)
commit 02b14b60e8842e00c9ed79fb9cb4055e95ecd6d8
Author: Günther Deschner <gd at samba.org>
Date: Tue Sep 28 00:10:17 2010 +0200
s3-spoolss: Fix _spoolss_EnumPrintProcessors error handling
(cherry picked from commit 2921888a0808efbe765e3f52a83a91c2e03a44a6)
-----------------------------------------------------------------------
Summary of changes:
librpc/idl/samr.idl | 5 ++-
librpc/idl/spoolss.idl | 2 +-
source3/include/nt_printing.h | 60 -----------------------------------
source3/rpc_server/srv_spoolss_nt.c | 13 +++++++
4 files changed, 18 insertions(+), 62 deletions(-)
Changeset truncated at 500 lines:
diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl
index d977ddd..f54d626 100644
--- a/librpc/idl/samr.idl
+++ b/librpc/idl/samr.idl
@@ -44,7 +44,10 @@ import "misc.idl", "lsa.idl", "security.idl";
ACB_USE_DES_KEY_ONLY = 0x00008000, /* 1 = Use DES key only */
ACB_DONT_REQUIRE_PREAUTH = 0x00010000, /* 1 = Preauth not required */
ACB_PW_EXPIRED = 0x00020000, /* 1 = Password Expired */
- ACB_NO_AUTH_DATA_REQD = 0x00080000 /* 1 = No authorization data required */
+ ACB_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION = 0x00040000,
+ ACB_NO_AUTH_DATA_REQD = 0x00080000, /* 1 = No authorization data required */
+ ACB_PARTIAL_SECRETS_ACCOUNT = 0x00100000,
+ ACB_USE_AES_KEYS = 0x00200000
} samr_AcctFlags;
/* SAM server specific access rights */
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index f1b8e96..a957a54 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -766,7 +766,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
} spoolss_PrinterAttributes;
typedef [public,gensize] struct {
- spoolss_PrinterAttributes flags;
+ spoolss_EnumPrinterFlags flags;
[relative] nstring *description;
[relative] nstring *name;
[relative] nstring *comment;
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 199236b..74b059f 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -25,66 +25,6 @@
#include "client.h"
#include "../librpc/gen_ndr/srv_spoolss.h"
-/* container for a single registry key */
-
-typedef struct {
- char *name;
- struct regval_ctr *values;
-} NT_PRINTER_KEY;
-
-/* container for all printer data */
-
-typedef struct {
- int num_keys;
- NT_PRINTER_KEY *keys;
-} NT_PRINTER_DATA;
-
-typedef struct nt_printer_info_level_2
-{
- uint32 attributes;
- uint32 priority;
- uint32 default_priority;
- uint32 starttime;
- uint32 untiltime;
- uint32 status;
- uint32 cjobs;
- uint32 averageppm;
- fstring servername;
- fstring printername;
- fstring sharename;
- fstring portname;
- fstring drivername;
- char comment[1024];
- fstring location;
- struct spoolss_DeviceMode *devmode;
- fstring sepfile;
- fstring printprocessor;
- fstring datatype;
- fstring parameters;
- NT_PRINTER_DATA *data;
- struct sec_desc_buf *secdesc_buf;
- uint32 changeid;
- uint32 c_setprinter;
- uint32 setuptime;
-} NT_PRINTER_INFO_LEVEL_2;
-
-typedef struct nt_printer_info_level
-{
- NT_PRINTER_INFO_LEVEL_2 *info_2;
-} NT_PRINTER_INFO_LEVEL;
-
-typedef struct
-{
- fstring name;
- uint32 flag;
- uint32 width;
- uint32 length;
- uint32 left;
- uint32 top;
- uint32 right;
- uint32 bottom;
-} nt_forms_struct;
-
#ifndef SAMBA_PRINTER_PORT_NAME
#define SAMBA_PRINTER_PORT_NAME "Samba Printer Port"
#endif
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 4837bb8..a44753a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5001,6 +5001,10 @@ static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx,
struct spoolss_DriverInfo8 *driver;
WERROR result;
+ if (level == 101) {
+ return WERR_UNKNOWN_LEVEL;
+ }
+
result = winreg_get_printer(mem_ctx,
server_info,
servername,
@@ -8130,6 +8134,10 @@ WERROR _spoolss_EnumPrintProcessors(struct pipes_struct *p,
*r->out.needed = 0;
*r->out.info = NULL;
+ if (!get_short_archi(r->in.environment)) {
+ return WERR_INVALID_ENVIRONMENT;
+ }
+
switch (r->in.level) {
case 1:
result = enumprintprocessors_level_1(p->mem_ctx, r->out.info,
@@ -8221,6 +8229,11 @@ WERROR _spoolss_EnumPrintProcDataTypes(struct pipes_struct *p,
*r->out.needed = 0;
*r->out.info = NULL;
+ if (r->in.print_processor_name == NULL ||
+ !strequal(r->in.print_processor_name, "winprint")) {
+ return WERR_UNKNOWN_PRINTPROCESSOR;
+ }
+
switch (r->in.level) {
case 1:
result = enumprintprocdatatypes_level_1(p->mem_ctx, r->out.info,
--
Samba Shared Repository
More information about the samba-cvs
mailing list