0001-Use-Arch-Linux-device-access-groups.patch 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
  3. Date: Tue, 6 Mar 2018 23:39:47 +0100
  4. Subject: [PATCH] Use Arch Linux' device access groups
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. cdrom → optical
  9. dialout → uucp
  10. tape → storage
  11. ---
  12. rules.d/50-udev-default.rules.in | 14 +++++++-------
  13. sysusers.d/basic.conf.in | 6 +++---
  14. 2 files changed, 10 insertions(+), 10 deletions(-)
  15. diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
  16. index edfa8bb107..35b8d4ba41 100644
  17. --- a/rules.d/50-udev-default.rules.in
  18. +++ b/rules.d/50-udev-default.rules.in
  19. @@ -22,7 +22,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
  20. SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
  21. SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
  22. SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
  23. -KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
  24. +KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
  25. SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
  26. @@ -62,13 +62,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp"
  27. SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
  28. SUBSYSTEM=="block", GROUP="disk"
  29. -SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
  30. -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
  31. -KERNEL=="sch[0-9]*", GROUP="cdrom"
  32. -KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
  33. -KERNEL=="pktcdvd", GROUP="cdrom"
  34. +SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical"
  35. +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical"
  36. +KERNEL=="sch[0-9]*", GROUP="optical"
  37. +KERNEL=="pktcdvd[0-9]*", GROUP="optical"
  38. +KERNEL=="pktcdvd", GROUP="optical"
  39. -SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
  40. +SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage"
  41. SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
  42. KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
  43. KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control"
  44. diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in
  45. index 4be0bd869e..cc3721b58a 100644
  46. --- a/sysusers.d/basic.conf.in
  47. +++ b/sysusers.d/basic.conf.in
  48. @@ -24,15 +24,15 @@ g utmp - - -
  49. # Hardware access groups
  50. g audio - - -
  51. -g cdrom - - -
  52. -g dialout - - -
  53. g disk - - -
  54. g input - - -
  55. g kvm - - -
  56. g lp - - -
  57. +g optical - - -
  58. g render - - -
  59. g sgx - - -
  60. -g tape - - -
  61. +g storage - - -
  62. +g uucp - - -
  63. g video - - -
  64. # Default group for normal users