import cups-2.4.10-5.el10

i10cs changed/i10cs/cups-2.4.10-5.el10
MSVSphere Packaging Team 2 months ago
commit 621d0fdca6
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

@ -0,0 +1,2 @@
768db9c0db0b9d66c8be6df1d31e9b3ddfad08b9 SOURCES/cups-2.4.10-source.tar.gz
79ee155bed4c18088be472a6e364f37ad6e410a6 SOURCES/cupsprinter.png

2
.gitignore vendored

@ -0,0 +1,2 @@
SOURCES/cups-2.4.10-source.tar.gz
SOURCES/cupsprinter.png

@ -0,0 +1,44 @@
From 313c388dbc023bbcb75d1efed800d0cfc992a6cc Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Wed, 14 Aug 2024 21:18:54 -0400
Subject: [PATCH] Fix IPP everywhere printer setup (Issue #1033)
---
CHANGES.md | 1 +
scheduler/ipp.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 37623c54e..d334f70cf 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -5346,7 +5346,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 2, 0);
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer->device_uri);
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, device_uri);
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", (int)(sizeof(pattrs) / sizeof(pattrs[0])), NULL, pattrs);
response = cupsDoRequest(http, request, resource);
@@ -5367,7 +5367,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 1, 1);
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, printer->device_uri);
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, device_uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "all");
response = cupsDoRequest(http, request, resource);
@@ -5390,7 +5390,7 @@ create_local_bg_thread(
request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES);
ippSetVersion(request, 2, 0);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
- "printer-uri", NULL, uri);
+ "printer-uri", NULL, device_uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
"requested-attributes", NULL, "media-col-database");
response2 = cupsDoRequest(http, request, resource);
--
2.46.0

