openbsd-ports/print/hplip/patches/patch-fax_backend_hpfax_py
ajacoutot eeb3a85b88 - SECURITY: fix for Secunia SA31470 -- patches adapted from RedHat
(CVE-2008-2940 CVE-2008-2941)
prodded by jasper@
- fix some hardcoded paths and regen PLIST while here

ok jasper@
2009-02-02 10:47:11 +00:00

22 lines
981 B
Plaintext

$OpenBSD: patch-fax_backend_hpfax_py,v 1.1 2009/02/02 10:47:11 ajacoutot Exp $
--- fax/backend/hpfax.py.orig Mon Feb 2 10:51:15 2009
+++ fax/backend/hpfax.py Mon Feb 2 10:51:28 2009
@@ -41,7 +41,7 @@ CUPS_BACKEND_STOP = 4 # Job failed, stop queue
CUPS_BACKEND_CANCEL = 5 # Job failed, cancel job
pid = os.getpid()
-config_file = '/etc/hp/hplip.conf'
+config_file = '${SYSCONFDIR}/hp/hplip.conf'
home_dir = ''
if os.path.exists(config_file):
@@ -54,7 +54,7 @@ if os.path.exists(config_file):
syslog.syslog(syslog.LOG_CRIT, "hpfax[%d]: error: Error setting home directory: home= under [dirs] not found." % pid)
sys.exit(1)
else:
- syslog.syslog(syslog.LOG_CRIT, "hpfax[%d]: error: Error setting home directory: /etc/hp/hplip.conf not found." % pid)
+ syslog.syslog(syslog.LOG_CRIT, "hpfax[%d]: error: Error setting home directory: ${SYSCONFDIR}/hp/hplip.conf not found." % pid)
sys.exit(1)
if not home_dir or not os.path.exists(home_dir):