The branch, v3-6-test has been updated via 3064482... s4-smbtorture: remove another old and now invalid s3 special case during spoolss testing. via ad68e45... spoolss: fix potential crash bug in spoolss_PrinterEnumValues push path. via a48b47b... s3-spoolss: remove unused MAX_OPEN_PRINTER_EXS define. via 902e66e... s3-printing: remove unused get_local_printer_publishing_data() call. via 654f86e... s3-build: avoid to globally include printing and spoolss headers. via df552f2... s4-smbtorture: remove ifdefed symlink test, this is already skipped internally in the s3 case. via 9d0c7f9... Revert "s4-torture: Disable setting REG_BINARY printer data with size 0." from eccf498... s3: Use cups-config --libs
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log ----------------------------------------------------------------- commit 30644821c0fe426ab27c3d809f39f20f2b3dc724 Author: Günther Deschner <g...@samba.org> Date: Mon Aug 2 16:08:30 2010 +0200 s4-smbtorture: remove another old and now invalid s3 special case during spoolss testing. Guenther (cherry picked from commit 6463281f36edc796e51960d4b0c896af24e1b3c2) commit ad68e45b505331683a2510de20f113a7c20e68e1 Author: Günther Deschner <g...@samba.org> Date: Mon Aug 2 15:52:09 2010 +0200 spoolss: fix potential crash bug in spoolss_PrinterEnumValues push path. Guenther (cherry picked from commit 45952b56797982d27731b20d97f5648c9414814a) commit a48b47b46a7326dc51266822554cf28d089e5afe Author: Günther Deschner <g...@samba.org> Date: Mon Aug 2 15:31:10 2010 +0200 s3-spoolss: remove unused MAX_OPEN_PRINTER_EXS define. Guenther (cherry picked from commit ff1c5b37f619ed3373b65af72c026a36de4b94c9) commit 902e66e06d7067d95cd59db8039fd83331093212 Author: Günther Deschner <g...@samba.org> Date: Sat Jul 31 00:54:45 2010 +0200 s3-printing: remove unused get_local_printer_publishing_data() call. Guenther (cherry picked from commit 9e0000224a53f418eb4d2c87f1b8d8c47e348665) commit 654f86e7ce5c93b4eeba04b1de45687ed77c7880 Author: Günther Deschner <g...@samba.org> Date: Sat Jul 31 00:47:20 2010 +0200 s3-build: avoid to globally include printing and spoolss headers. This shrinks precompiled headers by 3MB and will slightly speed up any build. Guenther (cherry picked from commit 813fbbd68c50811ad3776140e409d31b60dba76f) commit df552f2f90d4370f07b377925dabfe1a4b90e6e9 Author: Günther Deschner <g...@samba.org> Date: Fri Jul 30 11:24:23 2010 +0200 s4-smbtorture: remove ifdefed symlink test, this is already skipped internally in the s3 case. Guenther (cherry picked from commit a6e1fa23adaa31579366ec3445949cbde0520ac5) commit 9d0c7f9dcb9a7a90912b1a42b112fa1c50278efc Author: Günther Deschner <g...@samba.org> Date: Fri Jul 30 11:23:06 2010 +0200 Revert "s4-torture: Disable setting REG_BINARY printer data with size 0." This reverts commit 104c419345a42a9a02ae25df482f449dc41a6380. (cherry picked from commit 89071133e34cd5264bfc55d77d4ee77dc3604a9f) ----------------------------------------------------------------------- Summary of changes: librpc/idl/spoolss.idl | 2 +- source3/include/includes.h | 1 - source3/include/proto.h | 4 ---- source3/include/registry.h | 2 ++ source3/include/smb.h | 1 - source3/libads/ldap_printer.c | 15 +-------------- source3/printing/notify.c | 2 ++ source3/printing/nt_printing.c | 3 ++- source3/printing/nt_printing_tdb.c | 2 +- source3/printing/printing.c | 2 ++ source3/registry/reg_backend_db.c | 1 + source3/rpc_client/init_spoolss.c | 2 +- source3/rpc_server/srv_spoolss_nt.c | 4 ---- source3/rpcclient/cmd_spoolss.c | 1 + source3/rpcclient/cmd_test.c | 1 + source3/smbd/reply.c | 1 + source3/smbd/server_reload.c | 1 + source3/utils/net_rpc_printer.c | 1 + source3/utils/smbcontrol.c | 2 ++ source4/torture/rpc/spoolss.c | 13 ------------- 20 files changed, 20 insertions(+), 41 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index 028015b..c61cba5 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -2855,7 +2855,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor") [value(2*strlen_m_term(value_name))] uint32 value_name_len; winreg_Type type; [relative,subcontext(0),subcontext_size(data_length),flag(NDR_REMAINING)] DATA_BLOB *data; - [value(data->length)] uint32 data_length; + [value(data ? data->length : 0)] uint32 data_length; } spoolss_PrinterEnumValues; [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDataEx( diff --git a/source3/include/includes.h b/source3/include/includes.h index 7ffb630..2573585 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -657,7 +657,6 @@ struct ntlmssp_state; #include "auth.h" #include "ntdomain.h" #include "librpc/rpc/dcerpc.h" -#include "nt_printing.h" #include "idmap.h" #include "client.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index e591ce3..a1af19b 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1910,9 +1910,6 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, ADS_MODLIST *mods, const char *printer); -bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx, - ADS_MODLIST *mods, - NT_PRINTER_DATA *data); /* The following definitions come from libads/ldap_user.c */ @@ -5454,7 +5451,6 @@ void reply_transs(struct smb_request *req); /* The following definitions come from smbd/lanman.c */ -time_t spoolss_Time_to_time_t(const struct spoolss_Time *r); void api_reply(connection_struct *conn, uint16 vuid, struct smb_request *req, char *data, char *params, diff --git a/source3/include/registry.h b/source3/include/registry.h index 9e7a1d2..ca3a1d0 100644 --- a/source3/include/registry.h +++ b/source3/include/registry.h @@ -23,6 +23,8 @@ #ifndef _REGISTRY_H #define _REGISTRY_H +#include "../librpc/gen_ndr/winreg.h" + struct registry_value { enum winreg_Type type; DATA_BLOB data; diff --git a/source3/include/smb.h b/source3/include/smb.h index 5266192..53228ba 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -180,7 +180,6 @@ typedef union unid_t { #include "librpc/gen_ndr/epmapper.h" #include "librpc/gen_ndr/krb5pac.h" #include "librpc/gen_ndr/dcerpc.h" -#include "librpc/gen_ndr/spoolss.h" struct lsa_dom_info { bool valid; diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index 0aa21ba..fff50cf 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -22,6 +22,7 @@ #include "rpc_client/cli_spoolss.h" #include "registry.h" #include "registry/reg_objects.h" +#include "nt_printing.h" #ifdef HAVE_ADS @@ -396,18 +397,4 @@ WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli, return result; } -bool get_local_printer_publishing_data(TALLOC_CTX *mem_ctx, - ADS_MODLIST *mods, - NT_PRINTER_DATA *data) -{ - uint32 key,val; - - for (key=0; key < data->num_keys; key++) { - struct regval_ctr *ctr = data->keys[key].values; - for (val=0; val < regval_ctr_numvals(ctr); val++) - map_regval_to_ads(mem_ctx, mods, regval_ctr_specific_value(ctr, val)); - } - return True; -} - #endif diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 1d155bb..df9a150 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -22,6 +22,8 @@ #include "includes.h" #include "printing.h" #include "librpc/gen_ndr/messaging.h" +#include "../librpc/gen_ndr/spoolss.h" +#include "nt_printing.h" static TALLOC_CTX *send_ctx; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 1186c67..c9ce969 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -27,8 +27,9 @@ #include "registry.h" #include "registry/reg_objects.h" #include "../librpc/gen_ndr/ndr_security.h" +#include "../librpc/gen_ndr/ndr_spoolss.h" #include "rpc_server/srv_spoolss_util.h" - +#include "nt_printing.h" #include "../rpc_server/srv_spoolss_util.h" /* Map generic permissions to printer object specific permissions */ diff --git a/source3/printing/nt_printing_tdb.c b/source3/printing/nt_printing_tdb.c index 29f6463..90f11ee 100644 --- a/source3/printing/nt_printing_tdb.c +++ b/source3/printing/nt_printing_tdb.c @@ -22,7 +22,7 @@ #include "includes.h" #include "printing/nt_printing_tdb.h" - +#include "librpc/gen_ndr/spoolss.h" #include "librpc/gen_ndr/ndr_security.h" #define FORMS_PREFIX "FORMS/" diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 3635e59..a273710 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -22,6 +22,8 @@ #include "includes.h" #include "printing.h" #include "librpc/gen_ndr/messaging.h" +#include "../librpc/gen_ndr/ndr_spoolss.h" +#include "nt_printing.h" extern struct current_user current_user; extern userdom_struct current_user_info; diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index d18b4e6..3fdea10 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -27,6 +27,7 @@ #include "reg_util_internal.h" #include "reg_backend_db.h" #include "reg_objects.h" +#include "nt_printing.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_REGISTRY diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c index 736de26..d1dc7e6 100644 --- a/source3/rpc_client/init_spoolss.c +++ b/source3/rpc_client/init_spoolss.c @@ -18,8 +18,8 @@ */ #include "includes.h" -#include "rpc_client/init_spoolss.h" #include "../librpc/gen_ndr/ndr_spoolss.h" +#include "rpc_client/init_spoolss.h" /******************************************************************* ********************************************************************/ diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 9ef1ff1..1d9632f 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -54,10 +54,6 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV -#ifndef MAX_OPEN_PRINTER_EXS -#define MAX_OPEN_PRINTER_EXS 50 -#endif - static Printer_entry *printers_list; typedef struct _counter_printer_0 { diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 0341b93..0cfceec 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -29,6 +29,7 @@ #include "rpc_client/init_spoolss.h" #include "registry.h" #include "registry/reg_objects.h" +#include "nt_printing.h" #define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \ { \ diff --git a/source3/rpcclient/cmd_test.c b/source3/rpcclient/cmd_test.c index e854df9..3b91d87 100644 --- a/source3/rpcclient/cmd_test.c +++ b/source3/rpcclient/cmd_test.c @@ -23,6 +23,7 @@ #include "../librpc/gen_ndr/cli_lsa.h" #include "rpc_client/cli_lsarpc.h" #include "../librpc/gen_ndr/ndr_samr.h" +#include "../librpc/gen_ndr/winreg.h" static NTSTATUS cmd_testme(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, const char **argv) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 2b7852e..ba4c90d 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -29,6 +29,7 @@ #include "smbd/globals.h" #include "../librpc/gen_ndr/cli_spoolss.h" #include "rpc_client/cli_spoolss.h" +#include "rpc_client/init_spoolss.h" /**************************************************************************** Ensure we check the path in *exactly* the same way as W2K for a findfirst/findnext diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c index e958d28..a464646 100644 --- a/source3/smbd/server_reload.c +++ b/source3/smbd/server_reload.c @@ -24,6 +24,7 @@ #include "includes.h" #include "smbd/globals.h" #include "librpc/gen_ndr/messaging.h" +#include "nt_printing.h" /**************************************************************************** Reload printers diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index c398253..589a569 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -21,6 +21,7 @@ #include "../librpc/gen_ndr/cli_spoolss.h" #include "rpc_client/cli_spoolss.h" #include "rpc_client/init_spoolss.h" +#include "nt_printing.h" #include "registry.h" #include "registry/reg_objects.h" diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 9ddabc8..ee96a02 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -25,6 +25,8 @@ #include "includes.h" #include "librpc/gen_ndr/messaging.h" +#include "librpc/gen_ndr/spoolss.h" +#include "nt_printing.h" #if HAVE_LIBUNWIND_H #include <libunwind.h> diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 8b258b6..a444c84 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -4338,14 +4338,12 @@ do {\ }\ } while(0); -#if 0 if (!test_winreg_symbolic_link(tctx, winreg_handle, hive_handle, TOP_LEVEL_CONTROL_PRINTERS_KEY, "\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Printers")) { torture_warning(tctx, "failed to check for winreg symlink"); } -#endif for (i=0; i < ARRAY_SIZE(keys); i++) { @@ -5011,17 +5009,6 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, s = 0xffff; } - if (torture_setting_bool(tctx, "samba3", false)) { - if ((types[t] == REG_MULTI_SZ) && s == 0) { - torture_warning(tctx, "samba3 does not handle 4 byte emtpy REG_MULTI_SZ buffers"); - continue; - } - if ((types[t] == REG_BINARY) && s == 0) { - torture_warning(tctx, "samba3 does not handle emtpy REG_BINARY buffers"); - continue; - } - } - switch (types[t]) { case REG_BINARY: data = blob; -- Samba Shared Repository