2013-04-23 11:39:56 +02:00
|
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
|
|
Date: Mon, 8 Apr 2013 14:51:47 +0200
|
|
|
|
Subject: apply ACL for nvidia device nodes
|
|
|
|
|
|
|
|
set ACL on nvidia devices (bnc#808319).
|
|
|
|
---
|
2014-03-11 09:24:11 +01:00
|
|
|
logind-acl.c | 12 ++++++++++++
|
|
|
|
1 file changed, 12 insertions(+)
|
2013-04-23 11:39:56 +02:00
|
|
|
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
Index: systemd-210/src/login/logind-acl.c
|
|
|
|
===================================================================
|
|
|
|
--- systemd-210.orig/src/login/logind-acl.c
|
|
|
|
+++ systemd-210/src/login/logind-acl.c
|
2014-03-11 09:24:11 +01:00
|
|
|
@@ -283,5 +283,17 @@ int devnode_acl_all(struct udev *udev,
|
|
|
|
r = k;
|
2013-04-23 11:39:56 +02:00
|
|
|
}
|
|
|
|
|
2013-12-19 12:51:56 +01:00
|
|
|
+ /* only apply ACL on nvidia* if /dev/nvidiactl exists */
|
2014-03-11 09:24:11 +01:00
|
|
|
+ if (devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid) >= 0) {
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
+ int j;
|
|
|
|
+ for (j = 0; j <= 256 ; j++) {
|
2014-03-11 09:24:11 +01:00
|
|
|
+ _cleanup_free_ char *devname = NULL;
|
Accepting request 242359 from Base:System
- Disable blkrrpart for SLES12 and below
- Add upstream patch
1054-udev-exclude-MD-from-block-device-ownership-event-lo.patch
- Add with condition blkrrpart to be able to disable the patches
1025, 1027, 1029, 1030, 1031, 1032, 1033, 1034, 1037, and 1054
which uses the BLKRRPART ioctl for e.g. synthesize change events
which may interfere with other tools like parted.
- Update
handle-disable_caplock-and-compose_table-and-kbd_rate.patch,
handle-numlock-value-in-etc-sysconfig-keyboard.patch: read
/etc/vconsole.conf after /etc/sysconfig/(keyboard,console)
otherwise empty value in /etc/sysconfig/keyboard might override
/etc/vconsole.conf values.
- Update :
0001-journal-compress-return-early-in-uncompress_startswi.patch
0002-util-don-t-consider-tabs-special-in-string_has_cc-an.patch
0002-vconsole-setup-run-setfont-before-loadkeys.patch
0003-core-never-consider-failure-when-reading-drop-ins-fa.patch
0003-fsck-consider-a-fsck-implementation-linked-to-bin-tr.patch
apply-ACL-for-nvidia-device-nodes.patch
keep-crypt-password-prompt.patch
log-target-null-instead-kmsg.patch
parse-crypttab-for-noauto-option.patch
set-and-use-default-logconsole.patch: fix all warnings in code
- Remove 0001-compress-fix-return-value.patch: not relevant to
systemd v210 code.
- Also change udev-generate-peristent-rule to udev-generate-persistent-rule
OBS-URL: https://build.opensuse.org/request/show/242359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=195
2014-07-26 12:19:44 +02:00
|
|
|
+ if (asprintf(&devname, "/dev/nvidia%d", j) < 0)
|
2013-12-19 12:51:56 +01:00
|
|
|
+ break;
|
2014-03-11 09:24:11 +01:00
|
|
|
+ if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0)
|
2013-12-19 12:51:56 +01:00
|
|
|
+ break;
|
2013-06-05 13:16:22 +02:00
|
|
|
+ }
|
|
|
|
+ }
|
2013-04-23 11:39:56 +02:00
|
|
|
+
|
2014-03-11 09:24:11 +01:00
|
|
|
return r;
|
|
|
|
}
|