@ -0,0 +1,759 @@
From f37d3eb8a091addda1b34d6d264e8a4ac25cec25 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Mon, 22 Jul 2024 12:32:32 +0200
Subject: [PATCH] cgi: Fix checkbox support (fixes #1008)
There was a change in CGI script regarding checkboxes, however it did
not propagate into templates. Based on the change, the only valid check
was if the variable value was checkbox, but some browsers (at least
Firefox) send on as a default value for input form of type checkbox.
Additionally, the value checkbox looks like typo, because we use checked
as value for checkboxes in admin CGI program, so I updated
cgiGetCheckbox() as well.
To fix the behavior, we have to set VALUE="CHECKED" into every tag in
every templates for all checkboxes - this value will be sent in the
input form, so it will properly match with cgiGetCheckbox() logic now.
In the end, I have found out "Preserve Job History" checkbox from
template was handled as text field, which did not look correct.
Fixes #1008
---
cgi-bin/admin.c | 12 +++++++-----
cgi-bin/var.c | 2 +-
templates/add-printer.tmpl | 2 +-
templates/admin.tmpl | 30 ++++++++++++++---------------
templates/da/add-printer.tmpl | 2 +-
templates/da/admin.tmpl | 30 ++++++++++++++---------------
templates/da/modify-printer.tmpl | 2 +-
templates/de/add-printer.tmpl | 2 +-
templates/de/admin.tmpl | 30 ++++++++++++++---------------
templates/de/modify-printer.tmpl | 2 +-
templates/es/add-printer.tmpl | 2 +-
templates/es/admin.tmpl | 30 ++++++++++++++---------------
templates/es/modify-printer.tmpl | 2 +-
templates/fr/add-printer.tmpl | 2 +-
templates/fr/admin.tmpl | 30 ++++++++++++++---------------
templates/fr/modify-printer.tmpl | 2 +-
templates/ja/add-printer.tmpl | 2 +-
templates/ja/admin.tmpl | 30 ++++++++++++++---------------
templates/ja/modify-printer.tmpl | 2 +-
templates/modify-printer.tmpl | 2 +-
templates/pl/add-printer.tmpl | 2 +-
templates/pl/admin.tmpl | 30 ++++++++++++++---------------
templates/pl/modify-printer.tmpl | 2 +-
templates/pt_BR/add-printer.tmpl | 2 +-
templates/pt_BR/admin.tmpl | 30 ++++++++++++++---------------
templates/pt_BR/modify-printer.tmpl | 2 +-
templates/ru/add-printer.tmpl | 2 +-
templates/ru/admin.tmpl | 30 ++++++++++++++---------------
templates/ru/modify-printer.tmpl | 2 +-
29 files changed, 161 insertions(+), 159 deletions(-)
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index 107700e46..62e1c8fd0 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -1314,9 +1314,9 @@ do_config_server(http_t *http) /* I - HTTP connection */
browse_web_if = cgiGetCheckbox("BROWSE_WEB_IF") ? "Yes" : "No";
max_clients = cgiGetTextfield("MAX_CLIENTS");
max_log_size = cgiGetTextfield("MAX_LOG_SIZE");
- preserve_jobs = cgiGetTextfield("PRESERVE_JOBS");
+ preserve_jobs = cgiGetCheckbox("PRESERVE_JOBS") ? "1" : "0";
- if (preserve_jobs)
+ if (atoi(preserve_jobs))
{
max_jobs = cgiGetTextfield("MAX_JOBS");
preserve_job_history = cgiGetTextfield("PRESERVE_JOB_HISTORY");
@@ -1325,10 +1325,12 @@ do_config_server(http_t *http) /* I - HTTP connection */
if (!max_jobs || atoi(max_jobs) < 0)
max_jobs = "500";
- if (!preserve_job_history)
- preserve_job_history = "On";
+ if (!preserve_job_history || !preserve_job_history[0] ||
+ (strcasecmp(preserve_job_history, "yes") && strcasecmp(preserve_job_history, "no") && !atoi(preserve_job_history)))
+ preserve_job_history = "Yes";
- if (!preserve_job_files)
+ if (!preserve_job_files || !preserve_job_files[0] ||
+ (strcasecmp(preserve_job_files, "yes") && strcasecmp(preserve_job_files, "no") && !atoi(preserve_job_files)))
preserve_job_files = "1d";
}
else
diff --git a/cgi-bin/var.c b/cgi-bin/var.c
index 822f8b93c..e97d2a8fc 100644
--- a/cgi-bin/var.c
+++ b/cgi-bin/var.c
@@ -191,7 +191,7 @@ cgiGetCheckbox(const char *name) /* I - Name of form field */
int ret; /* Return value */
- ret = value && !_cups_strcasecmp(value, "checkbox");
+ ret = value && !_cups_strcasecmp(value, "checked");
if (!ret && value)
{
diff --git a/templates/add-printer.tmpl b/templates/add-printer.tmpl
index 339fe662f..7e4f559aa 100644
--- a/templates/add-printer.tmpl
+++ b/templates/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Sharing:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Share This Printer</LABEL></TD>
</TR>
<TR>
diff --git a/templates/admin.tmpl b/templates/admin.tmpl
index b8f528737..a954f2b7f 100644
--- a/templates/admin.tmpl
+++ b/templates/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">Advanced <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Share printers connected to this system</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Share printers connected to this system</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Max clients\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Allow printing from the Internet</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Advertise web interface</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Allow remote administration</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Use Kerberos authentication (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Allow users to cancel any job (not just their own)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Preserve job history</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Allow printing from the Internet</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Advertise web interface</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Allow remote administration</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Use Kerberos authentication (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Allow users to cancel any job (not just their own)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Preserve job history</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maximum jobs (0 for no limit)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retain Metadata\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retain Documents\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Save debugging information for troubleshooting</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Save debugging information for troubleshooting</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Max log file size\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Advanced <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Share printers connected to this system</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Allow printing from the Internet</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Allow remote administration</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Use Kerberos authentication (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Allow users to cancel any job (not just their own)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Save debugging information for troubleshooting</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Share printers connected to this system</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Allow printing from the Internet</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Allow remote administration</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Use Kerberos authentication (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Allow users to cancel any job (not just their own)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Save debugging information for troubleshooting</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Change Settings"></P>
diff --git a/templates/da/add-printer.tmpl b/templates/da/add-printer.tmpl
index ed206678b..ed34c33f2 100644
--- a/templates/da/add-printer.tmpl
+++ b/templates/da/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Deling:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Del printeren</LABEL></TD>
</TR>
<TR>
diff --git a/templates/da/admin.tmpl b/templates/da/admin.tmpl
index 87f83e0ef..de33275f3 100644
--- a/templates/da/admin.tmpl
+++ b/templates/da/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">Avanceret <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Del printere som er forbundet til systemet</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Del printere som er forbundet til systemet</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maks. klienter\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Tillad udskrivning fra internettet</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Annoncér webgrænseflade</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Tillad fjernadministration</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Brug Kerberos-autentifikation (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Tillad brugere at annullere alle jobs (ikke kun deres egne)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Bevar jobhistorik</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Tillad udskrivning fra internettet</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Annoncér webgrænseflade</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Tillad fjernadministration</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Brug Kerberos-autentifikation (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Tillad brugere at annullere alle jobs (ikke kun deres egne)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Bevar jobhistorik</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maksimum jobs (0 for ubegrænset)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bevar metadata\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bevar dokumenter\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Gem fejlretningsinformation til fejlsøgning</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Gem fejlretningsinformation til fejlsøgning</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maks. størrelse på logfil\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Avanceret <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Del printere som er forbundet til systemet</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Tillad udskrivning fra internettet</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Tillad fjernadministration</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Brug Kerberos-autentifikation (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Tillad brugere at annullere alle jobs (ikke kun deres egne)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Gem fejlretningsinformation til fejlsøgning</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Del printere som er forbundet til systemet</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Tillad udskrivning fra internettet</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Tillad fjernadministration</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Brug Kerberos-autentifikation (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Tillad brugere at annullere alle jobs (ikke kun deres egne)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Gem fejlretningsinformation til fejlsøgning</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Skift indstillinger"></P>
diff --git a/templates/da/modify-printer.tmpl b/templates/da/modify-printer.tmpl
index 9eb32af9d..4e175194a 100644
--- a/templates/da/modify-printer.tmpl
+++ b/templates/da/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Deling:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Del printeren</LABEL></TD>
</TR>
<TR>
diff --git a/templates/de/add-printer.tmpl b/templates/de/add-printer.tmpl
index b54fb225f..acb44d4f2 100644
--- a/templates/de/add-printer.tmpl
+++ b/templates/de/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Freigabe:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Drucker im Netzwerk freigeben</LABEL></TD>
</TR>
<TR>
diff --git a/templates/de/admin.tmpl b/templates/de/admin.tmpl
index bbfa2b097..70fdc92b4 100644
--- a/templates/de/admin.tmpl
+++ b/templates/de/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">Erweitert <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Mit diesem System verbundene Drucker freigeben</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Mit diesem System verbundene Drucker freigeben</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maximale Anzahl an Clients\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Drucken aus dem Internet zulassen</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Weboberfläche im Netzwerk bekanntmachen</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Fernwartung zulassen</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos-Authentifizierung verwenden (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Benutzern erlauben beliebige Aufträge abzubrechen (nicht nur die eigenen)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Auftragsverlauf behalten</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Drucken aus dem Internet zulassen</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Weboberfläche im Netzwerk bekanntmachen</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Fernwartung zulassen</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos-Authentifizierung verwenden (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Benutzern erlauben beliebige Aufträge abzubrechen (nicht nur die eigenen)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Auftragsverlauf behalten</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maximale Auftragsanzahl (0 für unbegrenzt)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Metadaten aufbewahren\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dokumente aufbewahren\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Mehr Informationen zur Fehlersuche speichern</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Mehr Informationen zur Fehlersuche speichern</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maximale Protokoll-Dateigröße\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Erweitert <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Mit diesem System verbundene Drucker freigeben</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Drucken aus dem Internet zulassen</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Fernwartung zulassen</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos-Authentifizierung verwenden (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Benutzern erlauben beliebige Aufträge abzubrechen (nicht nur die eigenen)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Mehr Informationen zur Fehlersuche speichern</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Mit diesem System verbundene Drucker freigeben</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Drucken aus dem Internet zulassen</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Fernwartung zulassen</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos-Authentifizierung verwenden (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Benutzern erlauben beliebige Aufträge abzubrechen (nicht nur die eigenen)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Mehr Informationen zur Fehlersuche speichern</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Einstellungen ändern"></P>
diff --git a/templates/de/modify-printer.tmpl b/templates/de/modify-printer.tmpl
index 8844bfa79..57c70715c 100644
--- a/templates/de/modify-printer.tmpl
+++ b/templates/de/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Freigabe:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Drucker im Netzwerk freigeben</LABEL></TD>
</TR>
<TR>
diff --git a/templates/es/add-printer.tmpl b/templates/es/add-printer.tmpl
index 05bf42164..d67cda778 100644
--- a/templates/es/add-printer.tmpl
+++ b/templates/es/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Compartici&oacute;n:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Compartir esta impresora</LABEL></TD>
</TR>
<TR>
diff --git a/templates/es/admin.tmpl b/templates/es/admin.tmpl
index d75c8adfe..573ca51bd 100644
--- a/templates/es/admin.tmpl
+++ b/templates/es/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">Avanzada <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartir impresoras conectadas a este sistema</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartir impresoras conectadas a este sistema</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;N&uacute;mero m&aacute;ximo de clientes\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir la impresi&oacute;n desde Internet</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Anunciar la interfaz web</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administraci&oacute;n remota</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentificaci&oacute;n Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir a los usuarios cancelar cualquier trabajo (no s&oacute;lo los suyos propios)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Preservar el historial de trabajos</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir la impresi&oacute;n desde Internet</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Anunciar la interfaz web</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administraci&oacute;n remota</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentificaci&oacute;n Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir a los usuarios cancelar cualquier trabajo (no s&oacute;lo los suyos propios)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Preservar el historial de trabajos</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;N&uacute;mero m&aacute;ximo de trabajos (0 sin l&iacute;mite)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retener metadatos\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retener documentos\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Guardar informaci&oacute;n de depuraci&oacute;n para b&uacute;squeda de problemas</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Guardar informaci&oacute;n de depuraci&oacute;n para b&uacute;squeda de problemas</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tama&ntilde;o m&aacute;ximo del archivo de registro\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Avanzada <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartir impresoras conectadas a este sistema</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir la impresi&oacute;n desde Internet</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administraci&oacute;n remota</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentificaci&oacute;n Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir a los usuarios cancelar cualquier trabajo (no s&oacute;lo los suyos propios)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Guardar informaci&oacute;n de depuraci&oacute;n para b&uacute;squeda de problemas</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartir impresoras conectadas a este sistema</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir la impresi&oacute;n desde Internet</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administraci&oacute;n remota</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentificaci&oacute;n Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir a los usuarios cancelar cualquier trabajo (no s&oacute;lo los suyos propios)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Guardar informaci&oacute;n de depuraci&oacute;n para b&uacute;squeda de problemas</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Cambiar configuraci&oacute;n"></P>
diff --git a/templates/es/modify-printer.tmpl b/templates/es/modify-printer.tmpl
index 1da5bb6fa..e29cf62d4 100644
--- a/templates/es/modify-printer.tmpl
+++ b/templates/es/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Compartida:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Compartir esta impresora</LABEL></TD>
</TR>
<TR>
diff --git a/templates/fr/add-printer.tmpl b/templates/fr/add-printer.tmpl
index b3a35f5bd..d18206d6a 100644
--- a/templates/fr/add-printer.tmpl
+++ b/templates/fr/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Partage:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Partager cette imprimante</LABEL></TD>
</TR>
<TR>
diff --git a/templates/fr/admin.tmpl b/templates/fr/admin.tmpl
index a2dd61708..be68137cd 100644
--- a/templates/fr/admin.tmpl
+++ b/templates/fr/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">Avanc&eacute; <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Partager les imprimantes connect&eacute;es &agrave; ce syst&egrave;me</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Partager les imprimantes connect&eacute;es &agrave; ce syst&egrave;me</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nombre maximum de clients\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Autoriser l'impression depuis Internet</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Annoncer l'interface Web</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Autoriser l'administration &agrave; distance</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Utiliser l'authentification Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Autoriser les utilisateurs &agrave; annuler n'importe quelle t&acirc;che (Pas seulement les leurs)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Conserver l'historique des t&acirc;ches</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Autoriser l'impression depuis Internet</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Annoncer l'interface Web</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Autoriser l'administration &agrave; distance</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Utiliser l'authentification Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Autoriser les utilisateurs &agrave; annuler n'importe quelle t&acirc;che (Pas seulement les leurs)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Conserver l'historique des t&acirc;ches</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Nombre maximum de t&acirc;ches (0 pour aucune limite)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conserver les m&eacute;ta-donn&eacute;es\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conserver les documents\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Enregistrer les informations de debug pour la r&eacute;solution de probl&egrave;mes</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Enregistrer les informations de debug pour la r&eacute;solution de probl&egrave;mes</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Taille maximum du journal système\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Avanc&eacute; <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Partager les imprimantes connect&eacute;es &agrave; ce syst&egrave;me</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Autoriser l'impression depuis Internet</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Autoriser l'administration &agrave; distance</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Utiliser l'authentification Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Autoriser les utilisateurs &agrave; annuler n'importe quelle t&acirc;che (Pas seulement les leurs)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Enregistrer les informations de debug pour la r&eacute;solution de probl&egrave;mes</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Partager les imprimantes connect&eacute;es &agrave; ce syst&egrave;me</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Autoriser l'impression depuis Internet</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Autoriser l'administration &agrave; distance</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Utiliser l'authentification Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Autoriser les utilisateurs &agrave; annuler n'importe quelle t&acirc;che (Pas seulement les leurs)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Enregistrer les informations de debug pour la r&eacute;solution de probl&egrave;mes</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Modifier les param&egrave;tres"></P>
diff --git a/templates/fr/modify-printer.tmpl b/templates/fr/modify-printer.tmpl
index 56376912c..64cb58843 100644
--- a/templates/fr/modify-printer.tmpl
+++ b/templates/fr/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Partage:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Partager cette imprimante</LABEL></TD>
</TR>
<TR>
diff --git a/templates/ja/add-printer.tmpl b/templates/ja/add-printer.tmpl
index 450624a39..f162a29f5 100644
--- a/templates/ja/add-printer.tmpl
+++ b/templates/ja/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">共有:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">このプリンターを共有する</LABEL></TD>
</TR>
<TR>
diff --git a/templates/ja/admin.tmpl b/templates/ja/admin.tmpl
index 15faa9156..a7055bff0 100644
--- a/templates/ja/admin.tmpl
+++ b/templates/ja/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">詳細 <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> このシステムに接続されているプリンターを共有</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> このシステムに接続されているプリンターを共有</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最大クライアント数\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> インターネットからの印刷を許可</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> ウェブインターフェイスを公開</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> リモート管理を許可</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos 認証を使用 (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> 所有者以外のユーザーにもジョブのキャンセルを許可</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> ジョブの履歴を保存</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> インターネットからの印刷を許可</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> ウェブインターフェイスを公開</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> リモート管理を許可</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos 認証を使用 (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> 所有者以外のユーザーにもジョブのキャンセルを許可</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> ジョブの履歴を保存</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最大ジョブ数 (0 は無制限)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;メタデータを保持\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ドキュメントを保持\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> トラブルシューティングのためにデバッグ情報を保存</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> トラブルシューティングのためにデバッグ情報を保存</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最大ログファイルサイズ\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">詳細 <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> このシステムに接続されているプリンターを共有</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> インターネットからの印刷を許可</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> リモート管理を許可</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos 認証を使用 (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> 所有者以外のユーザーにもジョブのキャンセルを許可</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> トラブルシューティングのためにデバッグ情報を保存</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> このシステムに接続されているプリンターを共有</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> インターネットからの印刷を許可</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> リモート管理を許可</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Kerberos 認証を使用 (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> 所有者以外のユーザーにもジョブのキャンセルを許可</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> トラブルシューティングのためにデバッグ情報を保存</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="設定の変更"></P>
diff --git a/templates/ja/modify-printer.tmpl b/templates/ja/modify-printer.tmpl
index a3ac71644..0276c90a0 100644
--- a/templates/ja/modify-printer.tmpl
+++ b/templates/ja/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">共有:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">このプリンターを共有する</LABEL></TD>
</TR>
<TR>
diff --git a/templates/modify-printer.tmpl b/templates/modify-printer.tmpl
index 1aed9f39c..ef4d094b9 100644
--- a/templates/modify-printer.tmpl
+++ b/templates/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Sharing:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Share This Printer</LABEL></TD>
</TR>
<TR>
diff --git a/templates/pt_BR/add-printer.tmpl b/templates/pt_BR/add-printer.tmpl
index ce82480f6..48ad27841 100644
--- a/templates/pt_BR/add-printer.tmpl
+++ b/templates/pt_BR/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Compartilhamento:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Compartilhar essa impressora</LABEL></TD>
</TR>
<TR>
diff --git a/templates/pt_BR/admin.tmpl b/templates/pt_BR/admin.tmpl
index 7dedf031c..d6cf283fe 100644
--- a/templates/pt_BR/admin.tmpl
+++ b/templates/pt_BR/admin.tmpl
@@ -38,23 +38,23 @@
<P><A HREF="/admin/">Avan&ccedil;ado <SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartilhar impressoras conectadas a este sistema</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartilhar impressoras conectadas a este sistema</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;M&aacute;ximo de clientes\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir impress&atilde;o a partir da Internet</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Anunciar interface web</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administra&ccedil;&atilde;o remota</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentica&ccedil;&atilde;o via Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir aos usu&aacute;rios cancelar qualquer trabalho (n&atilde;o apenas os seus pr&oacute;prios)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Preservar o hist&oacute;rico de trabalhos</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir impress&atilde;o a partir da Internet</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Anunciar interface web</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administra&ccedil;&atilde;o remota</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentica&ccedil;&atilde;o via Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir aos usu&aacute;rios cancelar qualquer trabalho (n&atilde;o apenas os seus pr&oacute;prios)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Preservar o hist&oacute;rico de trabalhos</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;M&aacute;ximo de trabalhos (0 para sem limite)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reter metadados\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reter documentos\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Salvar informa&ccedil;&atilde;o de depura&ccedil;&atilde;o para solu&ccedil;&atilde;o de problemas</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Salvar informa&ccedil;&atilde;o de depura&ccedil;&atilde;o para solu&ccedil;&atilde;o de problemas</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tamanho m&aacute;ximo do arquivo de log\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -62,12 +62,12 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Avan&ccedil;ado <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartilhar impressoras conectadas a este sistema</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir impress&atilde;o a partir da Internet</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administra&ccedil;&atilde;o remota</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentica&ccedil;&atilde;o via Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir aos usu&aacute;rios cancelar qualquer trabalho (n&atilde;o apenas seus pr&oacute;prios)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Salvar informa&ccedil;&otilde;es de depura&ccedil;&atilde;o para solu&ccedil;&atilde;o de problemas</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Compartilhar impressoras conectadas a este sistema</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Permitir impress&atilde;o a partir da Internet</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Permitir administra&ccedil;&atilde;o remota</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Usar autentica&ccedil;&atilde;o via Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Permitir aos usu&aacute;rios cancelar qualquer trabalho (n&atilde;o apenas seus pr&oacute;prios)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Salvar informa&ccedil;&otilde;es de depura&ccedil;&atilde;o para solu&ccedil;&atilde;o de problemas</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Alterar configura&ccedil;&otilde;es"></P>
diff --git a/templates/pt_BR/modify-printer.tmpl b/templates/pt_BR/modify-printer.tmpl
index f8d28c55e..41a23287a 100644
--- a/templates/pt_BR/modify-printer.tmpl
+++ b/templates/pt_BR/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Compartilhamento:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Compartilhar esta impressora</LABEL></TD>
</TR>
<TR>
diff --git a/templates/ru/add-printer.tmpl b/templates/ru/add-printer.tmpl
index 9a6d043e1..9b94964d7 100644
--- a/templates/ru/add-printer.tmpl
+++ b/templates/ru/add-printer.tmpl
@@ -32,7 +32,7 @@
</TR>
<TR>
<TH CLASS="label">Совместный доступ:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Разрешить совместный доступ к этому принтеру</LABEL></TD>
</TR>
<TR>
diff --git a/templates/ru/admin.tmpl b/templates/ru/admin.tmpl
index 0e7fa4dd8..07d136994 100644
--- a/templates/ru/admin.tmpl
+++ b/templates/ru/admin.tmpl
@@ -37,23 +37,23 @@
<P><A HREF="/admin/">Дополнительные параметры<SMALL>&#x25bc;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="YES">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Разрешить совместный доступ к принтерам, подключенным к этой системе</LABEL><BR>
+ <INPUT TYPE="HIDDEN" NAME="ADVANCEDSETTINGS" VALUE="CHECKED">
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Разрешить совместный доступ к принтерам, подключенным к этой системе</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Максимум клиентов\:
<INPUT TYPE="TEXT" NAME="MAX_CLIENTS" VALUE="{?max_clients}" SIZE="6"><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Разрешить печать из интернет</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Разрешить доступ через веб-интерфейс</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Разрешить удаленное администрирование</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Разрешить аутентификацию Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Разрешать пользователям отменять любое задание(не только их собственные)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Вести журнал заданий</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Разрешить печать из интернет</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="BROWSE_WEB_IF" ID="BROWSE_WEB_IF" VALUE="CHECKED" {?browse_web_if}><LABEL FOR="BROWSE_WEB_IF"> Разрешить доступ через веб-интерфейс</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Разрешить удаленное администрирование</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Разрешить аутентификацию Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Разрешать пользователям отменять любое задание(не только их собственные)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="PRESERVE_JOBS" ID="PRESERVE_JOBS" VALUE="CHECKED" {?preserve_jobs}><LABEL FOR="PRESERVE_JOBS"> Вести журнал заданий</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Количество заданий (0 без ограничений)\:
<INPUT TYPE="TEXT" NAME="MAX_JOBS" VALUE="{?max_jobs}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Записывать метаданные(Retain Metadata)\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_HISTORY" VALUE="{?preserve_job_history}" SIZE="6"><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Существующие документы(Retain Documents)\:
<INPUT TYPE="TEXT" NAME="PRESERVE_JOB_FILES" VALUE="{?preserve_job_files}" SIZE="6"><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Сохранять отладочную информацию в журнале</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Сохранять отладочную информацию в журнале</LABEL><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Максимальный размер журнала\:
<INPUT TYPE="TEXT" NAME="MAX_LOG_SIZE" VALUE="{?max_log_size}" SIZE="6"></P>
@@ -61,13 +61,13 @@
<P><A HREF="/admin/?ADVANCEDSETTINGS=YES">Дополнительные параметры <SMALL>&#x25b6;</SMALL></A><BR>
<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
- <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Разрешить совместный доступ к принтерам, подключенным к этой системе</LABEL><BR>
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" {?remote_any}><LABEL FOR="REMOTE_ANY"> Разрешить печать из
+ <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" ID="SHARE_PRINTERS" VALUE="CHECKED" {?share_printers}><LABEL FOR="SHARE_PRINTERS"> Разрешить совместный доступ к принтерам, подключенным к этой системе</LABEL><BR>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" ID="REMOTE_ANY" VALUE="CHECKED" {?remote_any}><LABEL FOR="REMOTE_ANY"> Разрешить печать из
интернет</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Разрешить удаленное администрирование</LABEL><BR>
- {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" {?kerberos}><LABEL FOR="KERBEROS"> Разрешить аутентификацию Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
- <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Разрешить пользователям отменять любое задание(не только их собственные)</LABEL><BR>
- <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Сохранять отладочную информацию в журнале</LABEL></P>
+ <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" ID="REMOTE_ADMIN" VALUE="CHECKED" {?remote_admin}><LABEL FOR="REMOTE_ADMIN"> Разрешить удаленное администрирование</LABEL><BR>
+ {have_gssapi?<INPUT TYPE="CHECKBOX" NAME="KERBEROS" ID="KERBEROS" VALUE="CHECKED" {?kerberos}><LABEL FOR="KERBEROS"> Разрешить аутентификацию Kerberos (<A HREF="/help/kerberos.html?TOPIC=Getting+Started">FAQ</A>)</LABEL><BR>:}
+ <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" ID="USER_CANCEL_ANY" VALUE="CHECKED" {?user_cancel_any}><LABEL FOR="USER_CANCEL_ANY"> Разрешить пользователям отменять любое задание(не только их собственные)</LABEL><BR>
+ <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" ID="DEBUG_LOGGING" VALUE="CHECKED" {?debug_logging}><LABEL FOR="DEBUG_LOGGING"> Сохранять отладочную информацию в журнале</LABEL></P>
}
<P><INPUT TYPE="SUBMIT" NAME="CHANGESETTINGS" VALUE="Сохранить"></P>
diff --git a/templates/ru/modify-printer.tmpl b/templates/ru/modify-printer.tmpl
index 811c2d8cc..e381ca027 100644
--- a/templates/ru/modify-printer.tmpl
+++ b/templates/ru/modify-printer.tmpl
@@ -26,7 +26,7 @@
</TR>
<TR>
<TH CLASS="label">Совместный доступ:</TH>
-<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" {PRINTER_IS_SHARED=1?CHECKED:}>
+<TD><INPUT TYPE="CHECKBOX" NAME="PRINTER_IS_SHARED" ID="PRINTER_IS_SHARED" VALUE="CHECKED" {PRINTER_IS_SHARED=1?CHECKED:}>
<LABEL FOR="PRINTER_IS_SHARED">Разрешить совместный доступ к этому принтеру</LABEL></TD>
</TR>
<TR>
--
2.45.2

@ -0,0 +1,12 @@
diff -up cups-1.5b1/scheduler/banners.c.banners cups-1.5b1/scheduler/banners.c
--- cups-1.5b1/scheduler/banners.c.banners 2011-05-20 05:49:49.000000000 +0200
+++ cups-1.5b1/scheduler/banners.c 2011-05-23 17:35:30.000000000 +0200
@@ -110,6 +110,8 @@ cupsdLoadBanners(const char *d) /* I -
if ((ext = strrchr(dent->filename, '.')) != NULL)
if (!strcmp(ext, ".bck") ||
!strcmp(ext, ".bak") ||
+ !strcmp(ext, ".rpmnew") ||
+ !strcmp(ext, ".rpmsave") ||
!strcmp(ext, ".sav"))
continue;

@ -0,0 +1,27 @@
diff -up cups-1.5b1/backend/usb-unix.c.direct-usb cups-1.5b1/backend/usb-unix.c
--- cups-1.5b1/backend/usb-unix.c.direct-usb 2011-05-20 05:49:49.000000000 +0200
+++ cups-1.5b1/backend/usb-unix.c 2011-05-23 17:52:14.000000000 +0200
@@ -102,6 +102,9 @@ print_device(const char *uri, /* I - De
_cups_strncasecmp(hostname, "Minolta", 7);
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
+ if (use_bc && !strncmp(uri, "usb:/dev/", 9))
+ use_bc = 0;
+
if ((device_fd = open_device(uri, &use_bc)) == -1)
{
if (getenv("CLASS") != NULL)
@@ -331,12 +334,7 @@ open_device(const char *uri, /* I - Dev
if (!strncmp(uri, "usb:/dev/", 9))
#ifdef __linux
{
- /*
- * Do not allow direct devices anymore...
- */
-
- errno = ENODEV;
- return (-1);
+ return (open(uri + 4, O_RDWR | O_EXCL));
}
else if (!strncmp(uri, "usb://", 6))
{

@ -0,0 +1,21 @@
diff -up cups-1.7b1/scheduler/ipp.c.driverd-timeout cups-1.7b1/scheduler/ipp.c
--- cups-1.7b1/scheduler/ipp.c.driverd-timeout 2013-04-19 12:24:43.003841810 +0200
+++ cups-1.7b1/scheduler/ipp.c 2013-04-19 12:24:43.204839107 +0200
@@ -4556,7 +4556,7 @@ copy_model(cupsd_client_t *con, /* I -
close(temppipe[1]);
/*
- * Wait up to 30 seconds for the PPD file to be copied...
+ * Wait up to 70 seconds for the PPD file to be copied...
*/
total = 0;
@@ -4576,7 +4576,7 @@ copy_model(cupsd_client_t *con, /* I -
FD_SET(temppipe[0], &input);
FD_SET(CGIPipes[0], &input);
- timeout.tv_sec = 30;
+ timeout.tv_sec = 70;
timeout.tv_usec = 0;
if ((i = select(maxfd, &input, NULL, NULL, &timeout)) < 0)

@ -0,0 +1,11 @@
diff -up cups-2.3.1/ppdc/sample.drv.dymo-deviceid cups-2.3.1/ppdc/sample.drv
--- cups-2.3.1/ppdc/sample.drv.dymo-deviceid 2019-12-16 09:22:34.476492212 +0100
+++ cups-2.3.1/ppdc/sample.drv 2019-12-16 09:23:44.665003895 +0100
@@ -129,6 +129,7 @@ Version "2.3"
{
Manufacturer "DYMO"
ModelName "Label Printer"
+ Attribute "1284DeviceID" "" "MFG:DYMO;MDL:LabelWriter 400;"
Attribute NickName "" "DYMO Label Printer"
PCFileName "dymo.ppd"
DriverType label

@ -0,0 +1,876 @@
diff -up cups-2.4.0/backend/failover.c.failover cups-2.4.0/backend/failover.c
--- cups-2.4.0/backend/failover.c.failover 2021-12-15 11:06:14.274967317 +0100
+++ cups-2.4.0/backend/failover.c 2021-12-15 11:06:14.274967317 +0100
@@ -0,0 +1,837 @@
+/*
+ * Failover Backend for the Common UNIX Printing System (CUPS).
+ *
+ * Copyright (c) 2014, Red Hat, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Red Hat, Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT,
+ * INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * Original version by Clark Hale, Red Hat, Inc.
+ *
+ * This backend presents a fake printer that will choose the first
+ * available printer from a list of IPP URIs.
+ *
+ * Option failover contains a comma separated list of IPP URIs. The
+ * URIs are attempted in-order.
+ *
+ * Option failover-retries contains an integer that indicates how many
+ * times to iterate through the failover list before completely
+ * failing.
+ *
+ * Contents:
+ * main() - Checks each printer in a failover list, and
+ * sends job data to the first available printer
+ * move_job() - Sends and IPP Move-Job request
+ * check_printer() - Checks a printer's attributes to see
+ * if it's enabled and accepting jobs
+ * read_config() - Read the backends configuration from
+ * options
+ * get_printer_attributes() - Sends an IPP Get-Attributes request to
+ * a URI
+ * sigterm_handler() - Handle SIGTERM that cancels the job
+ * password_cb() - Password call back used to disable password
+ * prompt
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <cups/http-private.h>
+#include <cups/http.h>
+#include "backend-private.h"
+
+/*
+ * Return Values
+ */
+typedef enum fo_state_e
+{
+ FO_PRINTER_GOOD = 0,
+ FO_PRINTER_BAD,
+ FO_PRINTER_BUSY,
+ FO_AUTH_REQUIRED
+} fo_state_t;
+
+/*
+ * Constants
+ */
+#define FAILOVER_DEFAULT_RETRIES (3)
+#define FAILOVER_PASSWORD_RETRIES_MAX (3)
+
+/*
+ * Local Functions
+ */
+static int check_printer(const char *device_uri);
+static int read_config(cups_array_t *printer_array, int *retries,
+ const char *options);
+static int get_printer_attributes(const char *device_uri,
+ ipp_t **attributes);
+static int move_job(int jobid, const char *dest);
+static void sigterm_handler(int sig);
+static const char *password_cb(const char *);
+
+/*
+ * Global Variables
+ */
+static int job_canceled = 0; /* Job canceled */
+static char *password = NULL; /* password for device */
+static int password_retries = 0;
+static const char *auth_info_required = "none";
+
+/*
+ * 'main()' - Checks each printer in a failover list, and
+ * sends job data to the first available printer
+ * Usage:
+ * printer-uri job-id user title copies options [file]
+ *
+ * The printer-uri option is not used, but it still required to fit
+ * to the backend(7) standards.
+ */
+int
+main(int argc, char *argv[])
+{
+ const char *selected_uri = NULL; /* URI of selected printer */
+ const char *tmp_device_uri; /* Device URI to check */
+ cups_array_t *printer_array; /* Array of available printers */
+ int printer_count = 0; /* current printer array index */
+ int retry_max = 1; /* maximum retries before exit */
+ int retry_count = 0; /* current retry number */
+ int auth_failed_count = 0; /* auth failures per loop */
+ int rc = CUPS_BACKEND_OK;
+#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+ struct sigaction action; /* Actions for POSIX signals */
+#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+
+ /*
+ * Check args
+ */
+ if (argc == 1)
+ {
+ /*
+ * print out discovery data
+ */
+ char *backendName;
+
+ if ((backendName = strrchr(argv[0], '/')) != NULL)
+ backendName++;
+ else
+ backendName = argv[0];
+
+ _cupsLangPrintf(stderr,"network %s \"Unknown\" \"%s (%s)\"\n",
+ backendName,
+ _cupsLangString(cupsLangDefault(), _("Failover Printer")),
+ backendName);
+
+ return (CUPS_BACKEND_OK);
+ }
+ else if (argc < 6)
+ {
+ _cupsLangPrintf(stderr,
+ _("Usage: %s job-id user title copies options [file]"),
+ argv[0]);
+ return (CUPS_BACKEND_STOP);
+ }
+
+ fprintf(stderr, "DEBUG: Failover backend starting up.\n");
+
+ /*
+ * Don't buffer status messages
+ */
+ setbuf(stderr, NULL);
+
+ /*
+ * Ignore SIGPIPE and catch SIGTERM signals...
+ */
+#ifdef HAVE_SIGSET
+ sigset(SIGPIPE, SIG_IGN);
+ sigset(SIGTERM, sigterm_handler);
+#elif defined(HAVE_SIGACTION)
+ memset(&action, 0, sizeof(action));
+ action.sa_handler = SIG_IGN;
+ sigaction(SIGPIPE, &action, NULL);
+
+ sigemptyset(&action.sa_mask);
+ sigaddset(&action.sa_mask, SIGTERM);
+ action.sa_handler = sigterm_handler;
+ sigaction(SIGTERM, &action, NULL);
+#else
+ signal(SIGPIPE, SIG_IGN);
+ signal(SIGTERM, sigterm_handler);
+#endif /* HAVE_SIGSET */
+
+ printer_array = cupsArrayNew(NULL, NULL);
+
+ /*
+ * Read Configuration
+ */
+ if ((rc = read_config(printer_array, &retry_max,
+ argv[5])) != CUPS_BACKEND_OK)
+ {
+ fprintf(stderr, "ERROR: Failed to read configuration options!\n");
+ goto cleanup;
+ }
+
+ /*
+ * Main Retry Loop
+ */
+ for (retry_count = 0; retry_count < retry_max; retry_count++)
+ {
+ fprintf(stderr, "DEBUG: Retry loop #%d\n", retry_count + 1);
+
+ /*
+ * Reset Counters
+ */
+ printer_count = 0;
+ auth_failed_count = 0;
+
+ tmp_device_uri = (char *)cupsArrayFirst(printer_array);
+
+ do
+ {
+ if (job_canceled)
+ {
+ fprintf(stderr, "DEBUG: Job Canceled\n");
+ goto cleanup;
+ }
+
+ fprintf(stderr,"DEBUG: Checking printer #%d: %s\n",
+ printer_count+1, tmp_device_uri);
+
+ rc = check_printer(tmp_device_uri);
+
+ // Printer is available and not busy.
+ if ( rc == FO_PRINTER_GOOD )
+ {
+ selected_uri = tmp_device_uri;
+ break;
+ }
+ // Printer is busy
+ else if (rc == FO_PRINTER_BUSY)
+ {
+ fprintf(stderr, "DEBUG: Waiting for job to complete.\n");
+ sleep(2);
+ continue;
+ }
+ // Authorization is required to access the printer.
+ else if (rc == FO_AUTH_REQUIRED)
+ {
+ auth_failed_count++;
+ fprintf(stderr, "DEBUG: auth_failed_count = %d\n", auth_failed_count);
+ }
+ // Printer is stopped or not accepting jobs
+ else
+ {
+ if (!printer_count)
+ fprintf(stderr, "INFO: Primary Printer, %s, not available. "
+ "Attempting Failovers...\n",
+ tmp_device_uri);
+ else
+ fprintf(stderr, "INFO: Failover Printer, %s, not available. "
+ "Attempting Failovers..\n",
+ tmp_device_uri);
+ printer_count++;
+ tmp_device_uri = (char *)cupsArrayNext(printer_array);
+ }
+ } while (tmp_device_uri != NULL);
+
+ if (selected_uri && !printer_count)
+ fprintf(stderr, "STATE: -primary-printer-failed\n");
+ else
+ fprintf(stderr, "STATE: +primary-printer-failed\n");
+
+ if (job_canceled)
+ {
+ fprintf(stderr, "DEBUG: Job Canceled\n");
+ goto cleanup;
+ }
+
+ if (!selected_uri && auth_failed_count == printer_count)
+ {
+ fprintf(stderr, "ERROR: All failover printers failed with "
+ "authorization issues.\n");
+ rc = CUPS_BACKEND_AUTH_REQUIRED;
+ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required);
+ goto cleanup;
+ }
+ else if (!selected_uri && retry_count + 1 < retry_max)
+ {
+ fprintf(stderr, "INFO: No suitable printer found...retrying...\n");
+ sleep(2);
+ continue;
+ }
+ else if (selected_uri)
+ {
+ fprintf(stderr, "DEBUG: Using printer, %s.\n", selected_uri);
+ break;
+ }
+ }
+
+ if (!selected_uri)
+ {
+ fprintf(stderr, "ERROR: No suitable printer found. Aborting print\n");
+ rc = CUPS_BACKEND_FAILED;
+ goto cleanup;
+ }
+
+ rc = move_job(atoi(argv[1]), selected_uri);
+
+ if (job_canceled)
+ rc = CUPS_BACKEND_OK;
+
+cleanup :
+ if (job_canceled)
+ rc = CUPS_BACKEND_OK;
+
+ tmp_device_uri = (char *)cupsArrayFirst(printer_array);
+ do
+ {
+ free((void *)tmp_device_uri);
+ } while ((tmp_device_uri = (char *)cupsArrayNext(printer_array)) != NULL);
+
+ cupsArrayDelete(printer_array);
+ sleep(2);
+ return (rc);
+}
+
+/*
+ * 'check_printer()' - Checks the status of a remote printer and returns
+ * back a good/bad/busy status.
+ */
+int
+check_printer(const char *device_uri)
+{
+ ipp_t *attributes = NULL; /* attributes for device_uri */
+ ipp_attribute_t *tmp_attribute; /* for examining attribs */
+ int rc = FO_PRINTER_GOOD; /* return code */
+ char *reason; /* printer state reason */
+ int i;
+
+ fprintf(stderr, "DEBUG: Checking printer %s\n",device_uri);
+
+ rc = get_printer_attributes(device_uri, &attributes);
+ if ( rc != CUPS_BACKEND_OK )
+ {
+ fprintf(stderr, "DEBUG: Failed to get attributes from printer: %s\n",
+ device_uri);
+ if ( rc == CUPS_BACKEND_AUTH_REQUIRED )
+ return (FO_AUTH_REQUIRED);
+ else
+ return (FO_PRINTER_BAD);
+ }
+
+ /*
+ * Check if printer is accepting jobs
+ */
+ if ((tmp_attribute = ippFindAttribute(attributes,
+ "printer-is-accepting-jobs",
+ IPP_TAG_BOOLEAN)) != NULL &&
+ !tmp_attribute->values[0].boolean)
+ {
+ fprintf(stderr,
+ "DEBUG: Printer, %s, is not accepting jobs.\n",
+ device_uri);
+
+ rc = FO_PRINTER_BAD;
+ }
+
+ /*
+ * Check if printer is stopped or busy processing
+ */
+ if ((tmp_attribute = ippFindAttribute(attributes,
+ "printer-state",
+ IPP_TAG_ENUM)) != NULL)
+ {
+ // Printer Stopped
+ if ( tmp_attribute->values[0].integer == IPP_PRINTER_STOPPED )
+ {
+ fprintf(stderr, "DEBUG: Printer, %s, stopped.\n", device_uri);
+ rc = FO_PRINTER_BAD;
+ }
+ // Printer Busy
+ else if ( tmp_attribute->values[0].integer == IPP_PRINTER_PROCESSING )
+ {
+ fprintf(stderr, "DEBUG: Printer %s is busy.\n", device_uri);
+ rc = FO_PRINTER_BUSY;
+ }
+ }
+
+ /*
+ * Parse through the printer-state-reasons
+ */
+ if ((tmp_attribute = ippFindAttribute(attributes, "printer-state-reasons",
+ IPP_TAG_KEYWORD)) != NULL)
+ {
+ for (i = 0; i < tmp_attribute->num_values; i++)
+ {
+ reason = tmp_attribute->values[i].string.text;
+ int len = strlen(reason);
+
+ if (len > 8 && !strcmp(reason + len - 8, "-warning"))
+ {
+ fprintf(stderr, "DEBUG: Printer Supply Warning, %s\n", reason);
+ rc = FO_PRINTER_BAD;
+ }
+ else if (len > 6 && !strcmp(reason + len - 6, "-error"))
+ {
+ fprintf(stderr, "DEBUG: Printer Supply Error, %s\n", reason);
+ rc = FO_PRINTER_BAD;
+ }
+ }
+ }
+
+ return (rc);
+}
+
+/*
+ * 'read_config()' - Parses the failover and failover-retries options
+ *
+ */
+static int
+read_config(cups_array_t *printer_array, int *retries, const char *options)
+{
+
+ const char *tmp; /* temporary ptr */
+ char *tok_tmp; /* temporary ptr for option parsing */
+ int jobopts_count = 0; /* number of options */
+ cups_option_t *jobopts = NULL; /* job options */
+
+
+ fprintf(stderr, "DEBUG: Reading Configuration.\n");
+ jobopts_count = cupsParseOptions(options, 0, &jobopts);
+
+ if (!jobopts_count)
+ {
+ fprintf(stderr,
+ "ERROR: No job options! Cannot find failover options!\n");
+ return (CUPS_BACKEND_STOP);
+ }
+
+ /*
+ * Get attributes from the primary printer
+ */
+ fprintf(stderr, "DEBUG: Searching for failover option.\n");
+
+ if ((tmp = cupsGetOption("failover", jobopts_count, jobopts)) != NULL)
+ {
+ fprintf(stderr, "DEBUG: Failover option contents: %s.\n", tmp);
+
+ tok_tmp = strdup(tmp);
+
+ tmp = strtok(tok_tmp, ",");
+ do
+ {
+ cupsArrayAdd(printer_array, strdup(tmp));
+ } while ((tmp = strtok(NULL,",")) != NULL);
+
+ free(tok_tmp);
+ }
+ else
+ {
+ /*
+ * The queue is misconfigured, so return back CUPS_BACKEND_STOP
+ */
+ fprintf(stderr, "ERROR: failover option not specified!\n");
+ return (CUPS_BACKEND_STOP);
+ }
+
+ /*
+ * Get the failover-retries value, if it exists.
+ */
+ fprintf(stderr, "DEBUG: Searching for failover-retries option.\n");
+
+ if ((tmp = cupsGetOption("failover-retries",
+ jobopts_count, jobopts)) != NULL)
+ {
+ fprintf(stderr, "DEBUG: failover-retries option contents: %s.\n", tmp);
+ *retries = atoi(tmp);
+ }
+ else
+ {
+ *retries = FAILOVER_DEFAULT_RETRIES;
+ fprintf(stderr, "DEBUG: Failed to get failover-retries option\n");
+ fprintf(stderr, "DEBUG: Defaulted to %d retries\n", *retries);
+ }
+
+ return (CUPS_BACKEND_OK);
+}
+
+/*
+ * 'get_printer_attributes()' - Sends an IPP Get-Attributes request to
+ * a URI
+ */
+int
+get_printer_attributes(const char *device_uri, ipp_t **attributes)
+{
+ char uri[HTTP_MAX_URI]; /* Updated URI without login */
+ int version; /* IPP version */
+ char scheme[256]; /* Scheme in URI */
+ ipp_status_t ipp_status; /* Status of IPP request */
+ char hostname[1024]; /* Hostname */
+ char resource[1024]; /* Resource infoo */
+ char addrname[256]; /* Address name */
+ int port; /* IPP Port number */
+ char portname[255]; /* Port as string */
+ http_t *http; /* HTTP connection */
+ ipp_t *request; /* IPP request */
+ int rc = CUPS_BACKEND_OK; /* Return Code */
+ char username[256]; /* Username for device URI */
+ char *option_ptr; /* for parsing resource opts */
+ const char * const pattrs[] = /* Printer attributes wanted */
+ {
+ "printer-is-accepting-jobs",
+ "printer-state",
+ "printer-state-reasons"
+ };
+
+ if (job_canceled)
+ return (CUPS_BACKEND_OK);
+
+ fprintf(stderr, "DEBUG: Getting Printer Attributes.\n");
+ fprintf(stderr, "DEBUG: Device URL %s.\n", device_uri);
+
+ /*
+ * Parse device_uri
+ */
+ if (httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
+ username, sizeof(username), hostname, sizeof(hostname),
+ &port, resource, sizeof(resource)) != HTTP_URI_OK)
+ {
+ fprintf(stderr, "ERROR: Problem parsing device_uri, %s\n", device_uri);
+ return (CUPS_BACKEND_STOP);
+ }
+
+ if (!port)
+ port = IPP_PORT;
+
+ sprintf(portname, "%d", port);
+
+ fprintf(stderr, "DEBUG: Getting Printer Attributes.\n");
+
+ /*
+ * Configure password
+ */
+ cupsSetPasswordCB(password_cb);
+
+ /*
+ * reset, in case a previous attempt for
+ * another printer left residue
+ */
+ cupsSetUser(NULL);
+ password = NULL;
+ password_retries = 0;
+
+ if (*username)
+ {
+ if ((password = strchr(username, ':')) != NULL)
+ {
+ *password = '\0';
+ password++;
+ }
+
+ cupsSetUser(username);
+ }
+ else if (!getuid())
+ {
+ const char *username_env;
+
+ if ((username_env = getenv("AUTH_USERNAME")) != NULL)
+ {
+ cupsSetUser(username_env);
+ password = getenv("AUTH_PASSWORD");
+ }
+ }
+
+ /*
+ * Try connecting to the remote server...
+ */
+ fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
+ _cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
+
+ http = httpConnectEncrypt(hostname, port, cupsEncryption());
+
+ /*
+ * Deal the socket not being open.
+ */
+ if (!http)
+ {
+ int error = errno; /* Connection error */
+
+ switch (error)
+ {
+ case EHOSTDOWN :
+ _cupsLangPuts(stderr, _("WARNING: "
+ "The printer may not exist or "
+ "is unavailable at this time.\n"));
+ break;
+ case EHOSTUNREACH :
+ _cupsLangPuts(stderr, _("WARNING: "
+ "The printer is unreachable at this "
+ "time.\n"));
+ break;
+ case ECONNREFUSED :
+ _cupsLangPuts(stderr, _("WARNING: "
+ "Connection Refused.\n"));
+ break;
+ default :
+ fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
+ break;
+ }
+
+ rc = CUPS_BACKEND_FAILED;
+ sleep(5);
+ goto prt_available_cleanup;
+ }
+
+
+#ifdef AF_INET6
+ if (http->hostaddr->addr.sa_family == AF_INET6)
+ fprintf(stderr, "DEBUG: Connected to [%s]:%d (IPv6)...\n",
+ httpAddrString(http->hostaddr, addrname, sizeof(addrname)),
+ ntohs(http->hostaddr->ipv6.sin6_port));
+ else
+#endif /* AF_INET6 */
+ if (http->hostaddr->addr.sa_family == AF_INET)
+ fprintf(stderr, "DEBUG: Connected to %s:%d (IPv4)...\n",
+ httpAddrString(http->hostaddr, addrname, sizeof(addrname)),
+ ntohs(http->hostaddr->ipv4.sin_port));
+
+ /*
+ * Search the resource string for options.
+ * We only care about version, for the moment.
+ */
+ version = 11;
+
+ if ((option_ptr = strchr(resource, '?')) != NULL)
+ {
+ *option_ptr++ = '\0';
+
+ if ((option_ptr = strstr(option_ptr, "version="))!=NULL)
+ {
+ int minor; /* minor version from URI */
+ int major; /* major version from URI */
+ char *version_str; /* ipp version */
+
+ option_ptr += 8;
+ version_str = option_ptr;
+
+ while (*option_ptr && *option_ptr != '&' && *option_ptr != '+')
+ option_ptr++;
+
+ if (*option_ptr)
+ *option_ptr = '\0';
+
+ sscanf(version_str, "%d.%d", &major, &minor);
+
+ version = (major * 10) + minor;
+
+ switch(version)
+ {
+ case 10 :
+ case 11 :
+ case 20 :
+ case 21 :
+ fprintf(stderr,
+ "DEBUG: Set version to %d from URI\n",
+ version);
+ break;
+ default :
+ _cupsLangPrintf(stderr,
+ _("DEBUG: Invalid version, %d, from URI. "
+ "Using default of 1.1 \n"),
+ version);
+ version = 11;
+ }
+ }
+ }
+
+
+ /*
+ * Build a URI for the printer. We can't use the URI in argv[0]
+ * because it might contain username:password information...
+ */
+ if (httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), scheme, NULL,
+ hostname, port, resource) != HTTP_URI_OK)
+ {
+ fprintf(stderr, "ERROR: Problem assembling printer URI from host %s, "
+ "port %d, resource %s\n", hostname, port, resource);
+ return (CUPS_BACKEND_STOP);
+ }
+
+ /*
+ * Build the IPP request...
+ */
+ request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
+ request->request.op.version[0] = version / 10;
+ request->request.op.version[1] = version % 10;
+
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+ NULL, uri);
+
+ ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
+ "requested-attributes", sizeof(pattrs) / sizeof(pattrs[0]),
+ NULL, pattrs);
+
+ /*
+ * Do the request...
+ */
+ fputs("DEBUG: Getting supported attributes...\n", stderr);
+
+ fprintf(stderr, "DEBUG: IPP Request Structure Built.\n");
+
+ *attributes = cupsDoRequest(http, request, resource);
+ ipp_status = cupsLastError();
+
+ fprintf(stderr, "DEBUG: Get-Printer-Attributes: %s (%s)\n",
+ ippErrorString(ipp_status), cupsLastErrorString());
+
+ if (ipp_status > IPP_OK_CONFLICT)
+ {
+ fprintf(stderr, "DEBUG: Get-Printer-Attributes returned %s.\n",
+ ippErrorString(ipp_status));
+ switch(ipp_status)
+ {
+ case IPP_FORBIDDEN :
+ case IPP_NOT_AUTHORIZED :
+ _cupsLangPuts(stderr, _("ERROR: Not Authorized.\n"));
+ rc = CUPS_BACKEND_AUTH_REQUIRED;
+ break;
+ case IPP_PRINTER_BUSY :
+ case IPP_SERVICE_UNAVAILABLE :
+ _cupsLangPuts(stderr, _("ERROR: "
+ "The printer is not responding.\n"));
+ rc = CUPS_BACKEND_FAILED;
+ break;
+ case IPP_BAD_REQUEST :
+ case IPP_VERSION_NOT_SUPPORTED :
+ fprintf(stderr, "ERROR: Destination does not support IPP version %d\n",
+ version);
+ case IPP_NOT_FOUND :
+ _cupsLangPuts(stderr, _("ERROR: "
+ "The printer configuration is incorrect or the "
+ "printer no longer exists.\n"));
+ rc = CUPS_BACKEND_STOP;
+ break;
+ default :
+ rc = CUPS_BACKEND_FAILED;
+ }
+ goto prt_available_cleanup;
+ }
+
+prt_available_cleanup :
+ httpClose(http);
+ return (rc);
+}
+
+static int
+move_job(int jobid, /* Job ID */
+ const char *dest) /* Destination ipp address */
+{
+ ipp_t *request; /* IPP Request */
+ char job_uri[HTTP_MAX_URI]; /* job-uri */
+
+ http_t* http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
+
+ if (!http)
+ {
+ _cupsLangPrintf(stderr,
+ _("failover: Unable to connect to server: %s\n"),
+ strerror(errno));
+ return (CUPS_BACKEND_FAILED);
+ }
+
+ /*
+ * Build a CUPS_MOVE_JOB request, which requires the following
+ * attributes:
+ *
+ * job-uri/printer-uri
+ * job-printer-uri
+ * requesting-user-name
+ */
+
+ request = ippNewRequest(CUPS_MOVE_JOB);
+
+ snprintf(job_uri, sizeof(job_uri), "ipp://localhost/jobs/%d", jobid);
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL,
+ job_uri);
+
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+ "requesting-user-name",
+ NULL, cupsUser());
+
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri",
+ NULL, dest);
+
+ /*
+ * Do the request and get back a response...
+ */
+
+ ippDelete(cupsDoRequest(http, request, "/jobs"));
+
+ httpClose(http);
+
+ if (cupsLastError() > IPP_OK_CONFLICT)
+ {
+ _cupsLangPrintf(stderr, "failover: %s\n", cupsLastErrorString());
+ return (CUPS_BACKEND_FAILED);
+ }
+ else
+ return (CUPS_BACKEND_OK);
+}
+
+/*
+ * 'sigterm_handler()' - handles a sigterm, i.e. job canceled
+ */
+static void
+sigterm_handler(int sig)
+{
+ if (!job_canceled)
+ {
+ write(2, "DEBUG: Got SIGTERM.\n", 20);
+ job_canceled = 1;
+ }
+ else
+ {
+ /*
+ * Job has already been canceled, so just exit
+ */
+ exit(1);
+ }
+}
+
+/*
+ * 'password_cb()' - Disable the password prompt for cupsDoFileRequest().
+ */
+static const char * /* O - Password */
+password_cb(const char *prompt) /* I - Prompt (not used) */
+{
+ auth_info_required = "username,password";
+ password_retries++;
+
+ if(password_retries < FAILOVER_PASSWORD_RETRIES_MAX)
+ return (password);
+ else
+ return (NULL);
+}
diff -up cups-2.4.0/backend/Makefile.failover cups-2.4.0/backend/Makefile
--- cups-2.4.0/backend/Makefile.failover 2021-11-29 15:27:31.000000000 +0100
+++ cups-2.4.0/backend/Makefile 2021-12-15 11:08:27.433009704 +0100
@@ -25,6 +25,7 @@ RBACKENDS = \
ipp \
lpd \
usb \
+ failover \
$(DNSSD_BACKEND)
UBACKENDS = \
snmp \
@@ -45,6 +46,7 @@ LIBOBJS = \
OBJS = \
ipp.o \
lpd.o \
+ failover.o \
dnssd.o \
snmp.o \
socket.o \
@@ -264,6 +266,15 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend
#
+# failover
+#
+
+failover: failover.o ../cups/$(LIBCUPS) libbackend.a
+ echo Linking $@...
+ $(LD_CC) $(ALL_LDFLAGS) -o failover failover.o libbackend.a $(LINKCUPS)
+
+
+#
# snmp
#

