forked from pool/systemd
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=526
This commit is contained in:
parent
0bd7739d9b
commit
89574e1c2d
@ -4,34 +4,26 @@ Subject: apply ACL for nvidia device nodes
|
|||||||
|
|
||||||
set ACL on nvidia devices (bnc#808319).
|
set ACL on nvidia devices (bnc#808319).
|
||||||
---
|
---
|
||||||
src/login/logind-acl.c | 3 +++
|
logind-acl.c | 12 ++++++++++++
|
||||||
1 file changed, 3 insertions(+)
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
--- systemd-209/src/login/logind-acl.c
|
||||||
Index: systemd-208/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,
|
||||||
--- systemd-208.orig/src/login/logind-acl.c
|
r = k;
|
||||||
+++ 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ /* only apply ACL on nvidia* if /dev/nvidiactl exists */
|
+ /* 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;
|
+ int i;
|
||||||
+ char *devname;
|
|
||||||
+
|
|
||||||
+ for (i = 0; i <= 256 ; i++) {
|
+ for (i = 0; i <= 256 ; i++) {
|
||||||
|
+ _cleanup_free_ char *devname = NULL;
|
||||||
+ if (asprintf(&devname, "/dev/nvidia%d", i) < 0)
|
+ if (asprintf(&devname, "/dev/nvidia%d", i) < 0)
|
||||||
+ break;
|
+ break;
|
||||||
+ if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) {
|
+ if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0)
|
||||||
+ free(devname);
|
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
|
||||||
+ free(devname);
|
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
finish:
|
return r;
|
||||||
udev_enumerate_unref(e);
|
}
|
||||||
set_free_free(nodes);
|
|
||||||
|
@ -4,6 +4,9 @@ Fri Feb 28 17:15:38 UTC 2014 - werner@suse.de
|
|||||||
- Make patch
|
- Make patch
|
||||||
0001-make-209-working-on-older-dist.patch
|
0001-make-209-working-on-older-dist.patch
|
||||||
more smart that is make configure script les restrictive
|
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
|
Fri Feb 28 16:59:25 UTC 2014 - werner@suse.de
|
||||||
|
@ -484,7 +484,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch25 -p1
|
%patch25 -p1
|
||||||
# check if this is still needed, or can be derived from fbdev uaccess rule
|
# 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
|
# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html
|
||||||
# %patch27 -p1
|
%patch27 -p1
|
||||||
%patch37 -p1
|
%patch37 -p1
|
||||||
%ifarch %arm
|
%ifarch %arm
|
||||||
%patch38 -p1
|
%patch38 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user