+++ /dev/null
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils
-
-DESCRIPTION="PolicyKit helper to configure cups with fine-grained privileges"
-HOMEPAGE="http://www.freedesktop.org/wiki/Software/cups-pk-helper"
-SRC_URI="http://www.freedesktop.org/software/${PN}/releases/${P}.tar.xz"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
-IUSE=""
-
-# Require {glib,gdbus-codegen}-2.30.0 due to GDBus changes between 2.29.92
-# and 2.30.0
-COMMON_DEPEND=">=dev-libs/glib-2.30.0:2
- net-print/cups
- >=sys-auth/polkit-0.97"
-RDEPEND="${COMMON_DEPEND}
- sys-apps/dbus"
-DEPEND="${COMMON_DEPEND}
- app-arch/xz-utils
- >=dev-util/gdbus-codegen-2.30.0
- >=dev-util/intltool-0.40.6
- virtual/pkgconfig
- sys-devel/gettext"
-
-src_prepare() {
- DOCS="AUTHORS HACKING NEWS README"
-
- # Revert "Be stricter when validating printer names", bug #459596
- epatch "${FILESDIR}/${P}-revert-stricter.patch"
-
- # Regenerate dbus-codegen files to fix build with glib-2.30.x; bug #410773
- rm -v src/cph-iface-mechanism.{c,h} || die
-}
+++ /dev/null
-From f00aee0b43c31e94087668b23b72e873c660de5e Mon Sep 17 00:00:00 2001
-From: Vincent Untz <vuntz@suse.com>
-Date: Mon, 10 Dec 2012 09:44:31 +0000
-Subject: Revert "Be stricter when validating printer names"
-
-Apparently, this is way too strict. The lpadmin man page says:
-
- CUPS allows printer names to contain any printable character except
- SPACE, TAB, "/", or "#".
-
-So the previous code was (mostly) correct.
-
-This reverts commit 7bf9cbe43ef8f648f308e4760f75c2aa6b61fa8e.
----
-diff --git a/src/cups.c b/src/cups.c
-index 96c2c20..09f0e7b 100644
---- a/src/cups.c
-+++ b/src/cups.c
-@@ -327,25 +327,23 @@ _cph_cups_is_printer_name_valid_internal (const char *name)
- int i;
- int len;
-
-- /* Quoting http://www.cups.org/documentation.php/doc-1.1/sam.html#4_1:
-- *
-- * The printer name must start with any printable character except
-- * " ", "/", and "@". It can contain up to 127 letters, numbers, and
-- * the underscore (_).
-- *
-- * The first part is a bit weird, as the second part is more
-- * restrictive. So we only consider the second part. */
--
- /* no empty string */
- if (!name || name[0] == '\0')
- return FALSE;
-
- len = strlen (name);
-- if (len > 127)
-+ /* no string that is too long; see comment at the beginning of the
-+ * validation code block */
-+ if (len > CPH_STR_MAXLEN)
- return FALSE;
-
-+ /* only printable characters, no space, no /, no # */
- for (i = 0; i < len; i++) {
-- if (!g_ascii_isalnum (name[i]) && name[i] != '_')
-+ if (!g_ascii_isprint (name[i]))
-+ return FALSE;
-+ if (g_ascii_isspace (name[i]))
-+ return FALSE;
-+ if (name[i] == '/' || name[i] == '#')
- return FALSE;
- }
-
---
-cgit v0.9.0.2-2-gbebe