2240317 - cups-browsed-2.0.0 is available
This commit is contained in:
parent
52d6a5dd01
commit
b785f9db29
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
/cups-browsed-2.0b4.tar.gz
|
||||
/cups-browsed-2.0rc1.tar.gz
|
||||
/cups-browsed-2.0rc2.tar.gz
|
||||
/cups-browsed-2.0.0.tar.gz
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 93285f8bb16bd9fe8e1877999c601346c4c341dc Mon Sep 17 00:00:00 2001
|
||||
From: zdohnal <zdohnal@redhat.com>
|
||||
Date: Tue, 29 Aug 2023 12:06:17 +0200
|
||||
Subject: [PATCH] cups-browsed.c: Ensure we always send a valid name to
|
||||
`remove_bad_chars` (#13)
|
||||
|
||||
Fixes Fedora bugzilla #2150035 - in case the found queue is CUPS remote
|
||||
queue shared via DNS-SD, `rp_value` can be without '/', which leads to
|
||||
`cups-browsed` crash if it is set to create the local queue based on
|
||||
remote name.
|
||||
---
|
||||
daemon/cups-browsed.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/daemon/cups-browsed.c b/daemon/cups-browsed.c
|
||||
index 626473b7..b06461b4 100644
|
||||
--- a/daemon/cups-browsed.c
|
||||
+++ b/daemon/cups-browsed.c
|
||||
@@ -6185,10 +6185,18 @@ get_local_queue_name(const char *service_name,
|
||||
// make/model info
|
||||
queue_name = remove_bad_chars(make_model, 0);
|
||||
else if (LocalQueueNamingRemoteCUPS == LOCAL_QUEUE_NAMING_REMOTE_NAME)
|
||||
+ {
|
||||
// Not directly used in script generation input later, but taken from
|
||||
// packet, so better safe than sorry. (consider second loop with
|
||||
// backup_queue_name)
|
||||
- queue_name = remove_bad_chars(strrchr(resource, '/') + 1, 0);
|
||||
+
|
||||
+ /* We can get resource without / or without string after / - use
|
||||
+ * the original string (possible trailing / will be removed) */
|
||||
+ if ((str = strrchr(resource, '/')) == NULL || strlen(str) <= 1)
|
||||
+ str = resource;
|
||||
+
|
||||
+ queue_name = remove_bad_chars(str, 0);
|
||||
+ }
|
||||
else
|
||||
// Convert DNS-SD service name into a CUPS queue name exactly
|
||||
// as CUPS would do it, to override CUPS' own temporary queue
|
||||
--
|
||||
2.41.0
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (cups-browsed-2.0rc2.tar.gz) = f77dbfcde4ef8d484455b4f65ce3ebbbacb82980422359d760e72666376c920ada53520b4817f63e7907caa80a4a1ba403bb8e09f1b89495062fd88ffc03f3ea
|
||||
SHA512 (cups-browsed-2.0.0.tar.gz) = e4664f9c04b9f15167373815586db7158aa29987adcbf43b2cb3c5a419ddba5016fd34c57b8baeabbd1b09d43b5d65d88dbb38ee0990de6670e98f4aeee025f0
|
||||
|
Loading…
Reference in New Issue
Block a user