[systemd-devel] systemd-inhibit don't work

Luca Boccassi Luca.Boccassi at microsoft.com
Mon Aug 10 15:26:18 UTC 2020


On Mon, 2020-08-10 at 15:37 +0200, Lennart Poettering wrote:
> On Mo, 10.08.20 15:05, Reindl Harald (h.reindl at thelounge.net) wrote:
> 
> > well, i would expect that the reboot in the scond ssh-session is
> > refused.......
> > 
> > [root at master:~]$ /usr/bin/systemd-inhibit --what=shutdown --who=root
> > --why="Backup in progress" --mode=block sleep 600
> > 
> > [root at master:~]$ /usr/bin/systemd-inhibit; systemctl reboot
> > WHO  UID USER PID COMM            WHAT     WHY                MODE
> > root 0   root 569 systemd-inhibit shutdown Backup in progress block
> > 
> > 1 inhibitors listed.
> > [root at master:~]$ Connection to master.thelounge.net closed by remote host.
> > Connection to master.thelounge.net closed.
> > [harry at srv-rhsoft:~]$
> 
> Root is almighty on UNIX. This also means it has the privilege to
> ignore inhibitors, and thta's what you are seeing here.
> 
> There is a github issue filed asking for some mechanism to extend
> inhibitors so that root can't trivially override it, but so far this
> hasn't been implemented.
> 
> Lennart
> 
> --
> Lennart Poettering, Berlin

Hi,

Current plan is to work on that sometimes next month and submit an RFC,
unless objections are raised on the RFE or someone else beats me to it
of course.

(for reference, the RFE is 
https://github.com/systemd/systemd/issues/16454 )

-- 
Kind regards,
Luca Boccassi


More information about the systemd-devel mailing list