:: Re: [DNG] What is an init system?
Inizio della pagina
Delete this message
Reply to this message
Autore: kc-devuan
Data:  
To: dng
Oggetto: Re: [DNG] What is an init system?
20 May 2024 15:53:24 Didier Kryn <kryn@???>:

> But I'm curious to know how apt can download and install packages in root-owned directories without the root piviledge -- please take it well, I sincerely would like to know.


I haven't looked at apts code but the usual procedure largely pioneered by OpenBSD is to start as root and fork a process or two which drops privileges to a user or two with setresuid and setresgid whilst possibly using chroot or pledge and unveil to restrict system access further. A root process continues to do installs with the downloaded files. Communication happens between the processes using unix sockets.