Harald Hoyer fe20ad
From bb8f5a48fef4adbe1a8bd57eb8a8d1d346447781 Mon Sep 17 00:00:00 2001
Harald Hoyer fe20ad
From: Kay Sievers <kay@vrfy.org>
Harald Hoyer fe20ad
Date: Sat, 17 Aug 2013 19:07:42 +0200
Harald Hoyer fe20ad
Subject: [PATCH] udev: replace CAP_MKNOD by writable /sys condition
Harald Hoyer fe20ad
Harald Hoyer fe20ad
---
Harald Hoyer fe20ad
 units/systemd-udev-settle.service.in  | 2 +-
Harald Hoyer fe20ad
 units/systemd-udev-trigger.service.in | 2 +-
Harald Hoyer fe20ad
 units/systemd-udevd-control.socket    | 2 +-
Harald Hoyer fe20ad
 units/systemd-udevd-kernel.socket     | 2 +-
Harald Hoyer fe20ad
 4 files changed, 4 insertions(+), 4 deletions(-)
Harald Hoyer fe20ad
Harald Hoyer fe20ad
diff --git a/units/systemd-udev-settle.service.in b/units/systemd-udev-settle.service.in
Harald Hoyer fe20ad
index 037dd9a..0817803 100644
Harald Hoyer fe20ad
--- a/units/systemd-udev-settle.service.in
Harald Hoyer fe20ad
+++ b/units/systemd-udev-settle.service.in
Harald Hoyer fe20ad
@@ -16,7 +16,7 @@ DefaultDependencies=no
Harald Hoyer fe20ad
 Wants=systemd-udevd.service
Harald Hoyer fe20ad
 After=systemd-udev-trigger.service
Harald Hoyer fe20ad
 Before=sysinit.target
Harald Hoyer fe20ad
-ConditionCapability=CAP_MKNOD
Harald Hoyer fe20ad
+ConditionPathIsReadWrite=/sys
Harald Hoyer fe20ad
 
Harald Hoyer fe20ad
 [Service]
Harald Hoyer fe20ad
 Type=oneshot
Harald Hoyer fe20ad
diff --git a/units/systemd-udev-trigger.service.in b/units/systemd-udev-trigger.service.in
Harald Hoyer fe20ad
index 604c369..0c33909 100644
Harald Hoyer fe20ad
--- a/units/systemd-udev-trigger.service.in
Harald Hoyer fe20ad
+++ b/units/systemd-udev-trigger.service.in
Harald Hoyer fe20ad
@@ -12,7 +12,7 @@ DefaultDependencies=no
Harald Hoyer fe20ad
 Wants=systemd-udevd.service
Harald Hoyer fe20ad
 After=systemd-udevd-kernel.socket systemd-udevd-control.socket
Harald Hoyer fe20ad
 Before=sysinit.target
Harald Hoyer fe20ad
-ConditionCapability=CAP_MKNOD
Harald Hoyer fe20ad
+ConditionPathIsReadWrite=/sys
Harald Hoyer fe20ad
 
Harald Hoyer fe20ad
 [Service]
Harald Hoyer fe20ad
 Type=oneshot
Harald Hoyer fe20ad
diff --git a/units/systemd-udevd-control.socket b/units/systemd-udevd-control.socket
Harald Hoyer fe20ad
index ca17102..8330a1c 100644
Harald Hoyer fe20ad
--- a/units/systemd-udevd-control.socket
Harald Hoyer fe20ad
+++ b/units/systemd-udevd-control.socket
Harald Hoyer fe20ad
@@ -10,7 +10,7 @@ Description=udev Control Socket
Harald Hoyer fe20ad
 Documentation=man:systemd-udevd.service(8) man:udev(7)
Harald Hoyer fe20ad
 DefaultDependencies=no
Harald Hoyer fe20ad
 Before=sockets.target
Harald Hoyer fe20ad
-ConditionCapability=CAP_MKNOD
Harald Hoyer fe20ad
+ConditionPathIsReadWrite=/sys
Harald Hoyer fe20ad
 
Harald Hoyer fe20ad
 [Socket]
Harald Hoyer fe20ad
 Service=systemd-udevd.service
Harald Hoyer fe20ad
diff --git a/units/systemd-udevd-kernel.socket b/units/systemd-udevd-kernel.socket
Harald Hoyer fe20ad
index 4b8a5b0..39b7809 100644
Harald Hoyer fe20ad
--- a/units/systemd-udevd-kernel.socket
Harald Hoyer fe20ad
+++ b/units/systemd-udevd-kernel.socket
Harald Hoyer fe20ad
@@ -10,7 +10,7 @@ Description=udev Kernel Socket
Harald Hoyer fe20ad
 Documentation=man:systemd-udevd.service(8) man:udev(7)
Harald Hoyer fe20ad
 DefaultDependencies=no
Harald Hoyer fe20ad
 Before=sockets.target
Harald Hoyer fe20ad
-ConditionCapability=CAP_MKNOD
Harald Hoyer fe20ad
+ConditionPathIsReadWrite=/sys
Harald Hoyer fe20ad
 
Harald Hoyer fe20ad
 [Socket]
Harald Hoyer fe20ad
 Service=systemd-udevd.service