@ -0,0 +1,44 @@
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index e0f1136..02ff51d 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -636,7 +636,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
};
- ptr = cgiGetTextfield("DEVICE_URI");
+ ptr = cgiGetVariable("DEVICE_URI");
fprintf(stderr, "DEBUG: do_am_printer: DEVICE_URI=\"%s\"\n",
ptr ? ptr : "(null)");
@@ -697,7 +697,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
}
}
- if ((var = cgiGetTextfield("DEVICE_URI")) != NULL)
+ if ((var = cgiGetVariable("DEVICE_URI")) != NULL)
{
if ((uriptr = strrchr(var, '|')) != NULL)
{
@@ -1130,7 +1130,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info",
NULL, cgiGetTextfield("PRINTER_INFO"));
- strlcpy(uri, cgiGetTextfield("DEVICE_URI"), sizeof(uri));
+ strlcpy(uri, cgiGetVariable("DEVICE_URI"), sizeof(uri));
/*
* Strip make and model from URI...
diff --git a/cgi-bin/var.c b/cgi-bin/var.c
index 6ad945d..a4993ff 100644
--- a/cgi-bin/var.c
+++ b/cgi-bin/var.c
@@ -288,7 +288,7 @@ cgiGetTextfield(const char *name) /* I - Name of form field */
value = NULL;
}
- return (value);
+ return (value ? strdup(value) : NULL);
}

