aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-printing_backend_cups__helper.cc
diff options
context:
space:
mode:
authorMatthias Wolf <matthias@rheinwolf.de>2021-06-17 09:22:35 +0000
committerRene Ladan <rene@FreeBSD.org>2021-06-17 09:32:02 +0000
commit9c8545d7801e5a5b68dd4c68d5f0dcb7109015d0 (patch)
treebd5ba927b4a7b2e0fc9aeef18b17d738079b2edd /www/chromium/files/patch-printing_backend_cups__helper.cc
parentccd805d32e3522eee71501f122f41f59f99fd1b5 (diff)
downloadports-9c8545d7801e5a5b68dd4c68d5f0dcb7109015d0.tar.gz
ports-9c8545d7801e5a5b68dd4c68d5f0dcb7109015d0.zip
www/chromium: update to 91.0.4472.101
Security: https://vuxml.freebsd.org/freebsd/20b3ab21-c9df-11eb-8558-3065ec8fd3ec.html (cherry picked from commit 06317815238060a3a7f5911f18a3dd7c95779c83)
Diffstat (limited to 'www/chromium/files/patch-printing_backend_cups__helper.cc')
-rw-r--r--www/chromium/files/patch-printing_backend_cups__helper.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/www/chromium/files/patch-printing_backend_cups__helper.cc b/www/chromium/files/patch-printing_backend_cups__helper.cc
new file mode 100644
index 000000000000..6f3d809262b3
--- /dev/null
+++ b/www/chromium/files/patch-printing_backend_cups__helper.cc
@@ -0,0 +1,38 @@
+--- printing/backend/cups_helper.cc.orig 2021-06-10 11:43:23 UTC
++++ printing/backend/cups_helper.cc
+@@ -24,7 +24,7 @@
+ #include "printing/units.h"
+ #include "url/gurl.h"
+
+-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
+ #include <unistd.h>
+
+ #include "base/files/scoped_file.h"
+@@ -578,7 +578,7 @@ bool ParsePpdCapabilities(cups_dest_t* dest,
+ base::StringPiece printer_capabilities,
+ PrinterSemanticCapsAndDefaults* printer_info) {
+ base::FilePath ppd_file_path;
+-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
+ // A file created while in a sandbox will be automatically deleted once all
+ // handles to it have been closed. This precludes the use of multiple
+ // operations against a file path.
+@@ -625,7 +625,7 @@ bool ParsePpdCapabilities(cups_dest_t* dest,
+ ppd_status_t ppd_status = ppdLastError(&line);
+ LOG(ERROR) << "Failed to open PDD file: error " << ppd_status << " at line "
+ << line << ", " << ppdErrorString(ppd_status);
+-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
+ if (ppd_status != PPD_FILE_OPEN_ERROR) {
+ // When the error is not from opening the file then the CUPS library
+ // internals will have already closed the file descriptor. It is
+@@ -716,7 +716,7 @@ bool ParsePpdCapabilities(cups_dest_t* dest,
+ }
+
+ ppdClose(ppd);
+-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
+ // The CUPS library internals close the file descriptor upon successfully
+ // reading it. Explicitly release the `ScopedFD` to prevent a crash caused
+ // by a bad file descriptor.