summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2025-01-16 15:34:47 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2025-01-16 21:12:47 +0100
commitaf96ccfc24bc4803078a46b4ef2cdeb5decdfbcd (patch)
tree97004ef839bf26028cea3a83838fc4a29162ac92 /rules.d
parenttest: add link to Ubuntu autopkgtest status page in README (diff)
downloadsystemd-af96ccfc24bc4803078a46b4ef2cdeb5decdfbcd.tar.xz
systemd-af96ccfc24bc4803078a46b4ef2cdeb5decdfbcd.zip
udev: set clock group for PTP and RTC devices
Add a new group for clock devices to enable applications like linuxptp to open clocks without root privileges.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/50-udev-default.rules.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
index 8fa518cd8f..078a78ad1a 100644
--- a/rules.d/50-udev-default.rules.in
+++ b/rules.d/50-udev-default.rules.in
@@ -10,6 +10,7 @@ SUBSYSTEM=="block", KERNEL=="md*", ENV{ID_IGNORE_DISKSEQ}="1"
SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
+SUBSYSTEM=="rtc", GROUP="clock", MODE="0660"
# select "system RTC" or just use the first one
SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
@@ -30,6 +31,7 @@ SUBSYSTEM=="pci|usb|platform", IMPORT{builtin}="path_id"
SUBSYSTEM=="net", IMPORT{builtin}="net_driver"
+SUBSYSTEM=="ptp", GROUP="clock", MODE="0660"
SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK+="ptp_kvm"
SUBSYSTEM=="ptp", ATTR{clock_name}=="hyperv", SYMLINK+="ptp_hyperv"