[arch-commits] Commit in udev/trunk (PKGBUILD static-node-permission.patch)

Tom Gundersen tomegun at archlinux.org
Mon Jul 11 17:32:31 EDT 2011


    Date: Monday, July 11, 2011 @ 17:32:31
  Author: tomegun
Revision: 131208

upgpkg: udev 172-2
fix broken permissions on static nodes (e.g. fuse)

Added:
  udev/trunk/static-node-permission.patch
Modified:
  udev/trunk/PKGBUILD

------------------------------+
 PKGBUILD                     |   10 +++++++---
 static-node-permission.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-07-11 21:16:26 UTC (rev 131207)
+++ PKGBUILD	2011-07-11 21:32:31 UTC (rev 131208)
@@ -7,7 +7,7 @@
 pkgbase="udev"
 pkgname=('udev' 'udev-compat')
 pkgver=172
-pkgrel=1
+pkgrel=2
 arch=(i686 x86_64)
 url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
 license=('GPL')
@@ -16,10 +16,13 @@
 options=(!makeflags !libtool)
 makedepends=('glibc' 'coreutils' 'util-linux' 'pciutils' 'libusb-compat' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection')
 source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2
+	static-node-permission.patch
         81-arch.rules)
 
 build() {
   cd $srcdir/$pkgbase-$pkgver
+  # permissions on static /dev/fuse node (will be in udev-173)
+  patch -Np1 -i ../static-node-permission.patch
   ./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\
               --sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system\
               --disable-rule-generator
@@ -89,5 +92,6 @@
   # /dev/ppp
   mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0
 }
-sha256sums=('b8959cc951ff69ff13305aad6836eac1ff672d98d5a11435c38c4608f77bbd6a'
-            'ed0dd0109a6add18e247b81c689d46296118aea6275e3d69d0a818e1ba4b7b78')
+md5sums=('bd122d04cf758441f498aad0169a454f'
+         '07e5b965d7e90988ea2f7ffb19a08ef7'
+         'ec529eb1ddaabb70c61b38f80bb8462a')

Added: static-node-permission.patch
===================================================================
--- static-node-permission.patch	                        (rev 0)
+++ static-node-permission.patch	2011-07-11 21:32:31 UTC (rev 131208)
@@ -0,0 +1,26 @@
+From 36acdbcc776822624103eff7c80a9468317918ac Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers at vrfy.org>
+Date: Mon, 11 Jul 2011 22:56:37 +0200
+Subject: [PATCH] udevd: fix (recently) broken static node permission setting
+
+Many thanks to Tom Gundersen for identifying the issue.
+---
+ udev/udev-rules.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/udev/udev-rules.c b/udev/udev-rules.c
+index d16c1f9..7db0767 100644
+--- a/udev/udev-rules.c
++++ b/udev/udev-rules.c
+@@ -2721,7 +2721,7 @@ void udev_rules_apply_static_dev_perms(struct udev_rules *rules)
+ 			struct stat stats;
+ 
+ 			/* we assure, that the permissions tokens are sorted before the static token */
+-			if (uid == 0 && gid == 0)
++			if (mode == 0 && uid == 0 && gid == 0)
+ 				goto next;
+ 			util_strscpyl(filename, sizeof(filename), udev_get_dev_path(rules->udev), "/",
+ 				      &rules->buf[cur->key.value_off], NULL);
+-- 
+1.7.6
+



More information about the arch-commits mailing list