From 49a9defe12267202ee7d6b3ad77a9af14c3c042369cb2591d1967efadb27b245 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 28 Feb 2014 17:31:08 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=526 --- apply-ACL-for-nvidia-device-nodes.patch | 30 +++++++++---------------- systemd.changes | 3 +++ systemd.spec | 2 +- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/apply-ACL-for-nvidia-device-nodes.patch b/apply-ACL-for-nvidia-device-nodes.patch index 7b5e3624..f17d6ede 100644 --- a/apply-ACL-for-nvidia-device-nodes.patch +++ b/apply-ACL-for-nvidia-device-nodes.patch @@ -4,34 +4,26 @@ Subject: apply ACL for nvidia device nodes set ACL on nvidia devices (bnc#808319). --- - src/login/logind-acl.c | 3 +++ - 1 file changed, 3 insertions(+) + logind-acl.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) - -Index: systemd-208/src/login/logind-acl.c -=================================================================== ---- systemd-208.orig/src/login/logind-acl.c -+++ systemd-208/src/login/logind-acl.c -@@ -287,6 +287,22 @@ int devnode_acl_all(struct udev *udev, - r = devnode_acl(n, flush, del, old_uid, add, new_uid); +--- systemd-209/src/login/logind-acl.c ++++ systemd-209/src/login/logind-acl.c 2014-02-28 17:27:51.806239118 +0000 +@@ -283,5 +283,17 @@ int devnode_acl_all(struct udev *udev, + r = k; } + /* only apply ACL on nvidia* if /dev/nvidiactl exists */ -+ if (devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid) >= 0) { ++ if (devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid) >= 0) { + int i; -+ char *devname; -+ + for (i = 0; i <= 256 ; i++) { ++ _cleanup_free_ char *devname = NULL; + if (asprintf(&devname, "/dev/nvidia%d", i) < 0) + break; -+ if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) { -+ free(devname); ++ if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) + break; -+ } -+ free(devname); + } + } + - finish: - udev_enumerate_unref(e); - set_free_free(nodes); + return r; + } diff --git a/systemd.changes b/systemd.changes index 764818b3..2868b12c 100644 --- a/systemd.changes +++ b/systemd.changes @@ -4,6 +4,9 @@ Fri Feb 28 17:15:38 UTC 2014 - werner@suse.de - Make patch 0001-make-209-working-on-older-dist.patch more smart that is make configure script les restrictive +- Make patch + apply-ACL-for-nvidia-device-nodes.patch + apply to v209 ------------------------------------------------------------------- Fri Feb 28 16:59:25 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index dc657f86..0da2407e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -484,7 +484,7 @@ cp %{SOURCE7} m4/ %patch25 -p1 # check if this is still needed, or can be derived from fbdev uaccess rule # http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html -# %patch27 -p1 +%patch27 -p1 %patch37 -p1 %ifarch %arm %patch38 -p1