Skip to content
  • Mike Fleetwood's avatar
    Add detection of pkexec root privilege escalation program (#776437) · b47528b6
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    Many of the distributions (confirmed for Arch Linux, Debian, Fedora,
    OpenSUSE, RedHat/CentOS and Ubuntu but likely many others too) are now
    using polkit as the mechanism to authorise privileged actions, including
    using it to authorise GParted to run as root in their packages of
    GParted.  Therefore make the GParted configure script check for the
    pkexec command.
    
    Use pkexec with the --disable-internal-agent option when available,
    preventing pkexec using it's own textual authentication agent.  When
    running GParted from a desktop icon or menu there is no terminal with
    which to interact with the textual authentication agent to it can't be
    used.  The desktop's graphical agent must be running.  This matches how
    some distributions already use polkit in their own packages of GParted.
    
    Required actions file will be added in the next commit.
    
        polkit(8)
        https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html
    
        pkexec(1)
        https://www.freedesktop.org/software/polkit/docs/latest/pkexec.1.html
    
    Bug 776437 - GParted fails to run as root under Wayland
    b47528b6