udevadm etc
# ls -l /usr/lib/systemd/systemd-udevd lrwxrwxrwx. 1 root root 12 Dec 3 22:53 /usr/lib/systemd/systemd-udevd -> / bin/udevadm
In systemd verision 247.1 (which is in Debian/Unstable now) systemd-udevd is a symlink to udevadm. In systemd version 241 (in Debian/Buster) it's not a symlink. The systemd changelog doesn't mention this change so I don't know exactly when it happened.
type_transition init_t udevadm_exec_t:process udevadm_t; type_transition initrc_t udevadm_exec_t:process udevadm_t; type_transition sysadm_t udevadm_exec_t:process udevadm_t; type_transition consolekit_t udev_exec_t:process udev_t; type_transition devicekit_disk_t udev_exec_t:process udev_t; type_transition hald_t udev_exec_t:process udev_t; type_transition hotplug_t udev_exec_t:process udev_t; type_transition init_t udev_exec_t:process udev_t; type_transition initrc_t udev_exec_t:process udev_t; type_transition kernel_t udev_exec_t:process udev_t; type_transition virtd_t udev_exec_t:process udev_t;
Above is a list of the relevant type_transition rules from refpolicy taken from git 3 days ago (there don't appear to be any udev changes since then).
I think that the only thing to do is to have init_t and initrc_t run udevadm in the udev_t domain.
Is it worth having a udevadm_t domain just for running it from sysadm_t or should we have that run as udev_t too?
Signature · 2 lines
My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
Quoted 17 lines · Russell Coker
In systemd verision 247.1 (which is in Debian/Unstable now) systemd-udevd is a symlink to udevadm. In systemd version 241 (in Debian/Buster) it's not a symlink. The systemd changelog doesn't mention this change so I don't know exactly when it happened.
type_transitioninit_tudevadm_exec_t:processudevadm_t;type_transitioninitrc_tudevadm_exec_t:processudevadm_t;type_transitionsysadm_tudevadm_exec_t:processudevadm_t;type_transitionconsolekit_tudev_exec_t:processudev_t;type_transitiondevicekit_disk_tudev_exec_t:processudev_t;type_transitionhald_tudev_exec_t:processudev_t;type_transitionhotplug_tudev_exec_t:processudev_t;type_transitioninit_tudev_exec_t:processudev_t;type_transitioninitrc_tudev_exec_t:processudev_t;type_transitionkernel_tudev_exec_t:processudev_t;type_transitionvirtd_tudev_exec_t:processudev_t;
Quoted 8 lines
Above is a list of the relevant
type_transitionrules from refpolicy taken from git 3 days ago (there don't appear to be any udev changes since then).I think that the only thing to do is to have
init_tandinitrc_trun udevadm in theudev_tdomain.Is it worth having a
udevadm_tdomain just for running it fromsysadm_tor should we have that run asudev_ttoo?
The udevadm_t domain is much smaller than udev_t, and critically doesn't have all the device access udev_t has. Systemd merging the binaries into one doesn't necessarily mean the policy has to merge too.
Signature · 1 line
Chris PeBenito
Quoted 25 lines · AEDT Chris PeBenito
Quoted 24 lines · Russell Coker
In systemd verision 247.1 (which is in Debian/Unstable now) systemd-udevd is a symlink to udevadm. In systemd version 241 (in Debian/Buster) it's not a symlink. The systemd changelog doesn't mention this change so I don't know exactly when it happened.
type_transitioninit_tudevadm_exec_t:processudevadm_t;type_transitioninitrc_tudevadm_exec_t:processudevadm_t;type_transitionsysadm_tudevadm_exec_t:processudevadm_t;type_transitionconsolekit_tudev_exec_t:processudev_t;type_transitiondevicekit_disk_tudev_exec_t:processudev_t;type_transitionhald_tudev_exec_t:processudev_t;type_transitionhotplug_tudev_exec_t:processudev_t;type_transitioninit_tudev_exec_t:processudev_t;type_transitioninitrc_tudev_exec_t:processudev_t;type_transitionkernel_tudev_exec_t:processudev_t;type_transitionvirtd_tudev_exec_t:processudev_t;Above is a list of the relevant
type_transitionrules from refpolicy taken from git 3 days ago (there don't appear to be any udev changes since then).I think that the only thing to do is to have
init_tandinitrc_trun udevadm in theudev_tdomain.
Quoted 6 lines
Quoted 2 lines
Is it worth having a
udevadm_tdomain just for running it fromsysadm_tor should we have that run asudev_ttoo?The
udevadm_tdomain is much smaller thanudev_t, and critically doesn't have all the device accessudev_thas. Systemd merging the binaries into one doesn't necessarily mean the policy has to merge too.
Currently only 3 domains can transition to udevadm_t. 2 of those 3 also transition to udev_t so they can't use udevadm_t without code changes. The only remaining domain is sysadm_t.
The question is not "do we have to merge the policy because systemd merges binaries" but "should we have a separate domain only used for sysadm_t"?
Signature · 2 lines
My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/
Quoted 33 lines · Russell Coker
Quoted 25 lines · AEDT Chris PeBenito
Quoted 24 lines · Russell Coker
In systemd verision 247.1 (which is in Debian/Unstable now) systemd-udevd is a symlink to udevadm. In systemd version 241 (in Debian/Buster) it's not a symlink. The systemd changelog doesn't mention this change so I don't know exactly when it happened.
type_transitioninit_tudevadm_exec_t:processudevadm_t;type_transitioninitrc_tudevadm_exec_t:processudevadm_t;type_transitionsysadm_tudevadm_exec_t:processudevadm_t;type_transitionconsolekit_tudev_exec_t:processudev_t;type_transitiondevicekit_disk_tudev_exec_t:processudev_t;type_transitionhald_tudev_exec_t:processudev_t;type_transitionhotplug_tudev_exec_t:processudev_t;type_transitioninit_tudev_exec_t:processudev_t;type_transitioninitrc_tudev_exec_t:processudev_t;type_transitionkernel_tudev_exec_t:processudev_t;type_transitionvirtd_tudev_exec_t:processudev_t;Above is a list of the relevant
type_transitionrules from refpolicy taken from git 3 days ago (there don't appear to be any udev changes since then).I think that the only thing to do is to have
init_tandinitrc_trun udevadm in theudev_tdomain.Quoted 6 lines
Quoted 2 lines
Is it worth having a
udevadm_tdomain just for running it fromsysadm_tor should we have that run asudev_ttoo?The
udevadm_tdomain is much smaller thanudev_t, and critically doesn't have all the device accessudev_thas. Systemd merging the binaries into one doesn't necessarily mean the policy has to merge too.
Quoted 6 lines
Currently only 3 domains can transition to
udevadm_t. 2 of those 3 also transition toudev_tso they can't useudevadm_twithout code changes. The only remaining domain issysadm_t.The question is not "do we have to merge the policy because systemd merges binaries" but "should we have a separate domain only used for
sysadm_t"?
Ah, I misunderstood. The alternate question is, should any of these domains that transition to udev_t actually transition to udevadm_t instead? For a long time udevadm was labeled udev_exec_t.
I did some cursory searching in devicekit and I see udisks execs udevadm. I couldn't find any instance of it executing udev, so there is a possibility of udevadm_t being more useful.
If it ends up with sysadm_t being the only one that only execs udevadm, then I agree that udevadm_t doesn't provide the hoped benefits.
Signature · 1 line
Chris PeBenito