an idea: run bootc install
with less permissions by using the systemd directive OpenFile
#94
Closed
eriksjolund
started this conversation in
Ideas
Replies: 1 comment
-
Ultimately, having the ability to manipulate a raw block device and create Linux filesystems on it is just a privileged operation. See https://lwn.net/Articles/934176/ and others. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The new systemd directive
OpenFile=
is available in systemd 253 (released 15 February 2023).Here is an untested idea: maybe it would possible to run rootless podman when installing with bootc.
I believe the installation would then be run with less permissions than usual.
So the idea would be to run something like
Of course the functionality to use the passed in file descriptor would need to be implemented in bootc for the command above to work.
Is this even technically possible? What do you think? Maybe running rootless podman gives up too much privilege?
Here is a minimal test where a container writes to the file /var/file although the file is being owned by root and has file permissions 600.
About the system:
Update 2023-04-23
If there is no need for any network, then maybe it's possible to add
Here is a minimal demo.
The file test1.sh contains
The file test2.sh has almost the same contents
Run commands
Beta Was this translation helpful? Give feedback.
All reactions