You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I enable the persist keyword and run doas, /run/doas gets created with the user root and the group djmattyg007. The permissions are correct (0600), so my non-privileged user account doesn't have access to the directory. It just seems strange that the group on the directory wouldn't also be root.
The text was updated successfully, but these errors were encountered:
This was not done as I thought there was a TOCTU between mkdir(2) and chown(2) and that extra steps would be required to make sure not to chown(2) a different directory or a symlink.
But thinking about it now, I don't think there would be a TOCTU issue.
mkdir(2) would return an error if the directory already exists so that the chown(2) immediately after mkdir(2) without extra checks would be safe as I understand it currently.
mkdir(2) would return an error if the directory it tries to create is a dangling symlink so that is also not a problem.
All in all, maybe this can be changed if its safe, but also does not really change anything effectively as the mode is already restrictive and checked every time the directory will be used.
When I enable the
persist
keyword and rundoas
,/run/doas
gets created with the userroot
and the groupdjmattyg007
. The permissions are correct (0600
), so my non-privileged user account doesn't have access to the directory. It just seems strange that the group on the directory wouldn't also beroot
.The text was updated successfully, but these errors were encountered: