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

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