[Bug 1821415] Re: pkexec fails in a non-graphical environment

Launchpad Bug Tracker 1821415 at bugs.launchpad.net
Thu May 6 10:28:27 UTC 2021


This bug was fixed in the package apport - 2.20.11-0ubuntu50.6

---------------
apport (2.20.11-0ubuntu50.6) groovy; urgency=medium

  * data/general-hooks/ubuntu.py: tag bugs from Raspberry Pi images and RISCV
    images appropriately. (LP: #1920837)
  * apport/hookutils.py: spawn pkttyagent so that log files can be gathered as
    root in a non-graphical environment (LP: #1821415). Thanks to Iain Lane
    for the patch.
  * apport/hookutils.py: root access is needed to read the
    casper-md5check.json file so switch to using that. (LP: #1922937)

 -- Brian Murray <brian at ubuntu.com>  Mon, 26 Apr 2021 12:45:36 -0700

** Changed in: apport (Ubuntu Groovy)
       Status: Fix Committed => Fix Released

** Changed in: apport (Ubuntu Focal)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1821415

Title:
  pkexec fails in a non-graphical environment

Status in PolicyKit:
  New
Status in apport package in Ubuntu:
  Fix Released
Status in policykit-1 package in Ubuntu:
  Won't Fix
Status in apport source package in Focal:
  Fix Released
Status in policykit-1 source package in Focal:
  Won't Fix
Status in apport source package in Groovy:
  Fix Released
Status in policykit-1 source package in Groovy:
  Won't Fix

Bug description:
  [Impact]
  The plymouth apport source package hooks wants to gather log files as the root user and apport provides a policy kit policy for collecting that information. This works fine in a graphical environment but not in a non-graphical one.

  [Test Case]
  1) ssh into an Ubuntu Desktop install of Ubuntu 20.04 LTS or Ubuntu 20.10
  2) sudo touch /var/log/plymouth-debug.log
  3) ubuntu at disco:~$ ubuntu-bug plymouth

  *** Collecting problem information

  The collected information can be sent to the developers to improve the
  application. This might take a few minutes.
  ..........==== AUTHENTICATING FOR com.ubuntu.apport.root-info ===
  Authentication is required to collect system information for this problem report
  Authenticating as: Ubuntu (ubuntu)
  Password: ....
  polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
  ==== AUTHENTICATION FAILED ===
  Error executing command as another user: Not authorized

  This incident has been reported.

  With the version of apport from -proposed you will not see the
  "AUTHENTICATION FAILED" error and the plymouth-debug.log file will be
  collected.

  [Where Problems Could Occur]
  It's possible that the spawned pkttyagent process does not get cleaned up properly and could be left running. When testing the SRU we should confirm it is not still running.

To manage notifications about this bug go to:
https://bugs.launchpad.net/policykit-1/+bug/1821415/+subscriptions



More information about the foundations-bugs mailing list