Compare commits

...

No commits in common. 'c9' and 'c10-beta' have entirely different histories.
c9 ... c10-beta

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

2
.gitignore vendored

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

@ -1,33 +0,0 @@
diff -up cups-2.3.3op2/conf/cupsd.conf.in.idleexittimeout cups-2.3.3op2/conf/cupsd.conf.in
--- cups-2.3.3op2/conf/cupsd.conf.in.idleexittimeout 2021-02-01 22:10:25.000000000 +0100
+++ cups-2.3.3op2/conf/cupsd.conf.in 2021-11-29 11:37:02.426407322 +0100
@@ -28,6 +28,9 @@ DefaultAuthType Basic
# Web interface setting...
WebInterface @CUPS_WEBIF@
+# Timeout after cupsd exits if idle (applied only if cupsd runs on-demand - with -l)
+IdleExitTimeout @EXIT_TIMEOUT@
+
# Restrict access to the server...
<Location />
Order allow,deny
diff -up cups-2.3.3op2/config-scripts/cups-defaults.m4.idleexittimeout cups-2.3.3op2/config-scripts/cups-defaults.m4
--- cups-2.3.3op2/config-scripts/cups-defaults.m4.idleexittimeout 2021-11-29 11:37:02.426407322 +0100
+++ cups-2.3.3op2/config-scripts/cups-defaults.m4 2021-11-29 11:39:16.629262421 +0100
@@ -461,3 +461,16 @@ esac
AC_SUBST(CUPS_WEBIF)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_WEBIF, $CUPS_DEFAULT_WEBIF)
+
+dnl Set default value of IdleExitTimeout
+AC_ARG_WITH([idle_exit_timeout], AS_HELP_STRING([--with-idle-exit-timeout], [set the default value for IdleExitTimeout, default=60]), [
+ AS_IF([test "x$withval" = "xno"], [
+ EXIT_TIMEOUT=0
+ ], [
+ EXIT_TIMEOUT=$withval
+ ])
+], [
+ EXIT_TIMEOUT=60
+])
+
+AC_SUBST([EXIT_TIMEOUT])

@ -1,33 +0,0 @@
diff -up cups-2.3.3op2/config-scripts/cups-defaults.m4.conf-timeoutstartsec cups-2.3.3op2/config-scripts/cups-defaults.m4
--- cups-2.3.3op2/config-scripts/cups-defaults.m4.conf-timeoutstartsec 2021-11-29 13:50:14.568976028 +0100
+++ cups-2.3.3op2/config-scripts/cups-defaults.m4 2021-11-29 13:51:02.785567762 +0100
@@ -482,3 +482,18 @@ AC_ARG_WITH([idle_exit_timeout], AS_HELP
])
AC_SUBST([EXIT_TIMEOUT])
+
+dnl set TimeoutStartSec for cups.service
+dnl - if used as --without-*, it sets TimeoutStartSec to infinity
+AC_ARG_WITH([systemd-timeoutstartsec],
+ AS_HELP_STRING([--with-systemd-timeoutstartsec],
+ [set TimeoutStartSec value in cups.service, default=default value in systemd]), [
+ AS_IF([ test "x$withval" = "xno" ], [
+ TIMEOUTSTARTSEC="TimeoutStartSec=infinity"
+ ], [
+ TIMEOUTSTARTSEC="TimeoutStartSec=$withval"
+ ])
+], [
+ TIMEOUTSTARTSEC=""
+])
+AC_SUBST([TIMEOUTSTARTSEC])
diff -up cups-2.3.3op2/scheduler/cups.service.in.conf-timeoutstartsec cups-2.3.3op2/scheduler/cups.service.in
--- cups-2.3.3op2/scheduler/cups.service.in.conf-timeoutstartsec 2021-11-29 13:50:14.551976172 +0100
+++ cups-2.3.3op2/scheduler/cups.service.in 2021-11-29 13:50:14.568976028 +0100
@@ -8,6 +8,7 @@ Requires=cups.socket
ExecStart=@sbindir@/cupsd -l
Type=notify
Restart=on-failure
+@TIMEOUTSTARTSEC@
[Install]
Also=cups.socket cups.path

@ -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

@ -1,21 +0,0 @@
diff -up cups-2.3.3op2/backend/lpd.c.lpd-delay cups-2.3.3op2/backend/lpd.c
--- cups-2.3.3op2/backend/lpd.c.lpd-delay 2021-02-01 22:10:25.000000000 +0100
+++ cups-2.3.3op2/backend/lpd.c 2023-06-28 17:28:52.465476261 +0200
@@ -63,7 +63,7 @@ static int abort_job = 0; /* Non-zero i
#define RESERVE_NONE 0 /* Don't reserve a priviledged port */
#define RESERVE_RFC1179 1 /* Reserve port 721-731 */
-#define RESERVE_ANY 2 /* Reserve port 1-1023 */
+#define RESERVE_ANY 2 /* Reserve port 512-1023 */
/*
@@ -778,7 +778,7 @@ lpd_queue(const char *hostname, /*
if (lport < 721 && reserve == RESERVE_RFC1179)
lport = 731;
- else if (lport < 1)
+ else if (lport < 512)
lport = 1023;
#ifdef HAVE_GETEUID

@ -1,86 +0,0 @@
diff --git a/cups/http-addr.c b/cups/http-addr.c
index 86749c848..5b035e02b 100644
--- a/cups/http-addr.c
+++ b/cups/http-addr.c
@@ -196,31 +196,29 @@ httpAddrListen(http_addr_t *addr, /* I - Address to bind to */
{
mode_t mask; /* Umask setting */
- /*
- * Remove any existing domain socket file...
- */
-
- unlink(addr->un.sun_path);
-
- /*
- * Save the current umask and set it to 0 so that all users can access
- * the domain socket...
- */
-
- mask = umask(0);
-
- /*
- * Bind the domain socket...
- */
+ // Remove any existing domain socket file...
+ if ((status = unlink(addr->un.sun_path)) < 0)
+ {
+ DEBUG_printf(("1httpAddrListen: Unable to unlink \"%s\": %s", addr->un.sun_path, strerror(errno)));
+ if (errno == ENOENT)
+ status = 0;
+ }
- status = bind(fd, (struct sockaddr *)addr, (socklen_t)httpAddrLength(addr));
+ if (!status)
+ {
+ // Save the current umask and set it to 0 so that all users can access
+ // the domain socket...
+ mask = umask(0);
- /*
- * Restore the umask and fix permissions...
- */
+ // Bind the domain socket...
+ if ((status = bind(fd, (struct sockaddr *)addr, (socklen_t)httpAddrLength(addr))) < 0)
+ {
+ DEBUG_printf(("1httpAddrListen: Unable to bind domain socket \"%s\": %s", addr->un.sun_path, strerror(errno)));
+ }
- umask(mask);
- chmod(addr->un.sun_path, 0140777);
+ // Restore the umask...
+ umask(mask);
+ }
}
else
#endif /* AF_LOCAL */
diff --git a/scheduler/conf.c b/scheduler/conf.c
index bb6049b2c..4c703c9b9 100644
--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -3062,6 +3062,25 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
cupsd_listener_t *lis; /* New listeners array */
+ /*
+ * If we are launched on-demand, do not use domain sockets from the config
+ * file. Also check that the domain socket path is not too long...
+ */
+
+#ifdef HAVE_ONDEMAND
+ if (*value == '/' && OnDemand)
+ {
+ if (strcmp(value, CUPS_DEFAULT_DOMAINSOCKET))
+ cupsdLogMessage(CUPSD_LOG_INFO, "Ignoring %s address %s at line %d - only using domain socket from launchd/systemd.", line, value, linenum);
+ continue;
+ }
+#endif // HAVE_ONDEMAND
+
+ if (*value == '/' && strlen(value) > (sizeof(addr->addr.un.sun_path) - 1))
+ {
+ cupsdLogMessage(CUPSD_LOG_INFO, "Ignoring %s address %s at line %d - too long.", line, value, linenum);
+ continue;
+ }
/*
* Get the address list...

@ -1,64 +0,0 @@
From ffd290b4ab247f82722927ba9b21358daa16dbf1 Mon Sep 17 00:00:00 2001
From: Rose <83477269+AtariDreams@users.noreply.github.com>
Date: Thu, 1 Jun 2023 11:33:39 -0400
Subject: [PATCH] Log result of httpGetHostname BEFORE closing the connection
httpClose frees the memory of con->http. This is problematic because httpGetHostname then tries to access the memory it points to.
We have to log the hostname first.
---
scheduler/client.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/scheduler/client.c b/scheduler/client.c
index 91e441188..327473a4d 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -193,13 +193,11 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
/*
* Can't have an unresolved IP address with double-lookups enabled...
*/
-
- httpClose(con->http);
-
cupsdLogClient(con, CUPSD_LOG_WARN,
- "Name lookup failed - connection from %s closed!",
+ "Name lookup failed - closing connection from %s!",
httpGetHostname(con->http, NULL, 0));
+ httpClose(con->http);
free(con);
return;
}
@@ -235,11 +233,11 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
* with double-lookups enabled...
*/
- httpClose(con->http);
-
cupsdLogClient(con, CUPSD_LOG_WARN,
- "IP lookup failed - connection from %s closed!",
+ "IP lookup failed - closing connection from %s!",
httpGetHostname(con->http, NULL, 0));
+
+ httpClose(con->http);
free(con);
return;
}
@@ -256,11 +254,11 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
if (!hosts_access(&wrap_req))
{
- httpClose(con->http);
-
cupsdLogClient(con, CUPSD_LOG_WARN,
"Connection from %s refused by /etc/hosts.allow and "
"/etc/hosts.deny rules.", httpGetHostname(con->http, NULL, 0));
+
+ httpClose(con->http);
free(con);
return;
}
--
2.41.0

@ -1,31 +0,0 @@
From a0c8b9c9556882f00c68b9727a95a1b6d1452913 Mon Sep 17 00:00:00 2001
From: Michael R Sweet <michael.r.sweet@gmail.com>
Date: Tue, 6 Dec 2022 09:04:01 -0500
Subject: [PATCH] Require authentication for CUPS-Get-Document.
---
conf/cupsd.conf.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in
index b25884907..a07536f3e 100644
--- a/conf/cupsd.conf.in
+++ b/conf/cupsd.conf.in
@@ -68,7 +68,13 @@ IdleExitTimeout @EXIT_TIMEOUT@
Order deny,allow
</Limit>
- <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
+ <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job>
+ Require user @OWNER @SYSTEM
+ Order deny,allow
+ </Limit>
+
+ <Limit CUPS-Get-Document>
+ AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
--
2.41.0

