import cups-browsed-2.0.0-8.el10

i10cs changed/i10cs/cups-browsed-2.0.0-8.el10
MSVSphere Packaging Team 3 months ago
parent ec9feba30e
commit be8b00a31c
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

@ -0,0 +1,44 @@
diff --git a/daemon/cups-browsed.c b/daemon/cups-browsed.c
index 8c5349f..5496970 100644
--- a/daemon/cups-browsed.c
+++ b/daemon/cups-browsed.c
@@ -6736,6 +6736,9 @@ create_remote_printer_entry (const char *queue_name,
p->queue_name, p->uri);
goto fail;
}
+
+ attr = ippFindAttribute(p->prattrs, "printer-make-and-model", IPP_TAG_TEXT);
+ p->make_model = attr ? strdup(ippGetString(attr, 0, NULL)) : NULL;
}
}
else
@@ -7520,7 +7523,7 @@ create_queue(void* arg)
debug_printf("Generated Default Attributes for local queue %s\n",
p->queue_name);
}
- if (ppdfile == NULL)
+ if (ppdfile == NULL && make_model && strcmp(make_model, "Local Raw Printer"))
{
// If we do not want CUPS-generated PPDs or we cannot obtain a
// CUPS-generated PPD, for example if CUPS does not create a
@@ -7712,7 +7715,7 @@ create_queue(void* arg)
debug_printf("Generated Default Attributes for local queue %s\n",
p->queue_name);
}
- if (ppdfile == NULL)
+ if (ppdfile == NULL && make_model && strcmp(make_model, "Local Raw Printer"))
{
// If we do not want CUPS-generated PPDs or we cannot obtain a
// CUPS-generated PPD, for example if CUPS does not create a
@@ -7983,6 +7986,11 @@ create_queue(void* arg)
}
ppdfile = strdup(buf);
}
+ else
+ {
+ // No PPD - define nickname as make_model for remote raw queue
+ p->nickname = p->make_model ? strdup(p->make_model) : strdup("Local Raw Printer");
+ }
// Create a new CUPS queue or modify the existing queue
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);

@ -10,7 +10,7 @@
Name: cups-browsed
Epoch: 1
Version: 2.0.0
Release: 6%{?dist}
Release: 8%{?dist}
Summary: Daemon for local auto-installation of remote printers
# the CUPS exception text is the same as LLVM exception, so using that name with
# agreement from legal team
@ -30,6 +30,10 @@ Patch003: browsed-goto-fail.patch
# https://github.com/OpenPrinting/cups-browsed/pull/32
# https://github.com/OpenPrinting/cups-browsed/pull/33
Patch04: browsed-ignore-NULL-attrs.patch
# CVE-2024-47176 cups-browsed: cups-browsed binds on UDP INADDR_ANY:631 trusting any packet from any source
Patch05: 0001-Removed-support-for-legacy-CUPS-browsing-and-for-LDA.patch
# RHEL-17124 [cups-browsed] Prints to remote RAW queues are converted to PDF documents
Patch07: 0001-Do-not-generate-PPD-for-remote-raw-queues-44.patch
# remove once CentOS Stream 10 is released, cups-browsed
@ -160,6 +164,14 @@ do
fi
done
# Set BrowseRemoteProtocols to none in light of CVE-2024-47176
if ! grep -Fxq "# added by post scriptlet" %{_sysconfdir}/cups/cups-browsed.conf
then
cp %{_sysconfdir}/cups/cups-browsed.conf %{_sysconfdir}/cups/cups-browsed.conf.rpmsave
sed -i "s/^\s*BrowseRemoteProtocols.*/# added by post scriptlet\nBrowseRemoteProtocols none/" %{_sysconfdir}/cups/cups-browsed.conf
fi
%preun
%systemd_preun cups-browsed.service
@ -216,9 +228,17 @@ fi
%changelog
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:2.0.0-6
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:2.0.0-8
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:2.0.0-7
- Rebuilt for MSVSphere 10
* Tue Oct 15 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-7
- CVE-2024-47176 cups-browsed: cups-browsed binds on UDP INADDR_ANY:631 trusting any packet from any source
- RHEL-17124 [cups-browsed] Prints to remote RAW queues are converted to PDF documents
* Tue Aug 06 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0.0-6
- RHEL-51349 Cups browsing with 'Autoclustering on' cannot find printer clusters for HA due incorrect orientation-requested-default

Loading…
Cancel
Save