summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-11-29 17:56:40 +0100
committerGünther Deschner <gd@samba.org>2010-11-29 17:56:40 +0100
commitc62509c8f2589e7b952517626d61ee34b83e96b3 (patch)
treee5d0ffed129475509fb97e78689f6fc354ccfdd5
parente722c66b9884cfdd45d944969c582e897f64cd6d (diff)
downloadsamba-c62509c8f2589e7b952517626d61ee34b83e96b3.tar.gz
samba-c62509c8f2589e7b952517626d61ee34b83e96b3.tar.bz2
samba-c62509c8f2589e7b952517626d61ee34b83e96b3.zip
s3-spoolss: Fix Bug #7641: handle win9x adddriver calls w/o config file.
This turned cupsaddsmb to run into an infinite loop. Guenther
-rw-r--r--source3/printing/nt_printing.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 8462c859d2..671aca6a51 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -761,7 +761,11 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
WERROR err;
char *_p;
- if (!*driver_path || !*data_file || !*config_file) {
+ if (!*driver_path || !*data_file) {
+ return WERR_INVALID_PARAM;
+ }
+
+ if (!strequal(architecture, SPOOLSS_ARCHITECTURE_4_0) && !*config_file) {
return WERR_INVALID_PARAM;
}
@@ -773,7 +777,9 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
strip_driver_path(mem_ctx, *driver_path);
strip_driver_path(mem_ctx, *data_file);
- strip_driver_path(mem_ctx, *config_file);
+ if (*config_file) {
+ strip_driver_path(mem_ctx, *config_file);
+ }
if (help_file) {
strip_driver_path(mem_ctx, *help_file);
}