@ -1,855 +0,0 @@
From 4d6787bd98c2fac8dcc58f34125d299d82e622aa Mon Sep 17 00:00:00 2001
From: Michael R Sweet <michael.r.sweet@gmail.com>
Date: Mon, 2 May 2022 15:35:20 -0400
Subject: [PATCH] Update man pages for -h option (Issue #357)
---
doc/help/man-cancel.html | 7 ++++---
doc/help/man-cupsctl.html | 7 ++++---
doc/help/man-ipptool.html | 6 ++++++
doc/help/man-lp.html | 9 +++++----
doc/help/man-lpinfo.html | 9 +++++----
doc/help/man-lpmove.html | 9 +++++----
doc/help/man-lpoptions.html | 17 +++++++++--------
doc/help/man-lpq.html | 5 +++--
doc/help/man-lpr.html | 5 +++--
doc/help/man-lprm.html | 6 +++---
doc/help/man-lpstat.html | 5 +++--
man/cancel.1 | 9 +++++----
man/cupsctl.8 | 9 +++++----
man/lp.1 | 11 ++++++-----
man/lpinfo.8 | 11 ++++++-----
man/lpmove.8 | 11 ++++++-----
man/lpoptions.1 | 19 ++++++++++---------
man/lpq.1 | 7 ++++---
man/lpr.1 | 7 ++++---
man/lprm.1 | 8 ++++----
man/lpstat.1 | 11 ++++++-----
22 files changed, 107 insertions(+), 82 deletions(-)
diff --git a/doc/help/man-cancel.html b/doc/help/man-cancel.html
index d51bb2b91..a0b52369c 100644
--- a/doc/help/man-cancel.html
+++ b/doc/help/man-cancel.html
@@ -12,6 +12,9 @@ cancel - cancel jobs
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>cancel</b>
[
+<b>-h</b>
+<i>hostname[:port]</i>
+] [
<b>-E</b>
] [
<b>-U</b>
@@ -19,9 +22,6 @@ cancel - cancel jobs
] [
<b>-a</b>
] [
-<b>-h</b>
-<i>hostname[:port]</i>
-] [
<b>-u</b>
<i>username</i>
] [
@@ -46,6 +46,7 @@ destinations if none is provided.
<dd style="margin-left: 5.0em">Forces encryption when connecting to the server.
<dt><b>-h </b><i>hostname</i>[<i>:port</i>]
<dd style="margin-left: 5.0em">Specifies an alternate server.
+Note: This option must occur before all others.
<dt><b>-U </b><i>username</i>
<dd style="margin-left: 5.0em">Specifies the username to use when connecting to the server.
<dt><b>-u </b><i>username</i>
diff --git a/doc/help/man-cupsctl.html b/doc/help/man-cupsctl.html
index b3f892ef9..e5c98dccb 100644
--- a/doc/help/man-cupsctl.html
+++ b/doc/help/man-cupsctl.html
@@ -12,14 +12,14 @@ cupsctl - configure cupsd.conf options
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>cupsctl</b>
[
+<b>-h</b>
+<i>server</i>[<b>:</b><i>port</i>]
+] [
<b>-E</b>
] [
<b>-U</b>
<i>username</i>
] [
-<b>-h</b>
-<i>server</i>[<b>:</b><i>port</i>]
-] [
<b>--</b>[<b>no-</b>]<b>debug-logging</b>
] [
<b>--</b>[<b>no-</b>]<b>remote-admin</b>
@@ -45,6 +45,7 @@ The following options are recognized:
<dd style="margin-left: 5.0em">Specifies an alternate username to use when authenticating with the scheduler.
<dt><b>-h </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Specifies the server address.
+Note: This option must occur before all others.
<dt><b>--</b>[<b>no-</b>]<b>debug-logging</b>
<dd style="margin-left: 5.0em">Enables (disables) debug logging to the <i>error_log</i> file.
<dt><b>--</b>[<b>no-</b>]<b>remote-admin</b>
diff --git a/doc/help/man-ipptool.html b/doc/help/man-ipptool.html
index 81f67d77f..688454c69 100644
--- a/doc/help/man-ipptool.html
+++ b/doc/help/man-ipptool.html
@@ -59,6 +59,8 @@ ipptool - perform internet printing protocol requests
<b>-i</b>
<i>seconds</i>
] [
+<b>-j</b>
+] [
<b>-n</b>
<i>repeat-count</i>
] [
@@ -150,6 +152,10 @@ This option is incompatible with the <b>-i</b> (interval) and <b>-n</b> (repeat-
<i>testfile</i>
should be repeated at the specified interval.
This option is incompatible with the <b>-X</b> (XML plist output) option.
+<dt><b>-j</b>
+<dd style="margin-left: 5.0em">Specifies that
+<b>ipptool</b>
+will produce JSON output.
<dt><b>-l</b>
<dd style="margin-left: 5.0em">Specifies that plain text output is desired.
<dt><b>-n</b><i> repeat-count</i>
diff --git a/doc/help/man-lp.html b/doc/help/man-lp.html
index f70c088d3..6442e900d 100644
--- a/doc/help/man-lp.html
+++ b/doc/help/man-lp.html
@@ -12,6 +12,8 @@ lp - print files
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lp</b>
[
+<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
+] [
<b>-E</b>
] [
<b>-U</b>
@@ -21,8 +23,6 @@ lp - print files
] [
<b>-d </b><i>destination</i>[<b>/</b><i>instance</i>]
] [
-<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
-] [
<b>-m</b>
] [
<b>-n</b>
@@ -51,6 +51,8 @@ lp - print files
<br>
<b>lp</b>
[
+<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
+] [
<b>-E</b>
] [
<b>-U</b>
@@ -58,8 +60,6 @@ lp - print files
] [
<b>-c</b>
] [
-<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
-] [
<b>-i</b>
<i>job-id</i>
] [
@@ -106,6 +106,7 @@ In CUPS, print files are always sent to the scheduler via IPP which has the same
<dd style="margin-left: 5.0em">Prints files to the named printer.
<dt><b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Chooses an alternate server.
+Note: This option must occur before all others.
<dt><b>-i </b><i>job-id</i>
<dd style="margin-left: 5.0em">Specifies an existing job to modify.
<dt><b>-m</b>
diff --git a/doc/help/man-lpinfo.html b/doc/help/man-lpinfo.html
index a1aed9421..30df7691c 100644
--- a/doc/help/man-lpinfo.html
+++ b/doc/help/man-lpinfo.html
@@ -12,10 +12,10 @@ lpinfo - show available devices or drivers (deprecated)
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lpinfo</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-l</b>
] [
<b>--device-id</b>
@@ -40,10 +40,10 @@ lpinfo - show available devices or drivers (deprecated)
<br>
<b>lpinfo</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-l</b>
] [
<b>--exclude-schemes</b>
@@ -66,6 +66,7 @@ The first form (<i>-m</i>) lists the available drivers, while the second form (<
<dd style="margin-left: 5.0em">Forces encryption when connecting to the server.
<dt><b>-h </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Selects an alternate server.
+Note: This option must occur before all others.
<dt><b>-l</b>
<dd style="margin-left: 5.0em">Shows a "long" listing of devices or drivers.
<dt><b>--device-id </b><i>device-id-string</i>
diff --git a/doc/help/man-lpmove.html b/doc/help/man-lpmove.html
index d8019ee25..b0db753f9 100644
--- a/doc/help/man-lpmove.html
+++ b/doc/help/man-lpmove.html
@@ -12,10 +12,10 @@ lpmove - move a job or all jobs to a new destination
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lpmove</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-U</b>
<i>username</i>
]
@@ -24,10 +24,10 @@ lpmove - move a job or all jobs to a new destination
<br>
<b>lpmove</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-U</b>
<i>username</i>
]
@@ -44,6 +44,7 @@ The <b>lpmove</b> command supports the following options:
<dd style="margin-left: 5.0em">Specifies an alternate username.
<dt><b>-h </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Specifies an alternate server.
+Note: This option must occur before all others.
</dl>
<h2 class="title"><a name="EXAMPLES">Examples</a></h2>
Move job 123 from "oldprinter" to "newprinter":
diff --git a/doc/help/man-lpoptions.html b/doc/help/man-lpoptions.html
index 6dda87f64..6af78290b 100644
--- a/doc/help/man-lpoptions.html
+++ b/doc/help/man-lpoptions.html
@@ -12,9 +12,9 @@ lpoptions - display or set printer options and defaults
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lpoptions</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
+] [
+<b>-E</b>
]
<b>-d </b><i>destination</i>[<b>/</b><i>instance</i>]
[
@@ -23,20 +23,20 @@ lpoptions - display or set printer options and defaults
<br>
<b>lpoptions</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-p </b><i>destination</i>[<b>/</b><i>instance</i>]
]
<b>-o </b><i>option</i>[<b>=</b><i>value</i>] ...
<br>
<b>lpoptions</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-p </b><i>destination</i>[<b>/</b><i>instance</i>]
]
<b>-r</b>
@@ -44,9 +44,9 @@ lpoptions - display or set printer options and defaults
<br>
<b>lpoptions</b>
[
-<b>-E</b>
-] [
<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
+] [
+<b>-E</b>
]
<b>-x </b><i>destination</i>[<b>/</b><i>instance</i>]
<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
@@ -72,6 +72,7 @@ If <i>instance</i> is supplied then that particular instance is used.
This option overrides the system default printer for the current user.
<dt><b>-h </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Uses an alternate server.
+Note: This option must occur before all others.
<dt><b>-l</b>
<dd style="margin-left: 5.0em">Lists the printer specific options and their current settings.
<dt><b>-o </b><i>option</i>[<b>=</b><i>value</i>]
diff --git a/doc/help/man-lpq.html b/doc/help/man-lpq.html
index 1c9e704ff..19e536d3c 100644
--- a/doc/help/man-lpq.html
+++ b/doc/help/man-lpq.html
@@ -12,13 +12,13 @@ lpq - show printer queue status
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lpq</b>
[
+<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
+] [
<b>-E</b>
] [
<b>-U</b>
<i>username</i>
] [
-<b>-h </b><i>server</i>[<b>:</b><i>port</i>]
-] [
<b>-P </b><i>destination</i>[<b>/</b><i>instance</i>]
] [
<b>-a</b>
@@ -44,6 +44,7 @@ Jobs queued on the default destination will be shown if no printer or class is s
<dd style="margin-left: 5.0em">Reports jobs on all printers.
<dt><b>-h </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Specifies an alternate server.
+Note: This option must occur before all others.
<dt><b>-l</b>
<dd style="margin-left: 5.0em">Requests a more verbose (long) reporting format.
</dl>
diff --git a/doc/help/man-lpr.html b/doc/help/man-lpr.html
index d044ab1a8..f9b19e1fe 100644
--- a/doc/help/man-lpr.html
+++ b/doc/help/man-lpr.html
@@ -12,10 +12,10 @@ lpr - print files
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lpr</b>
[
-<b>-E</b>
-] [
<b>-H </b><i>server</i>[<b>:</b><i>port</i>]
] [
+<b>-E</b>
+] [
<b>-U</b>
<i>username</i>
] [
@@ -67,6 +67,7 @@ The following options are recognized by <i>lpr</i>:
<dd style="margin-left: 5.0em">Forces encryption when connecting to the server.
<dt><b>-H </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Specifies an alternate server.
+Note: This option must occur before all others.
<dt><b>-C "</b><i>name</i><b>"</b>
<dd style="margin-left: 5.0em"><dt><b>-J "</b><i>name</i><b>"</b>
<dd style="margin-left: 5.0em"><dt><b>-T "</b><i>name</i><b>"</b>
diff --git a/doc/help/man-lprm.html b/doc/help/man-lprm.html
index 7410320a3..dbe7f20de 100644
--- a/doc/help/man-lprm.html
+++ b/doc/help/man-lprm.html
@@ -12,14 +12,13 @@ lprm - cancel print jobs
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lprm</b>
[
+<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
+] [
<b>-E</b>
] [
<b>-U</b>
<i>username</i>
] [
-<b>-h</b>
-<i>server</i>[<i>:port</i>]
-] [
<b>-P</b>
<i>destination</i>[<i>/instance</i>]
] [
@@ -45,6 +44,7 @@ command supports the following options:
<dd style="margin-left: 5.0em">Specifies an alternate username.
<dt><b>-h </b><i>server</i>[<i>:port</i>]
<dd style="margin-left: 5.0em">Specifies an alternate server.
+Note: This option must occur before all others.
</dl>
<h2 class="title"><a name="CONFORMING_TO">Conforming To</a></h2>
The CUPS version of
diff --git a/doc/help/man-lpstat.html b/doc/help/man-lpstat.html
index f23089bbe..2c5dedc7c 100644
--- a/doc/help/man-lpstat.html
+++ b/doc/help/man-lpstat.html
@@ -12,6 +12,8 @@ lpstat - print cups status information
<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
<b>lpstat</b>
[
+<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
+] [
<b>-E</b>
] [
<b>-H</b>
@@ -19,8 +21,6 @@ lpstat - print cups status information
<b>-U</b>
<i>username</i>
] [
-<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
-] [
<b>-l</b>
] [
<b>-W</b>
@@ -91,6 +91,7 @@ If no classes are specified then all classes are listed.
<dd style="margin-left: 5.0em">Shows all available destinations on the local network.
<dt><b>-h </b><i>server</i>[<b>:</b><i>port</i>]
<dd style="margin-left: 5.0em">Specifies an alternate server.
+Note: This option must occur before all others.
<dt><b>-l</b>
<dd style="margin-left: 5.0em">Shows a long listing of printers, classes, or jobs.
<dt><b>-o </b>[<i>destination(s)</i>]
diff --git a/man/cancel.1 b/man/cancel.1
index 34a5d9fc0..caea0ed69 100644
--- a/man/cancel.1
+++ b/man/cancel.1
@@ -8,12 +8,15 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH cancel 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH cancel 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
cancel \- cancel jobs
.SH SYNOPSIS
.B cancel
[
+.B \-h
+.I hostname[:port]
+] [
.B \-E
] [
.B \-U
@@ -21,9 +24,6 @@ cancel \- cancel jobs
] [
.B \-a
] [
-.B \-h
-.I hostname[:port]
-] [
.B \-u
.I username
] [
@@ -50,6 +50,7 @@ Forces encryption when connecting to the server.
.TP 5
\fB\-h \fIhostname\fR[\fI:port\fR]
Specifies an alternate server.
+Note: This option must occur before all others.
.TP 5
\fB\-U \fIusername\fR
Specifies the username to use when connecting to the server.
diff --git a/man/cupsctl.8 b/man/cupsctl.8
index 1b1ff4183..7e50d07ac 100644
--- a/man/cupsctl.8
+++ b/man/cupsctl.8
@@ -8,20 +8,20 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH cupsctl 8 "CUPS" "26 April 2019" "Apple Inc."
+.TH cupsctl 8 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
cupsctl \- configure cupsd.conf options
.SH SYNOPSIS
.B cupsctl
[
+.B \-h
+\fIserver\fR[\fB:\fIport\fR]
+] [
.B \-E
] [
.B \-U
.I username
] [
-.B \-h
-\fIserver\fR[\fB:\fIport\fR]
-] [
\fB\-\-\fR[\fBno\-\fR]\fBdebug\-logging\fR
] [
\fB\-\-\fR[\fBno\-\fR]\fBremote\-admin\fR
@@ -49,6 +49,7 @@ Specifies an alternate username to use when authenticating with the scheduler.
.TP 5
\fB\-h \fIserver\fR[\fB:\fIport\fR]
Specifies the server address.
+Note: This option must occur before all others.
.TP 5
\fB\-\-\fR[\fBno\-\fR]\fBdebug\-logging\fR
Enables (disables) debug logging to the \fIerror_log\fR file.
diff --git a/man/lp.1 b/man/lp.1
index a54f904a5..4bdd2de7b 100644
--- a/man/lp.1
+++ b/man/lp.1
@@ -8,12 +8,14 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lp 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH lp 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lp \- print files
.SH SYNOPSIS
.B lp
[
+\fB\-h \fIhostname\fR[\fB:\fIport\fR]
+] [
.B \-E
] [
.B \-U
@@ -23,8 +25,6 @@ lp \- print files
] [
\fB\-d \fIdestination\fR[\fB/\fIinstance\fR]
] [
-\fB\-h \fIhostname\fR[\fB:\fIport\fR]
-] [
.B \-m
] [
.B \-n
@@ -53,6 +53,8 @@ lp \- print files
.br
.B lp
[
+\fB\-h \fIhostname\fR[\fB:\fIport\fR]
+] [
.B \-E
] [
.B \-U
@@ -60,8 +62,6 @@ lp \- print files
] [
.B \-c
] [
-\fB\-h \fIhostname\fR[\fB:\fIport\fR]
-] [
.B \-i
.I job-id
] [
@@ -113,6 +113,7 @@ Prints files to the named printer.
.TP 5
\fB\-h \fIhostname\fR[\fB:\fIport\fR]
Chooses an alternate server.
+Note: This option must occur before all others.
.TP 5
\fB\-i \fIjob-id\fR
Specifies an existing job to modify.
diff --git a/man/lpinfo.8 b/man/lpinfo.8
index d238f9a60..d44b568d2 100644
--- a/man/lpinfo.8
+++ b/man/lpinfo.8
@@ -8,16 +8,16 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lpinfo 8 "CUPS" "26 April 2019" "Apple Inc."
+.TH lpinfo 8 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lpinfo \- show available devices or drivers (deprecated)
.SH SYNOPSIS
.B lpinfo
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
.B \-l
] [
.B \-\-device\-id
@@ -42,10 +42,10 @@ lpinfo \- show available devices or drivers (deprecated)
.br
.B lpinfo
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
.B \-l
] [
.B \-\-exclude\-schemes
@@ -69,6 +69,7 @@ Forces encryption when connecting to the server.
.TP 5
\fB\-h \fIserver\fR[\fB:\fIport\fR]
Selects an alternate server.
+Note: This option must occur before all others.
.TP 5
.B \-l
Shows a "long" listing of devices or drivers.
diff --git a/man/lpmove.8 b/man/lpmove.8
index af3c6b63c..62adba654 100644
--- a/man/lpmove.8
+++ b/man/lpmove.8
@@ -8,16 +8,16 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lpmove 8 "CUPS" "26 April 2019" "Apple Inc."
+.TH lpmove 8 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lpmove \- move a job or all jobs to a new destination
.SH SYNOPSIS
.B lpmove
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
.B \-U
.I username
]
@@ -26,10 +26,10 @@ lpmove \- move a job or all jobs to a new destination
.br
.B lpmove
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
.B \-U
.I username
]
@@ -48,6 +48,7 @@ Specifies an alternate username.
.TP 5
\fB\-h \fIserver\fR[\fB:\fIport\fR]
Specifies an alternate server.
+Note: This option must occur before all others.
.SH EXAMPLES
Move job 123 from "oldprinter" to "newprinter":
.nf
diff --git a/man/lpoptions.1 b/man/lpoptions.1
index 372f46a37..2eb5b6010 100644
--- a/man/lpoptions.1
+++ b/man/lpoptions.1
@@ -8,15 +8,15 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lpoptions 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH lpoptions 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lpoptions \- display or set printer options and defaults
.SH SYNOPSIS
.B lpoptions
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
+] [
+.B \-E
]
\fB\-d \fIdestination\fR[\fB/\fIinstance\fR]
[
@@ -25,20 +25,20 @@ lpoptions \- display or set printer options and defaults
.br
.B lpoptions
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
\fB\-p \fIdestination\fR[\fB/\fIinstance\fR]
]
\fB\-o \fIoption\fR[\fB=\fIvalue\fR] ...
.br
.B lpoptions
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
\fB\-p \fIdestination\fR[\fB/\fIinstance\fR]
]
.B \-r
@@ -46,9 +46,9 @@ lpoptions \- display or set printer options and defaults
.br
.B lpoptions
[
-.B \-E
-] [
\fB\-h \fIserver\fR[\fB:\fIport\fR]
+] [
+.B \-E
]
\fB\-x \fIdestination\fR[\fB/\fIinstance\fR]
.SH DESCRIPTION
@@ -79,6 +79,7 @@ This option overrides the system default printer for the current user.
.TP 5
\fB\-h \fIserver\fR[\fB:\fIport\fR]
Uses an alternate server.
+Note: This option must occur before all others.
.TP 5
.B \-l
Lists the printer specific options and their current settings.
diff --git a/man/lpq.1 b/man/lpq.1
index ce23a6c81..a81633ecb 100644
--- a/man/lpq.1
+++ b/man/lpq.1
@@ -8,19 +8,19 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lpq 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH lpq 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lpq \- show printer queue status
.SH SYNOPSIS
.B lpq
[
+\fB\-h \fIserver\fR[\fB:\fIport\fR]
+] [
.B \-E
] [
.B \-U
.I username
] [
-\fB\-h \fIserver\fR[\fB:\fIport\fR]
-] [
\fB\-P \fIdestination\fR[\fB/\fIinstance\fR]
] [
.B \-a
@@ -51,6 +51,7 @@ Reports jobs on all printers.
.TP 5
\fB\-h \fIserver\fR[\fB:\fIport\fR]
Specifies an alternate server.
+Note: This option must occur before all others.
.TP 5
.B \-l
Requests a more verbose (long) reporting format.
diff --git a/man/lpr.1 b/man/lpr.1
index e5f9f9018..77a62b305 100644
--- a/man/lpr.1
+++ b/man/lpr.1
@@ -8,16 +8,16 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lpr 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH lpr 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lpr \- print files
.SH SYNOPSIS
.B lpr
[
-.B \-E
-] [
\fB\-H \fIserver\fR[\fB:\fIport\fR]
] [
+.B \-E
+] [
.B \-U
.I username
] [
@@ -70,6 +70,7 @@ Forces encryption when connecting to the server.
.TP 5
\fB\-H \fIserver\fR[\fB:\fIport\fR]
Specifies an alternate server.
+Note: This option must occur before all others.
.TP 5
\fB\-C "\fIname\fB"\fR
.TP 5
diff --git a/man/lprm.1 b/man/lprm.1
index 094166539..0cf88ac51 100644
--- a/man/lprm.1
+++ b/man/lprm.1
@@ -8,20 +8,19 @@
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH lprm 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH lprm 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lprm \- cancel print jobs
.SH SYNOPSIS
.B lprm
[
+\fB\-h \fIhostname\fR[\fB:\fIport\fR]
+] [
.B \-E
] [
.B \-U
.I username
] [
-.B \-h
-.IR server [ :port ]
-] [
.B \-P
.IR destination [ /instance ]
] [
@@ -50,6 +49,7 @@ Specifies an alternate username.
.TP 5
\fB\-h \fIserver\fR[\fI:port\fR]
Specifies an alternate server.
+Note: This option must occur before all others.
.SH CONFORMING TO
The CUPS version of
.B lprm
diff --git a/man/lpstat.1 b/man/lpstat.1
index 0a10cd9bc..88acff7b3 100644
--- a/man/lpstat.1
+++ b/man/lpstat.1
@@ -1,17 +1,20 @@
.\"
.\" lpstat man page for CUPS.
.\"
-.\" Copyright 2007-2019 by Apple Inc.
-.\" Copyright 1997-2006 by Easy Software Products.
+.\" Copyright © 2021-2022 by OpenPrinting.
+.\" Copyright © 2007-2019 by Apple Inc.
+.\" Copyright © 1997-2006 by Easy Software Products.
.\"
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more information.
.\"
-.TH lpstat 1 "CUPS" "26 April 2019" "Apple Inc."
+.TH lpstat 1 "CUPS" "2022-05-02" "OpenPrinting"
.SH NAME
lpstat \- print cups status information
.SH SYNOPSIS
.B lpstat
[
+\fB\-h \fIhostname\fR[\fB:\fIport\fR]
+] [
.B \-E
] [
.B \-H
@@ -19,8 +22,6 @@
.B \-U
.I username
] [
-\fB\-h \fIhostname\fR[\fB:\fIport\fR]
-] [
.B \-l
] [
.B \-W
@@ -100,6 +101,7 @@
.TP 5
\fB\-h \fIserver\fR[\fB:\fIport\fR]
Specifies an alternate server.
+Note: This option must occur before all others.
.TP 5
.B \-l
Shows a long listing of printers, classes, or jobs.
@@ -145,4 +147,4 @@
.BR lprm (1),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2019 by Apple Inc.
+Copyright \[co] 2021-2022 by OpenPrinting.

@ -1,48 +0,0 @@
From c5ad7aaf6c8063a39974c6b4a3cf59b7f912daae Mon Sep 17 00:00:00 2001
From: Bryan Mason <bmason@redhat.com>
Date: Tue, 27 Jun 2023 04:18:46 -0700
Subject: [PATCH 1/2] Use "purge-job" instead of "purge-jobs" when canceling a
single job (#742)
The command "cancel -x <job>" adds "purge-jobs true" to the Cancel-Job
operation; however, the correct attribute to use for Cancel-job is
"purge-job" (singular), not "purge-jobs" (plural). As a result, job
files are not removed from /var/spool/cups when "cancel -x <job>" is
executed.
This patch resolves the issue by adding "purge-job" when the IPP
operation is Cancel-Job and "purge-jobs" for other IPP operations
(Purge-Jobs, Cancel-Jobs, and Cancel-My-Jobs)
---
systemv/cancel.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/systemv/cancel.c b/systemv/cancel.c
index 572f413e1..f5b8e12b5 100644
--- a/systemv/cancel.c
+++ b/systemv/cancel.c
@@ -260,6 +260,7 @@ main(int argc, /* I - Number of command-line arguments */
* attributes-natural-language
* printer-uri + job-id *or* job-uri
* [requesting-user-name]
+ * [purge-job] or [purge-jobs]
*/
request = ippNewRequest(op);
@@ -294,7 +295,12 @@ main(int argc, /* I - Number of command-line arguments */
"requesting-user-name", NULL, cupsUser());
if (purge)
- ippAddBoolean(request, IPP_TAG_OPERATION, "purge-jobs", (char)purge);
+ {
+ if (op == IPP_CANCEL_JOB)
+ ippAddBoolean(request, IPP_TAG_OPERATION, "purge-job", (char)purge);
+ else
+ ippAddBoolean(request, IPP_TAG_OPERATION, "purge-jobs", (char)purge);
+ }
/*
* Do the request and get back a response...
--
2.41.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

@ -1,16 +0,0 @@
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c
index 92f1501..7edc058 100644
--- a/cgi-bin/ipp-var.c
+++ b/cgi-bin/ipp-var.c
@@ -275,10 +275,7 @@ cgiMoveJobs(http_t *http, /* I - Connection to server */
*/
if ((user = getenv("REMOTE_USER")) == NULL)
- {
- puts("Status: 401\n");
- exit(0);
- }
+ user = "guest";
/*
* See if the user has already selected a new destination...

@ -1,32 +0,0 @@
From 8ae6eb11184dcbd9eaf3c6badd4fad59fcc3863a Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Mon, 15 Aug 2022 17:38:12 +0200
Subject: [PATCH] cups/dest.c: Write data into /etc/cups/lpoptions if we're
root
Fixes #454 , the patch is created by Yair Yarom
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008053).
---
cups/dest.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cups/dest.c b/cups/dest.c
index f563ce226..a9273ff93 100644
--- a/cups/dest.c
+++ b/cups/dest.c
@@ -2080,7 +2080,11 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
- if (cg->home)
+ if (cg->home
+#ifndef _WIN32
+ && getuid() != 0
+#endif /* !_WIN32 */
+ )
{
/*
* Create ~/.cups subdirectory...
--
2.44.0

@ -1,35 +0,0 @@
From 876fdc1c90a885a58644c8757bc1283c9fd5bcb7 Mon Sep 17 00:00:00 2001
From: Vasilis Liaskovitis <vliaskovitis@suse.com>
Date: Wed, 1 Mar 2023 13:46:28 +0100
Subject: [PATCH] cups/http-addr.c: Set listen backlog size to INT_MAX (fixes
#308)
Use a listen queue size of INT_MAX, which should default to the maximum
supported queue size on the system.
This avoids the problem of the listening backlog queue getting full when
there are too many requests at the same time. The problem was observed
with the previous backlog size (128) by customers when submitting large
batches of print jobs, resulting in some jobs getting lost.
Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com>
---
cups/http-addr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cups/http-addr.c b/cups/http-addr.c
index a61ee0449..6aeeb8074 100644
--- a/cups/http-addr.c
+++ b/cups/http-addr.c
@@ -249,7 +249,7 @@ httpAddrListen(http_addr_t *addr, /* I - Address to bind to */
* Listen...
*/
- if (listen(fd, 128))
+ if (listen(fd, INT_MAX))
{
_cupsSetHTTPError(HTTP_STATUS_ERROR);
--
2.41.0

@ -1,53 +0,0 @@
From d9924186325c89aefa56e36258f56f246dd2c4ad Mon Sep 17 00:00:00 2001
From: Richard Lescak <rlescak@redhat.com>
Date: Tue, 11 Jan 2022 10:53:34 +0100
Subject: [PATCH] cups/http.c,encode.c: Fix memory leaks
---
CHANGES.md | 3 ++-
cups/encode.c | 1 +
cups/http.c | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cups/encode.c b/cups/encode.c
index 5bcbf6fe5..15b1c6b40 100644
--- a/cups/encode.c
+++ b/cups/encode.c
@@ -655,6 +655,7 @@ _cupsEncodeOption(
ippSetCollection(ipp, &attr, i, collection);
cupsEncodeOptions2(collection, num_cols, cols, IPP_TAG_JOB);
cupsFreeOptions(num_cols, cols);
+ ippDelete(collection);
break;
default :
diff --git a/cups/http.c b/cups/http.c
index bd41e6f8e..4b6a24bd3 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -4624,6 +4624,7 @@ http_tls_upgrade(http_t *http) /* I - HTTP connection */
* Restore the HTTP request data...
*/
+ httpClearFields(http);
memcpy(http->_fields, myhttp._fields, sizeof(http->_fields));
memcpy(http->fields, myhttp.fields, sizeof(http->fields));
diff --git a/cups/ppd.c b/cups/ppd.c
index 525df3592..54368ac4c 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -3430,12 +3430,12 @@ ppd_update_filters(ppd_file_t *ppd, /* I - PPD file */
srctype[256],
dstsuper[16], /* Destination MIME media type */
dsttype[256],
- program[1024], /* Command to run */
*ptr, /* Pointer into command to run */
buffer[1024], /* Re-written cupsFilter value */
**filter; /* Current filter */
int cost; /* Cost of filter */
+ char program[1024] = { 0 }; /* Command to run */
DEBUG_printf(("4ppd_update_filters(ppd=%p, cg=%p)", ppd, pg));

@ -1,34 +0,0 @@
From 5e3107e734f06d410a490e8bc923dc3119f17671 Mon Sep 17 00:00:00 2001
From: Michael R Sweet <michael.r.sweet@gmail.com>
Date: Wed, 17 May 2023 12:59:57 -0400
Subject: [PATCH] Consensus fix.
---
cups/string.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cups/string.c b/cups/string.c
index 00454203c..b4fc12050 100644
--- a/cups/string.c
+++ b/cups/string.c
@@ -1,6 +1,7 @@
/*
* String functions for CUPS.
*
+ * Copyright © 2023 by OpenPrinting.
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products.
*
@@ -730,6 +731,9 @@ _cups_strlcpy(char *dst, /* O - Destination string */
size_t srclen; /* Length of source string */
+ if (size == 0)
+ return (0);
+
/*
* Figure out how much room is needed...
*/
--
2.40.1

@ -1,55 +0,0 @@
From bdb1ca45454d90410031c4c2054005a995f76180 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Wed, 6 Apr 2022 15:04:45 +0200
Subject: [PATCH] cups/tls-gnutls.c: Use always GNUTLS_SHUT_WR
The current mode for `gnutls_bye()` in client use cases strictly
follows TLS v1.2 standard, which in this particular part says:
```
Unless some other fatal alert has been transmitted, each party is
required to send a close_notify alert before closing the write
side of the connection. The other party MUST respond with a
close_notify alert of its own and close down the connection immediately,
discarding any pending writes. It is not required for the initiator
of the close to wait for the responding close_notify alert before
closing the read side of the connection.
```
and waits for the other side of TLS connection to confirm the close.
Unfortunately it can undesired for reasons:
- we support switching of TLS versions in CUPS, and this mode strictly
follows TLS v1.2 - so for older version this behavior is not expected
and can cause delays
- even some TLS v1.2 implementations (like Windows Server 2016) don't
comply TLS v1.2 behavior even if it says it does - in that case,
encrypted printing takes 30s till HTTP timeout is reached, because the
other side didn't send confirmation
- AFAIU openssl's SSL_shutdown() doesn't make this TLS v1.2 difference,
so we could end up with two TLS implementations in CUPS which will
behave differently
Since the standard defines that waiting for confirmation is not required
and due the problems above, I would propose using GNUTLS_SHUT_WR mode
regardless of HTTP mode.
---
cups/tls-gnutls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cups/tls-gnutls.c b/cups/tls-gnutls.c
index c55995b2b..f87b4f4df 100644
--- a/cups/tls-gnutls.c
+++ b/cups/tls-gnutls.c
@@ -1667,7 +1667,7 @@ _httpTLSStop(http_t *http) /* I - Connection to server */
int error; /* Error code */
- error = gnutls_bye(http->tls, http->mode == _HTTP_MODE_CLIENT ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR);
+ error = gnutls_bye(http->tls, GNUTLS_SHUT_WR);
if (error != GNUTLS_E_SUCCESS)
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, gnutls_strerror(errno), 0);
--
2.35.1

@ -1,24 +0,0 @@
diff -up cups-2.3.3op2/cups/ppd-cache.c.fix-warn cups-2.3.3op2/cups/ppd-cache.c
--- cups-2.3.3op2/cups/ppd-cache.c.fix-warn 2024-09-30 17:30:39.098043436 +0200
+++ cups-2.3.3op2/cups/ppd-cache.c 2024-09-30 17:31:30.738393111 +0200
@@ -3051,8 +3051,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
int resolutions[1000];
/* Array of resolution indices */
char msgid[256]; /* Message identifier (attr.value) */
- const char *keyword, /* Keyword value */
- *msgstr; /* Localized string */
+ const char *keyword; /* Keyword value */
cups_lang_t *lang = cupsLangDefault();
/* Localization info */
cups_array_t *strings = NULL;/* Printer strings file */
@@ -4661,9 +4660,8 @@ _ppdCreateFromIPP(char *buffer, /* I -
{
ipp_t *preset = ippGetCollection(attr, i);
/* Preset collection */
- const char *preset_name = ippGetString(ippFindAttribute(preset, "preset-name", IPP_TAG_ZERO), 0, NULL),
+ const char *preset_name = ippGetString(ippFindAttribute(preset, "preset-name", IPP_TAG_ZERO), 0, NULL);
/* Preset name */
- *localized_name; /* Localized preset name */
ipp_attribute_t *member; /* Member attribute in preset */
const char *member_name; /* Member attribute name */
char member_value[256]; /* Member attribute value */

@ -1,43 +0,0 @@
diff -up cups-2.2.6/cups/http-addrlist.c.cupsgetjobs-pollhup cups-2.2.6/cups/http-addrlist.c
--- cups-2.2.6/cups/http-addrlist.c.cupsgetjobs-pollhup 2023-12-19 18:25:15.484637450 +0100
+++ cups-2.2.6/cups/http-addrlist.c 2023-12-19 18:28:57.129163387 +0100
@@ -313,6 +313,39 @@ httpAddrConnect2(
{
# ifdef HAVE_POLL
DEBUG_printf(("pfds[%d].revents=%x\n", i, pfds[i].revents));
+
+# ifdef _WIN32
+ if (((WSAGetLastError() == WSAEINPROGRESS) && (pfds[i].revents & POLLIN) && (pfds[i].revents & POLLOUT)) ||
+ ((pfds[i].revents & POLLHUP) && (pfds[i].revents & (POLLIN|POLLOUT))))
+# else
+ if (((errno == EINPROGRESS) && (pfds[i].revents & POLLIN) && (pfds[i].revents & POLLOUT)) ||
+ ((pfds[i].revents & POLLHUP) && (pfds[i].revents & (POLLIN|POLLOUT))))
+# endif /* _WIN32 */
+ {
+ // Some systems generate POLLIN or POLLOUT together with POLLHUP when doing
+ // asynchronous connections. The solution seems to be to use getsockopt to
+ // check the SO_ERROR value and ignore the POLLHUP if there is no error or
+ // the error is EINPROGRESS.
+
+ int sres, /* Return value from getsockopt() - 0, or -1 if error */
+ serr; /* Option SO_ERROR value */
+ socklen_t slen = sizeof(serr); /* Option value size */
+
+ sres = getsockopt(fds[i], SOL_SOCKET, SO_ERROR, &serr, &slen);
+
+ if (sres || serr)
+ {
+ pfds[i].revents |= POLLERR;
+# ifdef DEBUG
+ DEBUG_printf(("1httpAddrConnect2: getsockopt returned: %d with error: %s", sres, strerror(serr)));
+# endif
+ }
+ else if (pfds[i].revents && (pfds[i].revents & POLLHUP) && (pfds[i].revents & (POLLIN | POLLOUT)))
+ {
+ pfds[i].revents &= ~POLLHUP;
+ }
+ }
+
if (pfds[i].revents && !(pfds[i].revents & (POLLERR | POLLHUP)))
# else
if (FD_ISSET(fds[i], &input_set) && !FD_ISSET(fds[i], &error_set))

@ -1,57 +0,0 @@
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
index 977d0c6..c484d33 100644
--- a/cups/ppd-cache.c
+++ b/cups/ppd-cache.c
@@ -3134,10 +3134,10 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
cupsFilePuts(fp, "*cupsSNMPSupplies: False\n");
cupsFilePrintf(fp, "*cupsLanguages: \"%s\"\n", lang->language);
- if ((attr = ippFindAttribute(response, "printer-more-info", IPP_TAG_URI)) != NULL)
+ if ((attr = ippFindAttribute(response, "printer-more-info", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr))
cupsFilePrintf(fp, "*APSupplies: \"%s\"\n", ippGetString(attr, 0, NULL));
- if ((attr = ippFindAttribute(response, "printer-charge-info-uri", IPP_TAG_URI)) != NULL)
+ if ((attr = ippFindAttribute(response, "printer-charge-info-uri", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr))
cupsFilePrintf(fp, "*cupsChargeInfoURI: \"%s\"\n", ippGetString(attr, 0, NULL));
if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL)
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 728d164..5089172 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -5773,6 +5773,18 @@ create_local_bg_thread(
cupsdLogMessage(CUPSD_LOG_DEBUG, "%s: IPP/1.1 Get-Printer-Attributes returned %s (%s)", printer->name, ippErrorString(cupsLastError()), cupsLastErrorString());
}
+ // Validate response from printer...
+ if (!ippValidateAttributes(response))
+ {
+ cupsdLogMessage(CUPSD_LOG_ERROR, "%s: The printer contains invalid attributes.", printer->name);
+
+ if (response)
+ ippDelete(response);
+
+ httpClose(http);
+ return (NULL);
+ }
+
// TODO: Grab printer icon file...
httpClose(http);
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index daf24d5..eba7551 100644
--- a/systemv/lpadmin.c
+++ b/systemv/lpadmin.c
@@ -1226,6 +1226,12 @@ get_printer_ppd(
ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", sizeof(pattrs) / sizeof(pattrs[0]), NULL, pattrs);
response = cupsDoRequest(http, request, resource);
+ if (response && !ippValidateAttributes(response))
+ {
+ _cupsLangPrintf(stderr, _("%s: The printer \"%s\" contains invalid IPP attributes."), "lpadmin", uri);
+ return (NULL);
+ }
+
if (cupsLastError() >= IPP_STATUS_REDIRECTION_OTHER_SITE)
{
_cupsLangPrintf(stderr, _("%s: Unable to query printer: %s"), "lpadmin", cupsLastErrorString());

@ -1,116 +0,0 @@
From e0630cd18f76340d302000f2bf6516e99602b844 Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Mon, 9 Sep 2024 15:59:57 -0400
Subject: [PATCH] PPDize preset and template names.
---
cups/ppd-cache.c | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
index 986c64f73..18c38d0ee 100644
--- a/cups/ppd-cache.c
+++ b/cups/ppd-cache.c
@@ -4975,12 +4975,14 @@ _ppdCreateFromIPP2(
cupsArrayAdd(templates, (void *)keyword);
+ pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
+
snprintf(msgid, sizeof(msgid), "finishing-template.%s", keyword);
if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
msgstr = keyword;
- cupsFilePrintf(fp, "*cupsFinishingTemplate %s: \"\n", keyword);
+ cupsFilePrintf(fp, "*cupsFinishingTemplate %s: \"\n", ppdname);
for (finishing_attr = ippFirstAttribute(finishing_col); finishing_attr; finishing_attr = ippNextAttribute(finishing_col))
{
if (ippGetValueTag(finishing_attr) == IPP_TAG_BEGIN_COLLECTION)
@@ -4993,7 +4995,7 @@ _ppdCreateFromIPP2(
}
}
cupsFilePuts(fp, "\"\n");
- cupsFilePrintf(fp, "*%s.cupsFinishingTemplate %s/%s: \"\"\n", lang->language, keyword, msgstr);
+ cupsFilePrintf(fp, "*%s.cupsFinishingTemplate %s/%s: \"\"\n", lang->language, ppdname, msgstr);
cupsFilePuts(fp, "*End\n");
}
@@ -5039,7 +5041,8 @@ _ppdCreateFromIPP2(
if (!preset || !preset_name)
continue;
- cupsFilePrintf(fp, "*APPrinterPreset %s: \"\n", preset_name);
+ pwg_ppdize_name(preset_name, ppdname, sizeof(ppdname));
+ cupsFilePrintf(fp, "*APPrinterPreset %s: \"\n", ppdname);
for (member = ippFirstAttribute(preset); member; member = ippNextAttribute(preset))
{
member_name = ippGetName(member);
@@ -5080,7 +5083,10 @@ _ppdCreateFromIPP2(
fin_col = ippGetCollection(member, i);
if ((keyword = ippGetString(ippFindAttribute(fin_col, "finishing-template", IPP_TAG_ZERO), 0, NULL)) != NULL)
- cupsFilePrintf(fp, "*cupsFinishingTemplate %s\n", keyword);
+ {
+ pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
+ cupsFilePrintf(fp, "*cupsFinishingTemplate %s\n", ppdname);
+ }
}
}
else if (!strcmp(member_name, "media"))
@@ -5107,13 +5113,13 @@ _ppdCreateFromIPP2(
if ((keyword = ippGetString(ippFindAttribute(media_col, "media-source", IPP_TAG_ZERO), 0, NULL)) != NULL)
{
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
- cupsFilePrintf(fp, "*InputSlot %s\n", keyword);
+ cupsFilePrintf(fp, "*InputSlot %s\n", ppdname);
}
if ((keyword = ippGetString(ippFindAttribute(media_col, "media-type", IPP_TAG_ZERO), 0, NULL)) != NULL)
{
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
- cupsFilePrintf(fp, "*MediaType %s\n", keyword);
+ cupsFilePrintf(fp, "*MediaType %s\n", ppdname);
}
}
else if (!strcmp(member_name, "print-quality"))
@@ -5159,7 +5165,10 @@ _ppdCreateFromIPP2(
cupsFilePuts(fp, "\"\n*End\n");
if ((localized_name = _cupsMessageLookup(strings, preset_name)) != preset_name)
- cupsFilePrintf(fp, "*%s.APPrinterPreset %s/%s: \"\"\n", lang->language, preset_name, localized_name);
+ {
+ pwg_ppdize_name(preset_name, ppdname, sizeof(ppdname));
+ cupsFilePrintf(fp, "*%s.APPrinterPreset %s/%s: \"\"\n", lang->language, ppdname, localized_name);
+ }
}
}
@@ -5543,7 +5552,7 @@ pwg_ppdize_name(const char *ipp, /* I - IPP keyword */
*end; /* End of name buffer */
- if (!ipp)
+ if (!ipp || !_cups_isalnum(*ipp))
{
*name = '\0';
return;
@@ -5558,8 +5567,14 @@ pwg_ppdize_name(const char *ipp, /* I - IPP keyword */
ipp ++;
*ptr++ = (char)toupper(*ipp++ & 255);
}
- else
+ else if (*ipp == '_' || *ipp == '.' || *ipp == '-' || _cups_isalnum(*ipp))
+ {
*ptr++ = *ipp++;
+ }
+ else
+ {
+ ipp ++;
+ }
}
*ptr = '\0';
--
2.46.1

@ -1,220 +0,0 @@
diff -up cups-2.3.3op2/cups/ppd-cache.c.quote-ppd-strings cups-2.3.3op2/cups/ppd-cache.c
--- cups-2.3.3op2/cups/ppd-cache.c.quote-ppd-strings 2024-09-30 17:24:43.345405200 +0200
+++ cups-2.3.3op2/cups/ppd-cache.c 2024-09-30 17:29:35.752595925 +0200
@@ -29,6 +29,7 @@
*/
static int cups_get_url(http_t **http, const char *url, char *name, size_t namesize);
+static void ppd_put_string(cups_file_t *fp, cups_lang_t *lang, cups_array_t *strings, const char *ppd_option, const char *ppd_choice, const char *pwg_msgid);
static void pwg_add_finishing(cups_array_t *finishings, ipp_finishings_t template, const char *name, const char *value);
static void pwg_add_message(cups_array_t *a, const char *msg, const char *str);
static int pwg_compare_finishings(_pwg_finishings_t *a, _pwg_finishings_t *b);
@@ -3211,7 +3212,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
if ((attr = ippFindAttribute(response, "printer-charge-info-uri", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr))
cupsFilePrintf(fp, "*cupsChargeInfoURI: \"%s\"\n", ippGetString(attr, 0, NULL));
- if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL)
+ if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr))
{
http_t *http = NULL; /* Connection to printer */
char stringsfile[1024]; /* Temporary strings file */
@@ -3768,13 +3769,16 @@ _ppdCreateFromIPP(char *buffer, /* I -
cupsFilePrintf(fp, "*DefaultInputSlot: %s\n", ppdname);
for (j = 0; j < (int)(sizeof(sources) / sizeof(sources[0])); j ++)
+ {
if (!strcmp(sources[j], keyword))
{
snprintf(msgid, sizeof(msgid), "media-source.%s", keyword);
+
cupsFilePrintf(fp, "*InputSlot %s: \"<</MediaPosition %d>>setpagedevice\"\n", ppdname, j);
- cupsFilePrintf(fp, "*%s.InputSlot %s/%s: \"\"\n", lang->language, ppdname, _cupsLangString(lang, msgid));
+ ppd_put_string(fp, lang, strings, "InputSlot", ppdname, msgid);
break;
}
+ }
}
cupsFilePuts(fp, "*CloseUI: *InputSlot\n");
}
@@ -3800,12 +3804,9 @@ _ppdCreateFromIPP(char *buffer, /* I -
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
snprintf(msgid, sizeof(msgid), "media-type.%s", keyword);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
cupsFilePrintf(fp, "*MediaType %s: \"<</MediaType(%s)>>setpagedevice\"\n", ppdname, ppdname);
- cupsFilePrintf(fp, "*%s.MediaType %s/%s: \"\"\n", lang->language, ppdname, msgstr);
+ ppd_put_string(fp, lang, strings, "MediaType", ppdname, msgid);
}
cupsFilePuts(fp, "*CloseUI: *MediaType\n");
}
@@ -4035,12 +4036,9 @@ _ppdCreateFromIPP(char *buffer, /* I -
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
snprintf(msgid, sizeof(msgid), "output-bin.%s", keyword);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
cupsFilePrintf(fp, "*OutputBin %s: \"\"\n", ppdname);
- cupsFilePrintf(fp, "*%s.OutputBin %s/%s: \"\"\n", lang->language, ppdname, msgstr);
+ ppd_put_string(fp, lang, strings, "OutputBin", ppdname, msgid);
if ((tray_ptr = ippGetOctetString(trays, i, &tray_len)) != NULL)
{
@@ -4159,9 +4157,6 @@ _ppdCreateFromIPP(char *buffer, /* I -
cupsArrayAdd(names, (char *)keyword);
snprintf(msgid, sizeof(msgid), "finishings.%d", value);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
if (value >= IPP_FINISHINGS_NONE && value <= IPP_FINISHINGS_LAMINATE)
ppd_keyword = base_keywords[value - IPP_FINISHINGS_NONE];
@@ -4176,7 +4171,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
continue;
cupsFilePrintf(fp, "*StapleLocation %s: \"\"\n", ppd_keyword);
- cupsFilePrintf(fp, "*%s.StapleLocation %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
+ ppd_put_string(fp, lang, strings, "StapleLocation", ppd_keyword, msgid);
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*StapleLocation %s\"\n", value, keyword, ppd_keyword);
}
@@ -4239,9 +4234,6 @@ _ppdCreateFromIPP(char *buffer, /* I -
cupsArrayAdd(names, (char *)keyword);
snprintf(msgid, sizeof(msgid), "finishings.%d", value);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
if (value >= IPP_FINISHINGS_NONE && value <= IPP_FINISHINGS_LAMINATE)
ppd_keyword = base_keywords[value - IPP_FINISHINGS_NONE];
@@ -4256,7 +4248,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
continue;
cupsFilePrintf(fp, "*FoldType %s: \"\"\n", ppd_keyword);
- cupsFilePrintf(fp, "*%s.FoldType %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
+ ppd_put_string(fp, lang, strings, "FoldType", ppd_keyword, msgid);
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*FoldType %s\"\n", value, keyword, ppd_keyword);
}
@@ -4327,9 +4319,6 @@ _ppdCreateFromIPP(char *buffer, /* I -
cupsArrayAdd(names, (char *)keyword);
snprintf(msgid, sizeof(msgid), "finishings.%d", value);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
if (value >= IPP_FINISHINGS_NONE && value <= IPP_FINISHINGS_LAMINATE)
ppd_keyword = base_keywords[value - IPP_FINISHINGS_NONE];
@@ -4344,7 +4333,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
continue;
cupsFilePrintf(fp, "*PunchMedia %s: \"\"\n", ppd_keyword);
- cupsFilePrintf(fp, "*%s.PunchMedia %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
+ ppd_put_string(fp, lang, strings, "PunchMedia", ppd_keyword, msgid);
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*PunchMedia %s\"\n", value, keyword, ppd_keyword);
}
@@ -4415,9 +4404,6 @@ _ppdCreateFromIPP(char *buffer, /* I -
cupsArrayAdd(names, (char *)keyword);
snprintf(msgid, sizeof(msgid), "finishings.%d", value);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
if (value == IPP_FINISHINGS_TRIM)
ppd_keyword = "Auto";
@@ -4425,7 +4411,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
ppd_keyword = trim_keywords[value - IPP_FINISHINGS_TRIM_AFTER_PAGES];
cupsFilePrintf(fp, "*CutMedia %s: \"\"\n", ppd_keyword);
- cupsFilePrintf(fp, "*%s.CutMedia %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
+ ppd_put_string(fp, lang, strings, "CutMedia", ppd_keyword, msgid);
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*CutMedia %s\"\n", value, keyword, ppd_keyword);
}
@@ -4467,9 +4453,6 @@ _ppdCreateFromIPP(char *buffer, /* I -
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
snprintf(msgid, sizeof(msgid), "finishing-template.%s", keyword);
- if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
cupsFilePrintf(fp, "*cupsFinishingTemplate %s: \"\n", ppdname);
for (finishing_attr = ippFirstAttribute(finishing_col); finishing_attr; finishing_attr = ippNextAttribute(finishing_col))
@@ -4484,7 +4467,7 @@ _ppdCreateFromIPP(char *buffer, /* I -
}
}
cupsFilePuts(fp, "\"\n");
- cupsFilePrintf(fp, "*%s.cupsFinishingTemplate %s/%s: \"\"\n", lang->language, ppdname, msgstr);
+ ppd_put_string(fp, lang, strings, "cupsFinishingTemplate", ppdname, msgid);
cupsFilePuts(fp, "*End\n");
}
@@ -4811,11 +4794,9 @@ _ppdCreateFromIPP(char *buffer, /* I -
cupsFilePuts(fp, "\"\n*End\n");
- if ((localized_name = _cupsMessageLookup(strings, preset_name)) != preset_name)
- {
- pwg_ppdize_name(preset_name, ppdname, sizeof(ppdname));
- cupsFilePrintf(fp, "*%s.APPrinterPreset %s/%s: \"\"\n", lang->language, ppdname, localized_name);
- }
+ snprintf(msgid, sizeof(msgid), "preset-name.%s", preset_name);
+ pwg_ppdize_name(preset_name, ppdname, sizeof(ppdname));
+ ppd_put_string(fp, lang, strings, "APPrinterPreset", ppdname, msgid);
}
}
@@ -5054,6 +5035,43 @@ cups_get_url(http_t **http, /* IO -
}
+/*
+ * 'ppd_put_strings()' - Write localization attributes to a PPD file.
+ */
+
+static void
+ppd_put_string(cups_file_t *fp, /* I - PPD file */
+ cups_lang_t *lang, /* I - Language */
+ cups_array_t *strings, /* I - Strings */
+ const char *ppd_option,/* I - PPD option */
+ const char *ppd_choice,/* I - PPD choice */
+ const char *pwg_msgid) /* I - PWG message ID */
+{
+ const char *text; /* Localized text */
+
+
+ if ((text = _cupsLangString(lang, pwg_msgid)) == pwg_msgid || !strcmp(pwg_msgid, text))
+ {
+ if ((text = _cupsMessageLookup(strings, pwg_msgid)) == pwg_msgid)
+ return;
+ }
+
+ // Add the first line of localized text...
+ cupsFilePrintf(fp, "*%s.%s %s/", lang->language, ppd_option, ppd_choice);
+ while (*text && *text != '\n')
+ {
+ // Escape ":" and "<"...
+ if (*text == ':' || *text == '<')
+ cupsFilePrintf(fp, "<%02X>", *text);
+ else
+ cupsFilePutChar(fp, *text);
+
+ text ++;
+ }
+ cupsFilePuts(fp, ": \"\"\n");
+}
+
+
/*
* 'pwg_add_finishing()' - Add a finishings value.
*/

@ -1,136 +0,0 @@
diff -up cups-2.3.3op2/cups/ppd-cache.c.make-model-refact cups-2.3.3op2/cups/ppd-cache.c
--- cups-2.3.3op2/cups/ppd-cache.c.make-model-refact 2024-09-30 17:19:35.443100091 +0200
+++ cups-2.3.3op2/cups/ppd-cache.c 2024-09-30 17:24:10.927162954 +0200
@@ -3027,9 +3027,10 @@ _ppdCreateFromIPP(char *buffer, /* I -
ipp_t *media_col, /* Media collection */
*media_size; /* Media size collection */
char make[256], /* Make and model */
- *model, /* Model name */
+ *mptr, /* Pointer into make and model */
ppdname[PPD_MAX_NAME];
/* PPD keyword */
+ const char *model; /* Model name */
int i, j, /* Looping vars */
count, /* Number of values */
bottom, /* Largest bottom margin */
@@ -3090,35 +3091,105 @@ _ppdCreateFromIPP(char *buffer, /* I -
}
/*
- * Standard stuff for PPD file...
+ * Get a sanitized make and model...
*/
- cupsFilePuts(fp, "*PPD-Adobe: \"4.3\"\n");
- cupsFilePuts(fp, "*FormatVersion: \"4.3\"\n");
- cupsFilePrintf(fp, "*FileVersion: \"%d.%d\"\n", CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR);
- cupsFilePuts(fp, "*LanguageVersion: English\n");
- cupsFilePuts(fp, "*LanguageEncoding: ISOLatin1\n");
- cupsFilePuts(fp, "*PSVersion: \"(3010.000) 0\"\n");
- cupsFilePuts(fp, "*LanguageLevel: \"3\"\n");
- cupsFilePuts(fp, "*FileSystem: False\n");
- cupsFilePuts(fp, "*PCFileName: \"ippeve.ppd\"\n");
+ if ((attr = ippFindAttribute(response, "printer-make-and-model", IPP_TAG_TEXT)) != NULL && ippValidateAttribute(attr))
+ {
+ /*
+ * Sanitize the model name to only contain PPD-safe characters.
+ */
- if ((attr = ippFindAttribute(response, "printer-make-and-model", IPP_TAG_TEXT)) != NULL)
strlcpy(make, ippGetString(attr, 0, NULL), sizeof(make));
+
+ for (mptr = make; *mptr; mptr ++)
+ {
+ if (*mptr < ' ' || *mptr >= 127 || *mptr == '\"')
+ {
+ /*
+ * Truncate the make and model on the first bad character...
+ */
+
+ *mptr = '\0';
+ break;
+ }
+ }
+
+ while (mptr > make)
+ {
+ /*
+ * Strip trailing whitespace...
+ */
+
+ mptr --;
+ if (*mptr == ' ')
+ *mptr = '\0';
+ }
+
+ if (!make[0])
+ {
+ /*
+ * Use a default make and model if nothing remains...
+ */
+
+ strlcpy(make, "Unknown", sizeof(make));
+ }
+ }
else
- strlcpy(make, "Unknown Printer", sizeof(make));
+ {
+ /*
+ * Use a default make and model...
+ */
+
+ strlcpy(make, "Unknown", sizeof(make));
+ }
if (!_cups_strncasecmp(make, "Hewlett Packard ", 16) ||
!_cups_strncasecmp(make, "Hewlett-Packard ", 16))
{
+ /*
+ * Normalize HP printer make and model...
+ */
+
model = make + 16;
strlcpy(make, "HP", sizeof(make));
+
+ if (!_cups_strncasecmp(model, "HP ", 3))
+ model += 3;
+ }
+ else if ((mptr = strchr(make, ' ')) != NULL)
+ {
+ /*
+ * Separate "MAKE MODEL"...
+ */
+
+ while (*mptr && *mptr == ' ')
+ *mptr++ = '\0';
+
+ model = mptr;
}
- else if ((model = strchr(make, ' ')) != NULL)
- *model++ = '\0';
else
- model = make;
+ {
+ /*
+ * No separate model name...
+ */
+
+ model = "Printer";
+ }
+
+ /*
+ * Standard stuff for PPD file...
+ */
+ cupsFilePuts(fp, "*PPD-Adobe: \"4.3\"\n");
+ cupsFilePuts(fp, "*FormatVersion: \"4.3\"\n");
+ cupsFilePrintf(fp, "*FileVersion: \"%d.%d\"\n", CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR);
+ cupsFilePuts(fp, "*LanguageVersion: English\n");
+ cupsFilePuts(fp, "*LanguageEncoding: ISOLatin1\n");
+ cupsFilePuts(fp, "*PSVersion: \"(3010.000) 0\"\n");
+ cupsFilePuts(fp, "*LanguageLevel: \"3\"\n");
+ cupsFilePuts(fp, "*FileSystem: False\n");
+ cupsFilePuts(fp, "*PCFileName: \"ippeve.ppd\"\n");
cupsFilePrintf(fp, "*Manufacturer: \"%s\"\n", make);
cupsFilePrintf(fp, "*ModelName: \"%s\"\n", model);
cupsFilePrintf(fp, "*Product: \"(%s)\"\n", model);

@ -1,64 +0,0 @@
From d60341b3355fd8825bec00792f301ef99d715a93 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Wed, 3 Apr 2024 10:39:24 +0200
Subject: [PATCH] scheduler: Fix sending response headers to client
Sometimes headers are not correctly copied into response to the client
(some are missing). It happens because `sent_header` is set prematurely
before the actual send happens. The present code in affected `cupsdWriteClient`
scope looks like code remains from CUPS 1.6.3.
With the change, testing via curl gives reliable results all time.
---
scheduler/client.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/scheduler/client.c b/scheduler/client.c
index 62ac21c69..e7e312b8e 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -2400,23 +2400,12 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
httpSetField(con->http, field, value);
if (field == HTTP_FIELD_LOCATION)
- {
con->pipe_status = HTTP_STATUS_SEE_OTHER;
- con->sent_header = 2;
- }
- else
- con->sent_header = 1;
}
else if (!_cups_strcasecmp(con->header, "Status") && value)
- {
con->pipe_status = (http_status_t)atoi(value);
- con->sent_header = 2;
- }
else if (!_cups_strcasecmp(con->header, "Set-Cookie") && value)
- {
httpSetCookie(con->http, value);
- con->sent_header = 1;
- }
}
/*
@@ -2451,6 +2440,8 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
cupsdCloseClient(con);
return;
}
+
+ con->sent_header = 1;
}
else
{
@@ -2459,6 +2450,8 @@ cupsdWriteClient(cupsd_client_t *con) /* I - Client connection */
cupsdCloseClient(con);
return;
}
+
+ con->sent_header = 1;
}
}
else
--
2.44.0

@ -1,35 +0,0 @@
From de4f8c196106033e4c372dce3e91b9d42b0b9444 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Thu, 26 May 2022 06:27:04 +0200
Subject: [PATCH] scheduler/cert.c: Fix string comparison (fixes
CVE-2022-26691)
The previous algorithm didn't expect the strings can have a different
length, so one string can be a substring of the other and such substring
was reported as equal to the longer string.
---
CHANGES.md | 1 +
scheduler/cert.c | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/scheduler/cert.c b/scheduler/cert.c
index b268bf1b2..9b65b96c9 100644
--- a/scheduler/cert.c
+++ b/scheduler/cert.c
@@ -444,5 +444,12 @@ ctcompare(const char *a, /* I - First string */
b ++;
}
- return (result);
+ /*
+ * The while loop finishes when *a == '\0' or *b == '\0'
+ * so after the while loop either both *a and *b == '\0',
+ * or one points inside a string, so when we apply bitwise OR on *a,
+ * *b and result, we get a non-zero return value if the compared strings don't match.
+ */
+
+ return (result | *a | *b);
}
--
2.36.1

@ -1,36 +0,0 @@
From db9cecdd932e58c51d2d659f63415ad47d151717 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Fri, 1 Sep 2023 17:11:54 +0200
Subject: [PATCH] scheduler/conf.c: Print to stderr if we don't open
cups-files.conf
In case cupsd can't open the cups-files.conf, the error message is lost
if journal and syslog don't exist or work on system (usually in
containers).
Log the error into stderr at this place to get the error message if
needed.
---
scheduler/conf.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scheduler/conf.c b/scheduler/conf.c
index b18535162..4fa7eb1df 100644
--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -811,11 +811,7 @@ cupsdReadConfiguration(void)
cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile);
else
{
-#ifdef HAVE_SYSTEMD_SD_JOURNAL_H
- sd_journal_print(LOG_ERR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno));
-#else
- syslog(LOG_LPR, "Unable to open \"%s\" - %s", CupsFilesFile, strerror(errno));
-#endif /* HAVE_SYSTEMD_SD_JOURNAL_H */
+ fprintf(stderr, "Unable to read \"%s\" - %s\n", CupsFilesFile, strerror(errno));
return (0);
}
--
2.41.0

@ -1,38 +0,0 @@
From 08e9b6e1f8497a8159d6bd7cd6dc96ae79a2e704 Mon Sep 17 00:00:00 2001
From: Bryan Mason <bmason@redhat.com>
Date: Thu, 15 Jul 2021 16:26:27 -0700
Subject: [PATCH] scheduler/job.c: use gziptoany for raw files (not just raw
printers)
---
scheduler/job.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scheduler/job.c b/scheduler/job.c
index d8c2efcc6..b448acda5 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -501,6 +501,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
int backroot; /* Run backend as root? */
int pid; /* Process ID of new filter process */
int banner_page; /* 1 if banner page, 0 otherwise */
+ int raw_file; /* 1 if file type is vnd.cups-raw */
int filterfds[2][2] = { { -1, -1 }, { -1, -1 } };
/* Pipes used between filters */
int envc; /* Number of environment variables */
@@ -746,8 +747,11 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
* Add decompression/raw filter as needed...
*/
+ raw_file = !strcmp(job->filetypes[job->current_file]->super, "application") &&
+ !strcmp(job->filetypes[job->current_file]->type, "vnd.cups-raw");
+
if ((job->compressions[job->current_file] && (!job->printer->remote || job->num_files == 1)) ||
- (!job->printer->remote && job->printer->raw && job->num_files > 1))
+ (!job->printer->remote && (job->printer->raw || raw_file) && job->num_files > 1))
{
/*
* Add gziptoany filter to the front of the list...
--
2.31.1

@ -1,94 +0,0 @@
diff --git a/scheduler/conf.c b/scheduler/conf.c
index c113eb3..77ce179 100644
--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -573,6 +573,18 @@ cupsdReadConfiguration(void)
cupsdDeleteAllListeners();
+ /*
+ * Allocate Listeners array
+ */
+
+ Listeners = cupsArrayNew(NULL, NULL);
+
+ if (!Listeners)
+ {
+ fprintf(stderr, "Unable to allocate memory for array Listeners.\n");
+ return (0);
+ }
+
old_remote_port = RemotePort;
RemotePort = 0;
@@ -1080,28 +1092,6 @@ cupsdReadConfiguration(void)
}
}
- /*
- * Check that we have at least one listen/port line; if not, report this
- * as an error and exit!
- */
-
- if (cupsArrayCount(Listeners) == 0)
- {
- /*
- * No listeners!
- */
-
- cupsdLogMessage(CUPSD_LOG_EMERG,
- "No valid Listen or Port lines were found in the "
- "configuration file.");
-
- /*
- * Commit suicide...
- */
-
- cupsdEndProcess(getpid(), 0);
- }
-
/*
* Set the default locale using the language and charset...
*/
@@ -3162,17 +3152,6 @@ read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
* Allocate another listener...
*/
- if (!Listeners)
- Listeners = cupsArrayNew(NULL, NULL);
-
- if (!Listeners)
- {
- cupsdLogMessage(CUPSD_LOG_ERROR,
- "Unable to allocate %s at line %d - %s.",
- line, linenum, strerror(errno));
- break;
- }
-
if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
diff --git a/scheduler/main.c b/scheduler/main.c
index a6e2c3a..b935c52 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -2113,6 +2113,21 @@ service_checkin(void)
service_add_listener(fd, 0);
}
#endif /* HAVE_LAUNCHD */
+
+ if (cupsArrayCount(Listeners) == 0)
+ {
+ /*
+ * No listeners!
+ */
+
+ cupsdLogMessage(CUPSD_LOG_EMERG, "No listener sockets present.");
+
+ /*
+ * Commit suicide...
+ */
+
+ cupsdEndProcess(getpid(), 0);
+ }
}

@ -1,16 +0,0 @@
diff --git a/scheduler/main.c b/scheduler/main.c
index e1fa357..53ca94a 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -1760,6 +1760,11 @@ select_timeout(int fds) /* I - Number of descriptors returned */
/*
* Check for any job activity...
*/
+ if (JobHistoryUpdate && timeout > JobHistoryUpdate)
+ {
+ timeout = JobHistoryUpdate;
+ why = "update job history";
+ }
for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
job;

@ -1,177 +0,0 @@
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index 02b9d9d..669cb65 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -619,6 +619,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
*oldinfo; /* Old printer information */
const cgi_file_t *file; /* Uploaded file, if any */
const char *var; /* CGI variable */
+ char *ppd_name = NULL; /* Pointer to PPD name */
char uri[HTTP_MAX_URI], /* Device or printer URI */
*uriptr, /* Pointer into URI */
evefile[1024] = ""; /* IPP Everywhere PPD file */
@@ -1124,12 +1125,12 @@ do_am_printer(http_t *http, /* I - HTTP connection */
if (!file)
{
- var = cgiGetVariable("PPD_NAME");
- if (!strcmp(var, "everywhere"))
+ ppd_name = cgiGetVariable("PPD_NAME");
+ if (!strcmp(ppd_name, "everywhere"))
get_printer_ppd(cgiGetVariable("DEVICE_URI"), evefile, sizeof(evefile));
- else if (strcmp(var, "__no_change__"))
+ else if (strcmp(ppd_name, "__no_change__"))
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "ppd-name",
- NULL, var);
+ NULL, ppd_name);
}
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-location",
@@ -1219,7 +1220,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
cgiCopyTemplateLang("printer-modified.tmpl");
}
- else
+ else if (ppd_name && (strcmp(ppd_name, "everywhere") == 0 || strstr(ppd_name, "driverless")))
{
/*
* Set the printer options...
@@ -1229,6 +1230,16 @@ do_am_printer(http_t *http, /* I - HTTP connection */
do_set_options(http, 0);
return;
}
+ else
+ {
+ /*
+ * If we don't have an everywhere model, show printer-added
+ * template with warning about drivers going away...
+ */
+
+ cgiStartHTML(title);
+ cgiCopyTemplateLang("printer-added.tmpl");
+ }
cgiEndHTML();
}
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 3bfe4a8..248bdba 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -950,6 +950,8 @@ cupsdLoadAllPrinters(void)
*value, /* Pointer to value */
*valueptr; /* Pointer into value */
cupsd_printer_t *p; /* Current printer */
+ int found_raw = 0; /* Flag whether raw queue is installed */
+ int found_driver = 0; /* Flag whether queue with classic driver is installed */
/*
@@ -1025,6 +1027,30 @@ cupsdLoadAllPrinters(void)
cupsdSetPrinterAttrs(p);
+ if ((p->device_uri && strncmp(p->device_uri, "ipp:", 4) && strncmp(p->device_uri, "ipps:", 5) && strncmp(p->device_uri, "implicitclass:", 14)) ||
+ !p->make_model ||
+ (p->make_model && strstr(p->make_model, "IPP Everywhere") == NULL && strstr(p->make_model, "driverless") == NULL))
+ {
+ /*
+ * Warn users about printer drivers and raw queues will be deprecated.
+ * It will warn users in the following scenarios:
+ * - the queue doesn't use ipp, ipps or implicitclass backend, which means
+ * it doesn't communicate via IPP and is raw or uses a driver for sure
+ * - the queue doesn't have make_model - it is raw
+ * - the queue uses a correct backend, but the model is not IPP Everywhere/driverless
+ */
+ if (!p->make_model)
+ {
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Queue %s is a raw queue, which is deprecated.", p->name);
+ found_raw = 1;
+ }
+ else
+ {
+ cupsdLogMessage(CUPSD_LOG_DEBUG, "Queue %s uses a printer driver, which is deprecated.", p->name);
+ found_driver = 1;
+ }
+ }
+
if (strncmp(p->device_uri, "file:", 5) && p->state != IPP_PRINTER_STOPPED)
{
/*
@@ -1415,6 +1441,12 @@ cupsdLoadAllPrinters(void)
}
}
+ if (found_raw)
+ cupsdLogMessage(CUPSD_LOG_WARN, "Raw queues are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103");
+
+ if (found_driver)
+ cupsdLogMessage(CUPSD_LOG_WARN, "Printer drivers are deprecated and will stop working in a future version of CUPS. See https://github.com/OpenPrinting/cups/issues/103");
+
cupsFileClose(fp);
}
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index ca6d386..daf24d5 100644
--- a/systemv/lpadmin.c
+++ b/systemv/lpadmin.c
@@ -632,7 +632,7 @@ main(int argc, /* I - Number of command-line arguments */
num_options = cupsRemoveOption("ppd-name", num_options, &options);
}
- else if (ppd_name || file)
+ else if ((ppd_name && strncmp(ppd_name, "driverless:", 11)) || file)
{
_cupsLangPuts(stderr, _("lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS."));
}
diff --git a/templates/choose-model.tmpl b/templates/choose-model.tmpl
index e916cf8..9c9b71f 100644
--- a/templates/choose-model.tmpl
+++ b/templates/choose-model.tmpl
@@ -39,7 +39,7 @@
<TD>
<SELECT NAME="PPD_NAME" SIZE="10">
{op=add-printer?:<OPTION VALUE="__no_change__" SELECTED>Current Driver - {current_make_and_model}</OPTION>:}
-{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>{current_make_and_model} - IPP Everywhere &trade;</OPTION>:}
+{show_ipp_everywhere?<OPTION VALUE="everywhere" SELECTED>{current_make_and_model?{current_make_and_model} -:} IPP Everywhere &trade;</OPTION>:}
{[ppd_name]<OPTION VALUE="{ppd_name}" {op=modify-printer?:{?current_make_and_model={ppd_make_and_model}?SELECTED:}}>{ppd_make_and_model} ({ppd_natural_language})
}</SELECT>
</TD>
diff --git a/templates/printer-added.tmpl b/templates/printer-added.tmpl
index 0ccf6d3..9ebc835 100644
--- a/templates/printer-added.tmpl
+++ b/templates/printer-added.tmpl
@@ -1,4 +1,15 @@
-<H2 CLASS="title">Add Printer</H2>
+<H2 CLASS="title">Add Printer {printer_name}</H2>
<P>Printer <A HREF="/printers/{printer_name}">{printer_name}</A> has been added
successfully.
+
+<blockquote>
+<b>Note:<b>Printer drivers and raw queues are deprecated and will stop working in a future version of CUPS.
+</blockquote>
+
+<FORM ACTION="admin/" METHOD="POST">
+<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="set-printer-options">
+<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="SUBMIT" VALUE="Set Printer Options">
+</FORM>
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index 4498a8c..8776874 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -1049,10 +1049,10 @@ fi
# Warning log messages
count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | $GREP -v 'libusb error' | $GREP -v ColorManager | $GREP -v 'Avahi client failed' | wc -l | awk '{print $1}'`
-if test $count != 8; then
- echo "FAIL: $count warning messages, expected 8."
+if test $count != 9; then
+ echo "FAIL: $count warning messages, expected 9."
$GREP '^W ' $BASE/log/error_log
- echo " <p>FAIL: $count warning messages, expected 8.</p>" >>$strfile
+ echo " <p>FAIL: $count warning messages, expected 9.</p>" >>$strfile
echo " <pre>" >>$strfile
$GREP '^W ' $BASE/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo " </pre>" >>$strfile

@ -1,6 +1,6 @@
diff -up cups-2.3.3/backend/failover.c.failover cups-2.3.3/backend/failover.c
--- cups-2.3.3/backend/failover.c.failover 2020-06-11 08:49:20.515264358 +0200
+++ cups-2.3.3/backend/failover.c 2020-06-11 08:49:20.515264358 +0200
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).
@ -839,13 +839,13 @@ diff -up cups-2.3.3/backend/failover.c.failover cups-2.3.3/backend/failover.c
+ else
+ return (NULL);
+}
diff -up cups-2.3.3/backend/Makefile.failover cups-2.3.3/backend/Makefile
--- cups-2.3.3/backend/Makefile.failover 2020-04-27 20:04:29.000000000 +0200
+++ cups-2.3.3/backend/Makefile 2020-06-11 08:52:31.212642019 +0200
@@ -22,6 +22,7 @@ include ../Makedefs
RBACKENDS = \
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 = \
@ -858,7 +858,7 @@ diff -up cups-2.3.3/backend/Makefile.failover cups-2.3.3/backend/Makefile
dnssd.o \
snmp.o \
socket.o \
@@ -276,6 +278,15 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend
@@ -264,6 +266,15 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend
#

@ -1,124 +0,0 @@
diff --git a/cups/http-support.c b/cups/http-support.c
index a4bc079..9ee2309 100644
--- a/cups/http-support.c
+++ b/cups/http-support.c
@@ -1430,6 +1430,12 @@ _httpSetDigestAuthString(
* Use old RFC 2069 Digest method...
*/
+ if (cg->digestoptions == _CUPS_DIGESTOPTIONS_DENYMD5)
+ {
+ DEBUG_puts("3_httpSetDigestAuthString: MD5 Digest is disabled.");
+ return (0);
+ }
+
/* H(A1) = H(username:realm:password) */
snprintf(temp, sizeof(temp), "%s:%s:%s", username, http->realm, password);
hashsize = (size_t)cupsHashData("md5", (unsigned char *)temp, strlen(temp), hash, sizeof(hash));
diff --git a/cups/md5passwd.c b/cups/md5passwd.c
index 9af5de2..5c9a64e 100644
--- a/cups/md5passwd.c
+++ b/cups/md5passwd.c
@@ -19,6 +19,9 @@
/*
* 'httpMD5()' - Compute the MD5 sum of the username:group:password.
*
+ * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
+ * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
+ *
* @deprecated@
*/
@@ -28,22 +31,13 @@ httpMD5(const char *username, /* I - User name */
const char *passwd, /* I - Password string */
char md5[33]) /* O - MD5 string */
{
- unsigned char sum[16]; /* Sum data */
- char line[256]; /* Line to sum */
-
-
- /*
- * Compute the MD5 sum of the user name, group name, and password.
- */
+ (void)username;
+ (void)realm;
+ (void)passwd;
- snprintf(line, sizeof(line), "%s:%s:%s", username, realm, passwd);
- cupsHashData("md5", (unsigned char *)line, strlen(line), sum, sizeof(sum));
+ md5[0] = '\0';
- /*
- * Return the sum...
- */
-
- return ((char *)cupsHashString(sum, sizeof(sum), md5, 33));
+ return (NULL);
}
@@ -52,6 +46,9 @@ httpMD5(const char *username, /* I - User name */
* with the server-supplied nonce value, method, and
* request-uri.
*
+ * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
+ * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
+ *
* @deprecated@
*/
@@ -61,35 +58,22 @@ httpMD5Final(const char *nonce, /* I - Server nonce value */
const char *resource, /* I - Resource path */
char md5[33]) /* IO - MD5 sum */
{
- unsigned char sum[16]; /* Sum data */
- char line[1024]; /* Line of data */
- char a2[33]; /* Hash of method and resource */
-
+ (void)nonce;
+ (void)method;
+ (void)resource;
- /*
- * First compute the MD5 sum of the method and resource...
- */
+ md5[0] = '\0';
- snprintf(line, sizeof(line), "%s:%s", method, resource);
- cupsHashData("md5", (unsigned char *)line, strlen(line), sum, sizeof(sum));
- cupsHashString(sum, sizeof(sum), a2, sizeof(a2));
-
- /*
- * Then combine A1 (MD5 of username, realm, and password) with the nonce
- * and A2 (method + resource) values to get the final MD5 sum for the
- * request...
- */
-
- snprintf(line, sizeof(line), "%s:%s:%s", md5, nonce, a2);
- cupsHashData("md5", (unsigned char *)line, strlen(line), sum, sizeof(sum));
-
- return ((char *)cupsHashString(sum, sizeof(sum), md5, 33));
+ return (NULL);
}
/*
* 'httpMD5String()' - Convert an MD5 sum to a character string.
*
+ * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
+ * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
+ *
* @deprecated@
*/
@@ -98,5 +82,9 @@ httpMD5String(const unsigned char *sum, /* I - MD5 sum data */
char md5[33])
/* O - MD5 sum in hex */
{
- return ((char *)cupsHashString(sum, 16, md5, 33));
+ (void)sum;
+
+ md5[0] = '\0';
+
+ return (NULL);
}

@ -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);
}

@ -1,49 +0,0 @@
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index 733b06c..bb770f0 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -123,21 +123,35 @@ if test -n "$GCC"; then
OPTIM="-fPIC $OPTIM"
fi
- # The -fstack-protector option is available with some versions of
- # GCC and adds "stack canaries" which detect when the return address
- # has been overwritten, preventing many types of exploit attacks.
- AC_MSG_CHECKING(whether compiler supports -fstack-protector)
+ # The -fstack-protector-strong and -fstack-protector options are available
+ # with some versions of# GCC and adds "stack canaries" which detect
+ # when the return address has been overwritten, preventing many types of exploit attacks.
+ # First check for -fstack-protector-strong, then for -fstack-protector...
+ AC_MSG_CHECKING([whether compiler supports -fstack-protector-strong])
OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fstack-protector"
- AC_TRY_LINK(,,
+ CFLAGS="$CFLAGS -fstack-protector-strong"
+ AC_TRY_LINK(,,[
if test "x$LSB_BUILD" = xy; then
# Can't use stack-protector with LSB binaries...
OPTIM="$OPTIM -fno-stack-protector"
else
- OPTIM="$OPTIM -fstack-protector"
+ OPTIM="$OPTIM -fstack-protector-strong"
fi
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no))
+ AC_MSG_RESULT(yes)
+ ], [
+ AC_MSG_CHECKING([whether compiler supports -fstack-protector])
+ CFLAGS="$OLDCFLAGS -fstack-protector"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()], [
+ AS_IF([test "x$LSB_BUILD" = xy], [
+ # Can't use stack-protector with LSB binaries...
+ OPTIM="$OPTIM -fno-stack-protector"
+ ], [
+ OPTIM="$OPTIM -fstack-protector"
+ ])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ ])
CFLAGS="$OLDCFLAGS"
if test "x$LSB_BUILD" != xy; then

@ -1,115 +0,0 @@
diff --git a/cups/auth.c b/cups/auth.c
index db45bbb..b6fec6b 100644
--- a/cups/auth.c
+++ b/cups/auth.c
@@ -90,6 +90,7 @@ static void cups_gss_printf(OM_uint32 major_status, OM_uint32 minor_status,
# define cups_gss_printf(major, minor, message)
# endif /* DEBUG */
#endif /* HAVE_GSSAPI */
+static int cups_is_local_connection(http_t *http);
static int cups_local_auth(http_t *http);
@@ -174,10 +175,10 @@ cupsDoAuthentication(
DEBUG_printf(("2cupsDoAuthentication: Trying scheme \"%s\"...", scheme));
#ifdef HAVE_GSSAPI
- if (!_cups_strcasecmp(scheme, "Negotiate"))
+ if (!_cups_strcasecmp(scheme, "Negotiate") && !cups_is_local_connection(http))
{
/*
- * Kerberos authentication...
+ * Kerberos authentication to remote server...
*/
int gss_status; /* Auth status */
@@ -201,7 +202,9 @@ cupsDoAuthentication(
}
else
#endif /* HAVE_GSSAPI */
- if (_cups_strcasecmp(scheme, "Basic") && _cups_strcasecmp(scheme, "Digest"))
+ if (_cups_strcasecmp(scheme, "Basic") &&
+ _cups_strcasecmp(scheme, "Digest") &&
+ _cups_strcasecmp(scheme, "Negotiate"))
{
/*
* Other schemes not yet supported...
@@ -215,7 +218,7 @@ cupsDoAuthentication(
* See if we should retry the current username:password...
*/
- if ((http->digest_tries > 1 || !http->userpass[0]) && (!_cups_strcasecmp(scheme, "Basic") || (!_cups_strcasecmp(scheme, "Digest"))))
+ if (http->digest_tries > 1 || !http->userpass[0])
{
/*
* Nope - get a new password from the user...
@@ -295,7 +298,7 @@ cupsDoAuthentication(
}
}
- if (http->authstring)
+ if (http->authstring && http->authstring[0])
{
DEBUG_printf(("1cupsDoAuthentication: authstring=\"%s\".", http->authstring));
@@ -916,6 +919,14 @@ cups_gss_printf(OM_uint32 major_status,/* I - Major status code */
# endif /* DEBUG */
#endif /* HAVE_GSSAPI */
+static int /* O - 0 if not a local connection */
+ /* 1 if local connection */
+cups_is_local_connection(http_t *http) /* I - HTTP connection to server */
+{
+ if (!httpAddrLocalhost(http->hostaddr) && _cups_strcasecmp(http->hostname, "localhost") != 0)
+ return 0;
+ return 1;
+}
/*
* 'cups_local_auth()' - Get the local authorization certificate if
@@ -958,7 +969,7 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
* See if we are accessing localhost...
*/
- if (!httpAddrLocalhost(http->hostaddr) && _cups_strcasecmp(http->hostname, "localhost") != 0)
+ if (!cups_is_local_connection(http))
{
DEBUG_puts("8cups_local_auth: Not a local connection!");
return (1);
@@ -1032,11 +1043,6 @@ cups_local_auth(http_t *http) /* I - HTTP connection to server */
}
# endif /* HAVE_AUTHORIZATION_H */
-# ifdef HAVE_GSSAPI
- if (cups_auth_find(www_auth, "Negotiate"))
- return (1);
-# endif /* HAVE_GSSAPI */
-
# if defined(SO_PEERCRED) && defined(AF_LOCAL)
/*
* See if we can authenticate using the peer credentials provided over a
diff --git a/scheduler/client.c b/scheduler/client.c
index 89c76bf..40708d9 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -2244,18 +2244,13 @@ cupsdSendHeader(
}
else if (auth_type == CUPSD_AUTH_NEGOTIATE)
{
-#if defined(SO_PEERCRED) && defined(AF_LOCAL)
- if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL)
- strlcpy(auth_str, "PeerCred", sizeof(auth_str));
- else
-#endif /* SO_PEERCRED && AF_LOCAL */
strlcpy(auth_str, "Negotiate", sizeof(auth_str));
}
- if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE && !con->is_browser && !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost"))
+ if (con->best && !con->is_browser && !_cups_strcasecmp(httpGetHostname(con->http, NULL, 0), "localhost"))
{
/*
- * Add a "trc" (try root certification) parameter for local non-Kerberos
+ * Add a "trc" (try root certification) parameter for local
* requests when the request requires system group membership - then the
* client knows the root certificate can/should be used.
*

@ -1,16 +0,0 @@
diff --git a/scheduler/log.c b/scheduler/log.c
index 17331ff02..41ddb4cb9 100644
--- a/scheduler/log.c
+++ b/scheduler/log.c
@@ -569,11 +569,7 @@ cupsdLogJob(cupsd_job_t *job, /* I - Job */
* Format and write the log message...
*/
-#ifdef HAVE_SYSTEMD_SD_JOURNAL_H
- if (job && strcmp(ErrorLog, "syslog"))
-#else
if (job)
-#endif /* HAVE_SYSTEMD_SD_JOURNAL_H */
snprintf(jobmsg, sizeof(jobmsg), "[Job %d] %s", job->id, message);
else
strlcpy(jobmsg, message, sizeof(jobmsg));

@ -1,8 +1,8 @@
diff --git a/Makedefs.in b/Makedefs.in
index d1b1ae9..4dba556 100644
index 9211338..8a1e0be 100644
--- a/Makedefs.in
+++ b/Makedefs.in
@@ -161,7 +161,7 @@ ARFLAGS = @ARFLAGS@
@@ -162,7 +162,7 @@ ARFLAGS = @ARFLAGS@
BACKLIBS = @BACKLIBS@
BUILDDIRS = @BUILDDIRS@
CFLAGS = @CPPFLAGS@ @CFLAGS@
@ -54,14 +54,13 @@ index 0000000..55bd1bb
+ esac
+fi
diff --git a/config.h.in b/config.h.in
index 6343e6d..1be3ca1 100644
index 6940b96..363780a 100644
--- a/config.h.in
+++ b/config.h.in
@@ -693,4 +693,12 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
# endif /* __GNUC__ || __STDC_VERSION__ */
@@ -684,6 +684,13 @@ static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
#endif /* !HAVE_ABS && !abs */
+
+/*
+ * Are we trying to meet LSPP requirements?
+ */
@ -69,25 +68,27 @@ index 6343e6d..1be3ca1 100644
+#undef WITH_LSPP
+
+
#endif /* !_CUPS_CONFIG_H_ */
/*
* Building as a snap (snapcraft.io)?
*/
diff --git a/configure.ac b/configure.ac
index 93a4b97..47587c9 100644
index 3b5dd73..0e61044 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,8 @@ sinclude(config-scripts/cups-dnssd.m4)
@@ -40,6 +40,8 @@ sinclude(config-scripts/cups-container.m4)
sinclude(config-scripts/cups-startup.m4)
sinclude(config-scripts/cups-defaults.m4)
+sinclude(config-scripts/cups-lspp.m4)
+
dnl See what languages are available and make sure we generate the localization
dnl files as needed...
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
diff --git a/filter/common.c b/filter/common.c
index 672b7c8..f323abd 100644
index 22217be..070662f 100644
--- a/filter/common.c
+++ b/filter/common.c
@@ -11,6 +11,12 @@
@@ -12,6 +12,12 @@
* Include necessary headers...
*/
@ -100,7 +101,7 @@ index 672b7c8..f323abd 100644
#include "common.h"
#include <locale.h>
@@ -293,6 +299,18 @@ WriteLabelProlog(const char *label, /* I - Page label */
@@ -294,6 +300,18 @@ WriteLabelProlog(const char *label, /* I - Page label */
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
@ -119,7 +120,7 @@ index 672b7c8..f323abd 100644
/*
@@ -315,6 +333,124 @@ WriteLabelProlog(const char *label, /* I - Page label */
@@ -316,6 +334,124 @@ WriteLabelProlog(const char *label, /* I - Page label */
return;
}
@ -244,7 +245,7 @@ index 672b7c8..f323abd 100644
/*
* Set the classification + page label string...
*/
@@ -395,7 +531,10 @@ WriteLabelProlog(const char *label, /* I - Page label */
@@ -396,7 +532,10 @@ WriteLabelProlog(const char *label, /* I - Page label */
printf(" %.0f moveto ESPpl show\n", top - 14.0);
puts("pop");
puts("}bind put");
@ -256,10 +257,10 @@ index 672b7c8..f323abd 100644
/*
diff --git a/filter/pstops.c b/filter/pstops.c
index d251abb..8afff4a 100644
index 41090c8..87da143 100644
--- a/filter/pstops.c
+++ b/filter/pstops.c
@@ -3170,6 +3170,18 @@ write_label_prolog(pstops_doc_t *doc, /* I - Document info */
@@ -3171,6 +3171,18 @@ write_label_prolog(pstops_doc_t *doc, /* I - Document info */
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
@ -278,7 +279,7 @@ index d251abb..8afff4a 100644
/*
@@ -3192,6 +3204,124 @@ write_label_prolog(pstops_doc_t *doc, /* I - Document info */
@@ -3193,6 +3205,124 @@ write_label_prolog(pstops_doc_t *doc, /* I - Document info */
return;
}
@ -403,7 +404,7 @@ index d251abb..8afff4a 100644
/*
* Set the classification + page label string...
*/
@@ -3270,7 +3400,10 @@ write_label_prolog(pstops_doc_t *doc, /* I - Document info */
@@ -3271,7 +3401,10 @@ write_label_prolog(pstops_doc_t *doc, /* I - Document info */
doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0);
doc_puts(doc, "pop\n");
doc_puts(doc, "}bind put\n");
@ -415,10 +416,10 @@ index d251abb..8afff4a 100644
/*
diff --git a/scheduler/client.c b/scheduler/client.c
index cef4115..e186e4c 100644
index 779404c..bfb9210 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -19,12 +19,20 @@
@@ -20,12 +20,20 @@
#define _HTTP_NO_PRIVATE
#include "cupsd.h"
@ -439,7 +440,7 @@ index cef4115..e186e4c 100644
/*
@@ -263,6 +271,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
@@ -264,6 +272,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
}
#endif /* HAVE_TCPD_H */
@ -499,7 +500,7 @@ index cef4115..e186e4c 100644
#ifdef AF_LOCAL
if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL)
{
@@ -517,6 +578,11 @@ cupsdCloseClient(cupsd_client_t *con) /* I - Client to close */
@@ -526,6 +587,11 @@ cupsdCloseClient(cupsd_client_t *con) /* I - Client to close */
}
#endif /* HAVE_AUTHORIZATION_H */
@ -511,7 +512,7 @@ index cef4115..e186e4c 100644
/*
* Re-enable new client connections if we are going back under the
* limit...
@@ -556,6 +622,13 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
@@ -566,6 +632,13 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
struct stat filestats; /* File information */
mime_type_t *type; /* MIME type of file */
static unsigned request_id = 0; /* Request ID for temp files */
@ -525,7 +526,7 @@ index cef4115..e186e4c 100644
status = HTTP_STATUS_CONTINUE;
@@ -1675,7 +1748,73 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
@@ -1737,7 +1810,73 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
fchmod(con->file, 0640);
fchown(con->file, RunUser, Group);
fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
@ -599,7 +600,7 @@ index cef4115..e186e4c 100644
if (httpGetState(con->http) != HTTP_STATE_POST_SEND)
{
@@ -3173,6 +3312,49 @@ is_path_absolute(const char *path) /* I - Input path */
@@ -3235,6 +3374,49 @@ is_path_absolute(const char *path) /* I - Input path */
return (1);
}
@ -650,10 +651,10 @@ index cef4115..e186e4c 100644
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
diff --git a/scheduler/client.h b/scheduler/client.h
index fc7af54..c665d0c 100644
index 9fe4e2e..51c3ab5 100644
--- a/scheduler/client.h
+++ b/scheduler/client.h
@@ -13,6 +13,13 @@
@@ -14,6 +14,13 @@
#endif /* HAVE_AUTHORIZATION_H */
@ -667,7 +668,7 @@ index fc7af54..c665d0c 100644
/*
* HTTP client structure...
*/
@@ -63,6 +70,10 @@ struct cupsd_client_s
@@ -66,6 +73,10 @@ struct cupsd_client_s
#ifdef HAVE_AUTHORIZATION_H
AuthorizationRef authref; /* Authorization ref */
#endif /* HAVE_AUTHORIZATION_H */
@ -678,7 +679,7 @@ index fc7af54..c665d0c 100644
};
#define HTTP(con) ((con)->http)
@@ -137,6 +148,10 @@ extern void cupsdStopListening(void);
@@ -138,6 +149,10 @@ extern void cupsdStopListening(void);
extern void cupsdUpdateCGI(void);
extern void cupsdWriteClient(cupsd_client_t *con);
@ -686,14 +687,14 @@ index fc7af54..c665d0c 100644
+extern uid_t client_pid_to_auid(pid_t clipid);
+#endif /* WITH_LSPP */
+
#ifdef HAVE_SSL
#ifdef HAVE_TLS
extern int cupsdEndTLS(cupsd_client_t *con);
extern int cupsdStartTLS(cupsd_client_t *con);
diff --git a/scheduler/conf.c b/scheduler/conf.c
index 21386cd..a52e9a6 100644
index 0d4bb6a..88d67cf 100644
--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -37,6 +37,9 @@
@@ -38,6 +38,9 @@
# define INADDR_NONE 0xffffffff
#endif /* !INADDR_NONE */
@ -703,7 +704,7 @@ index 21386cd..a52e9a6 100644
/*
* Configuration variable structure...
@@ -131,6 +134,10 @@ static const cupsd_var_t cupsd_vars[] =
@@ -129,6 +132,10 @@ static const cupsd_var_t cupsd_vars[] =
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
{ "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN },
{ "Timeout", &Timeout, CUPSD_VARTYPE_TIME },
@ -714,7 +715,7 @@ index 21386cd..a52e9a6 100644
{ "WebInterface", &WebInterface, CUPSD_VARTYPE_BOOLEAN }
};
static const cupsd_var_t cupsfiles_vars[] =
@@ -544,6 +551,9 @@ cupsdReadConfiguration(void)
@@ -539,6 +546,9 @@ cupsdReadConfiguration(void)
const char *tmpdir; /* TMPDIR environment variable */
struct stat tmpinfo; /* Temporary directory info */
cupsd_policy_t *p; /* Policy */
@ -724,7 +725,7 @@ index 21386cd..a52e9a6 100644
/*
@@ -877,6 +887,25 @@ cupsdReadConfiguration(void)
@@ -866,6 +876,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
@ -750,7 +751,7 @@ index 21386cd..a52e9a6 100644
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
RemotePort ? "enabled" : "disabled");
@@ -1269,7 +1298,19 @@ cupsdReadConfiguration(void)
@@ -1272,7 +1301,19 @@ cupsdReadConfiguration(void)
cupsdClearString(&Classification);
if (Classification)
@ -770,7 +771,7 @@ index 21386cd..a52e9a6 100644
/*
* Check the MaxClients setting, and then allocate memory for it...
@@ -3857,6 +3898,18 @@ read_location(cups_file_t *fp, /* I - Configuration file */
@@ -3880,6 +3921,18 @@ read_location(cups_file_t *fp, /* I - Configuration file */
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
@ -790,12 +791,12 @@ index 21386cd..a52e9a6 100644
/*
* 'read_policy()' - Read a <Policy name> definition.
diff --git a/scheduler/conf.h b/scheduler/conf.h
index 7d5eb40..3c27828 100644
index 2e5aac6..df22b07 100644
--- a/scheduler/conf.h
+++ b/scheduler/conf.h
@@ -245,6 +245,13 @@ VAR char *ServerKeychain VALUE(NULL);
@@ -242,6 +242,13 @@ VAR char *ServerKeychain VALUE(NULL);
/* Keychain holding cert + key */
#endif /* HAVE_SSL */
#endif /* HAVE_TLS */
+#ifdef WITH_LSPP
+VAR int AuditLog VALUE(-1),
@ -807,7 +808,7 @@ index 7d5eb40..3c27828 100644
#ifdef HAVE_ONDEMAND
VAR int IdleExitTimeout VALUE(60);
/* Time after which an idle cupsd will exit */
@@ -263,6 +270,9 @@ VAR int HaveServerCreds VALUE(0);
@@ -260,6 +267,9 @@ VAR int HaveServerCreds VALUE(0);
VAR gss_cred_id_t ServerCreds; /* Server's GSS credentials */
#endif /* HAVE_GSSAPI */
@ -818,10 +819,10 @@ index 7d5eb40..3c27828 100644
/*
* Prototypes...
diff --git a/scheduler/cupsd.h b/scheduler/cupsd.h
index bc1350e..64d57d1 100644
index 164df6e..2d66464 100644
--- a/scheduler/cupsd.h
+++ b/scheduler/cupsd.h
@@ -8,6 +8,8 @@
@@ -9,6 +9,8 @@
* information.
*/
@ -830,7 +831,7 @@ index bc1350e..64d57d1 100644
/*
* Include necessary headers.
@@ -33,6 +35,14 @@
@@ -34,6 +36,14 @@
# include <unistd.h>
#endif /* _WIN32 */
@ -846,7 +847,7 @@ index bc1350e..64d57d1 100644
#if defined(HAVE_CDSASSL)
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 19d6608..728d164 100644
index 67ee8ed..e7fa758 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -12,6 +12,9 @@
@ -882,7 +883,7 @@ index 19d6608..728d164 100644
static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p);
static void close_job(cupsd_client_t *con, ipp_attribute_t *uri);
static void copy_attrs(ipp_t *to, ipp_t *from, cups_array_t *ra,
@@ -1241,6 +1253,21 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1188,6 +1200,21 @@ add_job(cupsd_client_t *con, /* I - Client connection */
"time-at-creation",
"time-at-processing"
};
@ -904,7 +905,7 @@ index 19d6608..728d164 100644
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
@@ -1569,6 +1596,106 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1516,6 +1543,106 @@ add_job(cupsd_client_t *con, /* I - Client connection */
attr = ippFindAttribute(con->request, "requesting-user-name", IPP_TAG_NAME);
@ -1011,7 +1012,7 @@ index 19d6608..728d164 100644
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
@@ -1577,6 +1704,32 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1524,6 +1651,32 @@ add_job(cupsd_client_t *con, /* I - Client connection */
return (NULL);
}
@ -1044,7 +1045,7 @@ index 19d6608..728d164 100644
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
job->attrs = con->request;
job->dirty = 1;
@@ -1764,6 +1917,29 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1711,6 +1864,29 @@ add_job(cupsd_client_t *con, /* I - Client connection */
ippSetString(job->attrs, &attr, 0, printer->job_sheets[0]);
ippSetString(job->attrs, &attr, 1, printer->job_sheets[1]);
}
@ -1074,7 +1075,7 @@ index 19d6608..728d164 100644
job->job_sheets = attr;
@@ -1794,6 +1970,9 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1741,6 +1917,9 @@ add_job(cupsd_client_t *con, /* I - Client connection */
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@ -1084,7 +1085,7 @@ index 19d6608..728d164 100644
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
@@ -1812,6 +1991,9 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1759,6 +1938,9 @@ add_job(cupsd_client_t *con, /* I - Client connection */
"job-originating-user-name=\"%s\"",
attr->values[0].string.text,
attr->values[1].string.text, job->username);
@ -1094,7 +1095,7 @@ index 19d6608..728d164 100644
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
@@ -1832,6 +2014,9 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1779,6 +1961,9 @@ add_job(cupsd_client_t *con, /* I - Client connection */
"job-originating-user-name=\"%s\"",
attr->values[0].string.text,
attr->values[1].string.text, job->username);
@ -1104,7 +1105,7 @@ index 19d6608..728d164 100644
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
@@ -1872,9 +2057,55 @@ add_job(cupsd_client_t *con, /* I - Client connection */
@@ -1819,9 +2004,55 @@ add_job(cupsd_client_t *con, /* I - Client connection */
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
@ -1160,7 +1161,7 @@ index 19d6608..728d164 100644
/*
* See if we need to add the starting sheet...
*/
@@ -3649,6 +3880,128 @@ check_rss_recipient(
@@ -3647,6 +3878,128 @@ check_rss_recipient(
}
@ -1289,7 +1290,7 @@ index 19d6608..728d164 100644
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
@@ -4104,6 +4457,15 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
@@ -4102,6 +4455,15 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@ -1305,7 +1306,7 @@ index 19d6608..728d164 100644
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -4139,6 +4501,85 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
@@ -4137,6 +4499,85 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
@ -1391,7 +1392,7 @@ index 19d6608..728d164 100644
/*
* Try the localized banner file under the subdirectory...
@@ -4233,6 +4674,24 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
@@ -4231,6 +4672,24 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
else
s = attrname;
@ -1416,7 +1417,7 @@ index 19d6608..728d164 100644
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
@@ -6443,6 +6902,22 @@ get_job_attrs(cupsd_client_t *con, /* I - Client connection */
@@ -6681,6 +7140,22 @@ get_job_attrs(cupsd_client_t *con, /* I - Client connection */
exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
@ -1439,7 +1440,7 @@ index 19d6608..728d164 100644
/*
* Copy attributes...
*/
@@ -6840,6 +7315,11 @@ get_jobs(cupsd_client_t *con, /* I - Client connection */
@@ -7079,6 +7554,11 @@ get_jobs(cupsd_client_t *con, /* I - Client connection */
if (username[0] && _cups_strcasecmp(username, job->username))
continue;
@ -1451,7 +1452,7 @@ index 19d6608..728d164 100644
if (count > 0)
ippAddSeparator(con->response);
@@ -11441,6 +11921,11 @@ validate_user(cupsd_job_t *job, /* I - Job */
@@ -11810,6 +12290,11 @@ validate_user(cupsd_job_t *job, /* I - Job */
strlcpy(username, get_username(con), userlen);
@ -1464,10 +1465,10 @@ index 19d6608..728d164 100644
* Check the username against the owner...
*/
diff --git a/scheduler/job.c b/scheduler/job.c
index 834e170..dbc64c3 100644
index 822a247..2f952bc 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -8,6 +8,9 @@
@@ -9,6 +9,9 @@
* information.
*/
@ -1477,7 +1478,7 @@ index 834e170..dbc64c3 100644
/*
* Include necessary headers...
*/
@@ -23,6 +26,12 @@
@@ -24,6 +27,12 @@
# endif /* HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */
#endif /* __APPLE__ */
@ -1490,10 +1491,10 @@ index 834e170..dbc64c3 100644
/*
* Design Notes for Job Management
@@ -545,6 +554,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
@@ -544,6 +553,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
/* PRINTER env variable */
*printer_state_reasons = NULL;
/* PRINTER_STATE_REASONS env var */
rip_max_cache[255];
/* RIP_MAX_CACHE env variable */
+#ifdef WITH_LSPP
+ char *audit_message = NULL; /* Audit message string */
+ context_t jobcon; /* SELinux context of the job */
@ -1505,7 +1506,7 @@ index 834e170..dbc64c3 100644
cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -1066,6 +1083,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
@@ -1070,6 +1087,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I - Job */
if (final_content_type[0])
envp[envc ++] = final_content_type;
@ -1573,7 +1574,7 @@ index 834e170..dbc64c3 100644
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
@@ -1400,6 +1478,11 @@ cupsdDeleteJob(cupsd_job_t *job, /* I - Job */
@@ -1404,6 +1482,11 @@ cupsdDeleteJob(cupsd_job_t *job, /* I - Job */
cupsdClearString(&job->username);
cupsdClearString(&job->dest);
@ -1585,8 +1586,8 @@ index 834e170..dbc64c3 100644
for (i = 0;
i < (int)(sizeof(job->auth_env) / sizeof(job->auth_env[0]));
i ++)
@@ -1844,6 +1927,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
ippSetString(job->attrs, &job->reasons, 0, "none");
@@ -1856,6 +1939,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
ippSetString(job->attrs, &job->reasons, 0, "job-completed-successfully");
}
+#ifdef WITH_LSPP
@ -1608,7 +1609,7 @@ index 834e170..dbc64c3 100644
job->impressions = ippFindAttribute(job->attrs, "job-impressions-completed", IPP_TAG_INTEGER);
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER);
job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
@@ -2259,6 +2358,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - Job */
@@ -2268,6 +2367,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - Job */
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
@ -1623,7 +1624,7 @@ index 834e170..dbc64c3 100644
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
@@ -2281,6 +2388,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - Job */
@@ -2290,6 +2397,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - Job */
fchown(cupsFileNumber(fp), RunUser, Group);
@ -1702,7 +1703,7 @@ index 834e170..dbc64c3 100644
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
@@ -3981,6 +4160,19 @@ get_options(cupsd_job_t *job, /* I - Job */
@@ -4020,6 +4199,19 @@ get_options(cupsd_job_t *job, /* I - Job */
banner_page)
continue;
@ -1722,7 +1723,7 @@ index 834e170..dbc64c3 100644
/*
* Otherwise add them to the list...
*/
@@ -4791,6 +4983,18 @@ start_job(cupsd_job_t *job, /* I - Job ID */
@@ -4834,6 +5026,18 @@ start_job(cupsd_job_t *job, /* I - Job ID */
cupsd_printer_t *printer) /* I - Printer to print job */
{
const char *filename; /* Support filename */
@ -1741,7 +1742,7 @@ index 834e170..dbc64c3 100644
ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
"job-cancel-after",
IPP_TAG_INTEGER);
@@ -4979,6 +5183,113 @@ start_job(cupsd_job_t *job, /* I - Job ID */
@@ -5022,6 +5226,113 @@ start_job(cupsd_job_t *job, /* I - Job ID */
fcntl(job->side_pipes[1], F_SETFD,
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
@ -1856,10 +1857,10 @@ index 834e170..dbc64c3 100644
* Now start the first file in the job...
*/
diff --git a/scheduler/job.h b/scheduler/job.h
index 2400ea9..cc05450 100644
index 619353d..310b66a 100644
--- a/scheduler/job.h
+++ b/scheduler/job.h
@@ -7,6 +7,13 @@
@@ -8,6 +8,13 @@
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
@ -1873,7 +1874,7 @@ index 2400ea9..cc05450 100644
/*
* Constants...
*/
@@ -84,6 +91,10 @@ struct cupsd_job_s /**** Job request ****/
@@ -85,6 +92,10 @@ struct cupsd_job_s /**** Job request ****/
int progress; /* Printing progress */
int num_keywords; /* Number of PPD keywords */
cups_option_t *keywords; /* PPD keywords */
@ -1885,10 +1886,10 @@ index 2400ea9..cc05450 100644
typedef struct cupsd_joblog_s /**** Job log message ****/
diff --git a/scheduler/main.c b/scheduler/main.c
index 47968e6..2802625 100644
index ae2409e..21bd989 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -57,6 +57,9 @@
@@ -58,6 +58,9 @@
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
@ -1898,7 +1899,7 @@ index 47968e6..2802625 100644
/*
* Local functions...
@@ -123,6 +126,9 @@ main(int argc, /* I - Number of command-line args */
@@ -124,6 +127,9 @@ main(int argc, /* I - Number of command-line args */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@ -1908,7 +1909,7 @@ index 47968e6..2802625 100644
#ifdef __APPLE__
int use_sysman = 1; /* Use system management functions? */
#else
@@ -495,6 +501,25 @@ main(int argc, /* I - Number of command-line args */
@@ -494,6 +500,25 @@ main(int argc, /* I - Number of command-line args */
exit(errno);
}
@ -1934,7 +1935,7 @@ index 47968e6..2802625 100644
/*
* Let the system know we are busy while we bring up cupsd...
*/
@@ -1204,6 +1229,11 @@ main(int argc, /* I - Number of command-line args */
@@ -1203,6 +1228,11 @@ main(int argc, /* I - Number of command-line args */
cupsdStopSelect();
@ -1947,7 +1948,7 @@ index 47968e6..2802625 100644
}
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 234d441..248bdba 100644
index bf493a3..d06bd93 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -9,6 +9,8 @@
@ -1970,7 +1971,7 @@ index 234d441..248bdba 100644
/*
* Local functions...
@@ -2288,6 +2294,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
@@ -2184,6 +2190,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
ipp_attribute_t *attr; /* Attribute data */
char *name, /* Current user/group name */
*filter; /* Current filter */
@ -1984,7 +1985,7 @@ index 234d441..248bdba 100644
/*
@@ -2412,6 +2425,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
@@ -2309,6 +2322,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}

@ -1,10 +1,10 @@
diff -up cups-2.2b2/config-scripts/cups-ssl.m4.no-export-ssllibs cups-2.2b2/config-scripts/cups-ssl.m4
--- cups-2.2b2/config-scripts/cups-ssl.m4.no-export-ssllibs 2016-06-27 15:06:22.299980753 +0200
+++ cups-2.2b2/config-scripts/cups-ssl.m4 2016-06-27 15:08:00.953154042 +0200
@@ -102,5 +102,5 @@ AC_SUBST(IPPALIASES)
AC_SUBST(SSLFLAGS)
AC_SUBST(SSLLIBS)
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_SSLLIBS="$SSLLIBS"
+EXPORT_SSLLIBS=""
AC_SUBST(EXPORT_SSLLIBS)
-EXPORT_TLSLIBS="$TLSLIBS"
+EXPORT_TLSLIBS=""
AC_SUBST([EXPORT_TLSLIBS])

@ -1,13 +0,0 @@
diff --git a/scheduler/cups.service.in b/scheduler/cups.service.in
index a3fa0e8..baff51b 100644
--- a/scheduler/cups.service.in
+++ b/scheduler/cups.service.in
@@ -1,7 +1,7 @@
[Unit]
Description=CUPS Scheduler
Documentation=man:cupsd(8)
-After=network.target sssd.service ypbind.service nslcd.service
+After=network.target nss-user-lookup.target nslcd.service
Requires=cups.socket
[Service]

@ -1,31 +0,0 @@
diff --git a/scheduler/colorman.c b/scheduler/colorman.c
index 8af4e5c..9bfdb0c 100644
--- a/scheduler/colorman.c
+++ b/scheduler/colorman.c
@@ -1083,7 +1083,7 @@ colord_create_profile(
dbus_message_iter_get_basic(&args, &profile_path);
cupsdLogMessage(CUPSD_LOG_DEBUG, "Created profile \"%s\".", profile_path);
- cupsArrayAdd(profiles, strdup(profile_path));
+ cupsArrayAdd(profiles, profile_path);
out:
diff --git a/scheduler/job.c b/scheduler/job.c
index 0223bee..47d4c72 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -1496,11 +1496,11 @@ cupsdDeleteJob(cupsd_job_t *job, /* I - Job */
job->num_files = 0;
}
+ unload_job(job);
+
if (job->history)
free_job_history(job);
- unload_job(job);
-
cupsArrayRemove(Jobs, job);
cupsArrayRemove(ActiveJobs, job);
cupsArrayRemove(PrintingJobs, job);

@ -1,20 +0,0 @@
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index e0dbc4a..5e9a985 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -9891,11 +9891,10 @@ restart_job(cupsd_client_t *con, /* I - Client connection */
cupsdLogJob(job, CUPSD_LOG_DEBUG,
"Restarted by \"%s\" with job-hold-until=%s.",
username, attr->values[0].string.text);
- cupsdSetJobHoldUntil(job, attr->values[0].string.text, 0);
-
- cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED | CUPSD_EVENT_JOB_STATE,
- NULL, job, "Job restarted by user with job-hold-until=%s",
- attr->values[0].string.text);
+ cupsdSetJobHoldUntil(job, attr->values[0].string.text, 1);
+ cupsdSetJobState(job, IPP_JOB_HELD, CUPSD_JOB_DEFAULT,
+ "Job restarted by user with job-hold-until=%s",
+ attr->values[0].string.text);
}
else
{

@ -1,12 +0,0 @@
diff --git a/scheduler/cups.socket.in b/scheduler/cups.socket.in
index 613b977a6..1deee826a 100644
--- a/scheduler/cups.socket.in
+++ b/scheduler/cups.socket.in
@@ -4,6 +4,7 @@ PartOf=org.cups.cupsd.service
[Socket]
ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
+RemoveOnStop=on
[Install]
WantedBy=sockets.target

@ -1,38 +0,0 @@
diff -up cups-1.5b1/conf/cups.password-auth.system-auth cups-1.5b1/conf/cups.password-auth
--- cups-1.5b1/conf/cups.password-auth.system-auth 2011-05-23 17:27:27.000000000 +0200
+++ cups-1.5b1/conf/cups.password-auth 2011-05-23 17:27:27.000000000 +0200
@@ -0,0 +1,4 @@
+#%PAM-1.0
+# Use password-auth common PAM configuration for the daemon
+auth include password-auth
+account include password-auth
diff -up cups-1.5b1/conf/cups.system-auth.system-auth cups-1.5b1/conf/cups.system-auth
--- cups-1.5b1/conf/cups.system-auth.system-auth 2011-05-23 17:27:27.000000000 +0200
+++ cups-1.5b1/conf/cups.system-auth 2011-05-23 17:27:27.000000000 +0200
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth include system-auth
+account include system-auth
diff -up cups-1.5b1/conf/Makefile.system-auth cups-1.5b1/conf/Makefile
--- cups-1.5b1/conf/Makefile.system-auth 2011-05-12 07:21:56.000000000 +0200
+++ cups-1.5b1/conf/Makefile 2011-05-23 17:27:27.000000000 +0200
@@ -90,10 +90,16 @@ install-data:
done
-if test x$(PAMDIR) != x; then \
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
- if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
- $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
+ if test -f /etc/pam.d/password-auth; then \
+ $(INSTALL_DATA) cups.password-auth $(BUILDROOT)$(PAMDIR)/cups; \
+ elif test -f /etc/pam.d/system-auth; then \
+ $(INSTALL_DATA) cups.system-auth $(BUILDROOT)$(PAMDIR)/cups; \
else \
- $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
+ if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
+ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
+ else \
+ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
+ fi ; \
fi ; \
fi

@ -1,27 +0,0 @@
diff -up cups-2.3.3op2/backend/ipp.c.validate-retry cups-2.3.3op2/backend/ipp.c
--- cups-2.3.3op2/backend/ipp.c.validate-retry 2021-03-11 12:55:46.461135739 +0100
+++ cups-2.3.3op2/backend/ipp.c 2021-03-11 13:29:09.312859343 +0100
@@ -256,6 +256,7 @@ main(int argc, /* I - Number of comm
get_job_attrs = 0, /* Does printer support Get-Job-Attributes? */
send_document = 0, /* Does printer support Send-Document? */
validate_job = 0, /* Does printer support Validate-Job? */
+ validation_retried = 0, /* Indicate whether Validate-Job was retried */
copies, /* Number of copies for job */
copies_remaining; /* Number of copies remaining */
const char *content_type, /* CONTENT_TYPE environment variable */
@@ -1559,7 +1560,15 @@ main(int argc, /* I - Number of comm
ipp_status == IPP_STATUS_ERROR_BAD_REQUEST)
break;
else if (job_auth == NULL && ipp_status > IPP_STATUS_ERROR_BAD_REQUEST)
+ {
+ if (!validation_retried)
+ {
+ validation_retried = 1;
+ sleep(10);
+ continue;
+ }
goto cleanup;
+ }
}
/*

@ -1 +1,3 @@
%_cups_serverbin %(/usr/bin/cups-config --serverbin)
%_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)

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