Latest fix filling in 'N/A' for absent groups is working, apport-unpack
is no longer throwing stacktrace when prcoessing the report. I still
don't understand why primary groups are ignored, but the important thing
is the reports are processable without errors now.

This might be a totally separate issue, but will it be possible to
backport the 'N/A' fix to bionic?

Reproduced by testing a user with a system group as their primary group
(will have N/A in report), this is equivalent to the user being in no
system groups (even though they are). Also a user which has an
additional group which is a system group (will show that system group in
report).

# system group to test with
sudo addgroup --system testgroup1

# create user with their primary group as the above system group (user doesn't 
have to be system user, just don't have to fill in gecos)
sudo adduser --system --ingroup testgroup1 testuser1
# create user with additional group as system group, their primary group in 
this case is nogroup
sudo adduser --system testuser2
sudo usermod -a -G testgroup1 testuser2

# run simple app as first user
sudo -u testuser1 /usr/bin/sleep 60000
# kill and create crash report
sudo pkill -SEGV -f '^/usr/bin/sleep 60000'
report="/var/crash/_usr_bin_sleep.$(id -u testuser1).crash"
# wait a bit while report is generated
sleep 2
# check resulting crash report, should print UserGroups: N/A
sudo grep -H 'UserGroups:' $report
# try apport-unpack
sudo apport-unpack $report /tmp/crash1

# reset and try with other user
rm "$report"
sudo -u testuser2 /usr/bin/sleep 60000
sudo pkill -SEGV -f '^/usr/bin/sleep 60000'
report="/var/crash/_usr_bin_sleep.$(id -u testuser2).crash"
sleep 2
# should print UserGroups: testgroup1
sudo grep -H 'UserGroups:' "$report"
sudo apport-unpack $report /tmp/crash2

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

Title:
  apport-unpack: ValueError: ['UserGroups'] has no binary content

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1427600/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to