@ -0,0 +1,15 @@
diff -up cups-2.0.2/cups/http-addr.c.freebind cups-2.0.2/cups/http-addr.c
--- cups-2.0.2/cups/http-addr.c.freebind 2015-02-10 14:46:33.000000000 +0100
+++ cups-2.0.2/cups/http-addr.c 2015-02-10 14:50:35.074759141 +0100
@@ -186,6 +186,10 @@ httpAddrListen(http_addr_t *addr, /* I -
val = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, CUPS_SOCAST &val, sizeof(val));
+#ifdef __linux
+ setsockopt(fd, IPPROTO_IP, IP_FREEBIND, CUPS_SOCAST &val, sizeof(val));
+#endif /* __linux */
+
#ifdef IPV6_V6ONLY
if (addr->addr.sa_family == AF_INET6)
setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, CUPS_SOCAST &val, sizeof(val));
diff -up cups-2.0.2/scheduler/listen.c.freebind cups-2.0.2/scheduler/listen.c

@ -0,0 +1,15 @@
diff -up cups-1.7.0/backend/ipp.c.ipp-multifile cups-1.7.0/backend/ipp.c
--- cups-1.7.0/backend/ipp.c.ipp-multifile 2013-10-24 15:52:00.745814354 +0100
+++ cups-1.7.0/backend/ipp.c 2013-10-24 15:53:46.463266724 +0100
@@ -1758,7 +1758,10 @@ main(int argc, /* I - Number of comm
ippAddBoolean(request, IPP_TAG_OPERATION, "last-document",
(i + 1) >= num_files);
- if (document_format)
+ if (num_files > 1)
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
+ "document-format", NULL, "application/octet-stream");
+ else if (document_format)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"document-format", NULL, document_format);

File diff suppressed because it is too large Load Diff

@ -0,0 +1,14 @@
diff -up cups-2.3.0/cups-config.in.multilib cups-2.3.0/cups-config.in
--- cups-2.3.0/cups-config.in.multilib 2019-10-07 12:10:09.508859587 +0200
+++ cups-2.3.0/cups-config.in 2019-10-07 12:11:56.614025934 +0200
@@ -17,7 +17,9 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
includedir=@includedir@
-libdir=@libdir@
+# Fetch libdir from gnutls's pkg-config script. This is a bit
+# of a cheat, but the cups-devel package requires gnutls-devel anyway.
+libdir=`pkg-config --variable=libdir gnutls`
datarootdir=@datadir@
datadir=@datadir@
sysconfdir=@sysconfdir@

@ -0,0 +1,10 @@
diff -up cups-2.2b2/config-scripts/cups-tls.m4.no-export-ssllibs cups-2.2b2/config-scripts/cups-tls.m4
--- cups-2.2b2/config-scripts/cups-tls.m4.no-export-ssllibs 2016-06-27 15:06:22.299980753 +0200
+++ cups-2.2b2/config-scripts/cups-tls.m4 2016-06-27 15:08:00.953154042 +0200
@@ -102,5 +102,5 @@ AC_SUBST([IPPALIASES])
AC_SUBST([TLSFLAGS])
AC_SUBST([TLSLIBS])
-EXPORT_TLSLIBS="$TLSLIBS"
+EXPORT_TLSLIBS=""
AC_SUBST([EXPORT_TLSLIBS])

@ -0,0 +1,51 @@
diff -up cups-1.5b1/backend/usb-unix.c.uri-compat cups-1.5b1/backend/usb-unix.c
--- cups-1.5b1/backend/usb-unix.c.uri-compat 2011-05-24 15:59:05.000000000 +0200
+++ cups-1.5b1/backend/usb-unix.c 2011-05-24 16:02:03.000000000 +0200
@@ -63,11 +63,34 @@ print_device(const char *uri, /* I - De
int device_fd; /* USB device */
ssize_t tbytes; /* Total number of bytes written */
struct termios opts; /* Parallel port options */
+ char *fixed_uri = strdup (uri);
+ char *p;
(void)argc;
(void)argv;
+ p = strchr (fixed_uri, ':');
+ if (p++ != NULL)
+ {
+ char *e;
+ p += strspn (p, "/");
+ e = strchr (p, '/');
+ if (e > p)
+ {
+ size_t mfrlen = e - p;
+ e++;
+ if (!strncasecmp (e, p, mfrlen))
+ {
+ char *x = e + mfrlen;
+ if (!strncmp (x, "%20", 3))
+ /* Take mfr name out of mdl name for compatibility with
+ * Fedora 11 before bug #507244 was fixed. */
+ strcpy (e, x + 3); puts(fixed_uri);
+ }
+ }
+ }
+
/*
* Open the USB port device...
*/
@@ -107,10 +130,10 @@ print_device(const char *uri, /* I - De
_cups_strncasecmp(hostname, "Minolta", 7);
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
- if (use_bc && !strncmp(uri, "usb:/dev/", 9))
+ if (use_bc && !strncmp(fixed_uri, "usb:/dev/", 9))
use_bc = 0;
- if ((device_fd = open_device(uri, &use_bc)) == -1)
+ if ((device_fd = open_device(fixed_uri, &use_bc)) == -1)
{
if (getenv("CLASS") != NULL)
{

@ -0,0 +1,52 @@
diff -up cups-1.5b1/backend/usb-unix.c.usb-paperout cups-1.5b1/backend/usb-unix.c
--- cups-1.5b1/backend/usb-unix.c.usb-paperout 2011-05-24 15:51:39.000000000 +0200
+++ cups-1.5b1/backend/usb-unix.c 2011-05-24 15:51:39.000000000 +0200
@@ -30,6 +30,11 @@
#include <sys/select.h>
+#ifdef __linux
+#include <sys/ioctl.h>
+#include <linux/lp.h>
+#endif /* __linux */
+
/*
* Local functions...
@@ -334,7 +339,19 @@ open_device(const char *uri, /* I - Dev
if (!strncmp(uri, "usb:/dev/", 9))
#ifdef __linux
{
- return (open(uri + 4, O_RDWR | O_EXCL));
+ fd = open(uri + 4, O_RDWR | O_EXCL);
+
+ if (fd != -1)
+ {
+ /*
+ * Tell the driver to return from write() with errno==ENOSPACE
+ * on paper-out.
+ */
+ unsigned int t = 1;
+ ioctl (fd, LPABORT, &t);
+ }
+
+ return fd;
}
else if (!strncmp(uri, "usb://", 6))
{
@@ -400,7 +417,14 @@ open_device(const char *uri, /* I - Dev
if (!strcmp(uri, device_uri))
{
/*
- * Yes, return this file descriptor...
+ * Yes, tell the driver to return from write() with
+ * errno==ENOSPACE on paper-out.
+ */
+ unsigned int t = 1;
+ ioctl (fd, LPABORT, &t);
+
+ /*
+ * Return this file descriptor...
*/
fprintf(stderr, "DEBUG: Printer using device file \"%s\"...\n",

@ -0,0 +1,19 @@
diff -up cups-1.7rc1/cgi-bin/admin.c.web-devices-timeout cups-1.7rc1/cgi-bin/admin.c
--- cups-1.7rc1/cgi-bin/admin.c.web-devices-timeout 2013-05-29 12:51:34.000000000 +0100
+++ cups-1.7rc1/cgi-bin/admin.c 2013-08-16 16:01:17.308264287 +0100
@@ -1019,13 +1019,13 @@ do_am_printer(http_t *http, /* I - HTTP
}
/*
- * Scan for devices for up to 30 seconds...
+ * Scan for devices for up to 10 seconds...
*/
fputs("DEBUG: Getting list of devices...\n", stderr);
current_device = 0;
- if (cupsGetDevices(http, 5, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
+ if (cupsGetDevices(http, 10, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
(cups_device_cb_t)choose_device_cb,
(void *)title) == IPP_OK)
{

@ -0,0 +1,3 @@
%_cups_serverbin %(/usr/bin/pkg-config --variable=cups_serverbin cups)
%_cups_datadir %(/usr/bin/pkg-config --variable=cups_datadir cups)
%_cups_serverroot %(/usr/bin/pkg-config --variable=cups_serverroot cups)

@ -0,0 +1,171 @@
@PYTHON_SHEBANG@
"""
Upgrade script to enable authentication for CUPS-Get-Document in
default policy
"""
import os
import sys
from shutil import copy
def get_cupsd_conf():
"""
Get all lines from cupsd.conf
"""
if not os.path.exists('/etc/cups/cupsd.conf'):
return None
lines = []
with open('/etc/cups/cupsd.conf', 'r') as conf:
lines = conf.readlines()
return lines
def get_default_policy(lines):
"""
Get the default policy lines
:param list lines: lines from cupsd.conf
"""
default_policy = []
in_policy = False
for line in lines:
if not in_policy and not line.lstrip().startswith('<Policy default>'):
continue
default_policy.append(line)
if line.lstrip().startswith('</Policy>'):
return default_policy
in_policy = True
return default_policy
def get_limit_with_document(lines):
"""
Get <Limit> scope which defines CUPS-Get-Document operation
:param list lines: Lines containing the default policy
"""
limit = []
in_limit = False
for line in lines:
if not in_limit and not line.lstrip().startswith('<Limit'):
continue
if (not in_limit and line.lstrip().startswith('<Limit') and
not 'CUPS-Get-Document' in line.lstrip().split('#')[0][1:-1]):
continue
limit.append(line)
if line.lstrip().startswith('</Limit>'):
return limit
in_limit = True
return limit
def check_for_authtype(lines):
"""
Check if <Limit> defining CUPS-Get-Document defines
any authentication
:param list lines: Lines of <Limit> scope which defines CUPS-Get-Document
"""
for line in lines:
if line.lstrip().startswith('AuthType'):
return True
return False
def migrate_cupsd_conf(lines):
"""
Make changes to cupsd.conf contents to use authentication
for CUPS-Get-Document
:param list lines: Lines from cupsd.conf
"""
new_lines = []
in_policy = False
create_document_limit = False
for line in lines:
if (in_policy and line.lstrip().startswith('<Limit') and
not line.lstrip().startswith('<Limit CUPS-Get-Document>') and
'CUPS-Get-Document' in line.lstrip().split('#')[0][1:-1]):
line = line.replace(' CUPS-Get-Document', '')
create_document_limit = True
if in_policy and line.lstrip().startswith('</Policy>') and create_document_limit:
new_lines.append('\n')
new_lines.append((len(line) - len(line.lstrip()) + 2) * ' ' +
'# added during upgrade\n')
new_lines.append((len(line) - len(line.lstrip()) + 2) * ' ' +
'<Limit CUPS-Get-Document>\n')
new_lines.append((len(line) - len(line.lstrip()) + 4) * ' ' +
'AuthType Default\n')
new_lines.append((len(line) - len(line.lstrip()) + 4) * ' ' +
'Require user @OWNER @SYSTEM\n')
new_lines.append((len(line) - len(line.lstrip()) + 4) * ' ' +
'Order deny,allow\n')
new_lines.append((len(line) - len(line.lstrip()) + 2) * ' ' +
'</Limit>\n')
create_document_limit = False
new_lines.append(line)
if not in_policy:
if line.lstrip().startswith('<Policy default>'):
in_policy = True
continue
if line.lstrip().startswith('<Limit CUPS-Get-Document>'):
new_lines.append((len(line) - len(line.lstrip()) + 2) * ' ' +
'# added during upgrade\n')
new_lines.append((len(line) - len(line.lstrip()) + 2) * ' ' +
'AuthType Default\n')
continue
if line.lstrip().startswith('</Policy>'):
in_policy = False
continue
return new_lines
def apply_changes(lines):
"""
Backup the original file if there is no .rpmsave already and
apply changes to the actual cupsd.conf
:param list lines: New lines for cupsd.conf
"""
if not os.path.exists('/etc/cups/cupsd.conf.rpmsave'):
copy('/etc/cups/cupsd.conf', '/etc/cups/cupsd.conf.rpmsave')
with open('/etc/cups/cupsd.conf', 'w') as conf:
conf.writelines(lines)
content = get_cupsd_conf()
if content is None:
sys.exit(1)
if check_for_authtype(get_limit_with_document(get_default_policy(content))):
sys.exit(0)
new_content = migrate_cupsd_conf(content)
apply_changes(new_content)
sys.exit(0)

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save