loginctl ignoring user given sessions IDs at command-line

Bug #1682154 reported by slodki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd
Fix Released
Unknown
systemd (Ubuntu)
Fix Released
Medium
Dimitri John Ledkov
Zesty
Fix Released
Medium
Dimitri John Ledkov

Bug Description

[Impact]
loginctl command does not process session IDs given on the command-line, like the documentation suggests. This makes it impossible to use simple command-line calls to check properties of a given session.

[Fix]
Backport upstream patch to fix the issue

[Testcase]
Use loginctl command and specify multiple session IDs at the command-line and verify that details about these sessons are brought up in the output.

[Regression Potential]
Minimal, current behaviour is not sane at all, and it is a typpo fix from '1' to 'i' meaning that first argument was always used, instead of the current iterated one.

Kubuntu zesty, 232-21ubuntu2

See upstream bug https://github.com/systemd/systemd/issues/5733 with patch attached.

slodki (slodki)
Changed in systemd (Ubuntu):
status: New → Confirmed
tags: added: loginctl patch-forwarded-upstream zesty
slodki (slodki)
tags: added: patch
Changed in systemd:
status: Unknown → New
slodki (slodki)
tags: added: patch-accepted-upstream
removed: loginctl patch-forwarded-upstream
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 16.10 seems unaffected.

 $ loginctl show-session 926 c2 927 | egrep Id=\|Leader
Id=926
Leader=24113
Id=c2
Leader=4175
Id=927
Leader=24212

 $ loginctl show-session c2 927 926 | egrep Id=\|Leader
Id=c2
Leader=4175
Id=927
Leader=24212
Id=926
Leader=24113

Changed in systemd (Ubuntu Zesty):
status: Confirmed → Triaged
importance: Undecided → Medium
tags: added: rls-aa-incoming
Revision history for this message
Brian Murray (brian-murray) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

This is not yet fixed in artful yet.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Just did a release to artful; I will do this one in the next update after this one.

Changed in systemd (Ubuntu):
milestone: none → ubuntu-17.06
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in systemd (Ubuntu Zesty):
milestone: none → zesty-updates
assignee: nobody → Dimitri John Ledkov (xnox)
tags: removed: rls-aa-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 233-8ubuntu1

---------------
systemd (233-8ubuntu1) artful; urgency=medium

  Merge from experimental. Existing Ubuntu cherry-picks:
  * TEST-12: cherry-pick upstream fix for compat with new netcat-openbsd.
  * networkd: cherry-pick support for setting bridge port's priority.
    This is a useful feature/bugfix to improve feature parity of networkd with
    ifupdown. This matches netplan's expectations to be able to set bridge port's
    priorities via networked. This featue is to be used by netplan/MAAS/OpenStack.
  * Cherrypick upstream commit to enable system use kernel maximum limit for RLIMIT_NOFILE isntead of hard-coded (low) limit of 65536.
  * debian/tests/root-unittests: disable execute and seccomp tests on arm
    test-seccomp and test-execute fail on arm64 kernels. Marking both tests as
    expected failures. An upstream bug report is filed to resolve these.
  * Cherrypick upstream patch for vio predictable interface names.
  * Cherrypick upstream patch for platform predictable interface names.

  Ubuntu cherry-picks, now also applied in Debian:
  * resolved: fix null pointer dereference crash

  Remaining Ubuntu delta:
  * ubuntu: udev.postinst preserve virtio interfaces names on upgrades, on s390x.
    New udev generates stable interface names on s390x kvm instances, however, upon
    upgrades existing ethX names should be preserved to prevent breaking networking
    and software configurations.
    This patch only affects Ubuntu systems.
  * Skip starting systemd-remount-fs.service in containers
    even when /etc/fstab is present.
    This allows entering fully running state even when /etc/fstab
    lists / to be mounted from a device which is not present in the
    container.

  New Ubuntu cherry-picks:
  * loginctl: Chrerry-pick upstream fix to not ignore multiple session ids.
    (LP: #1682154)

 -- Dimitri John Ledkov <email address hidden> Mon, 19 Jun 2017 15:24:30 +0100

Changed in systemd (Ubuntu):
status: Triaged → Fix Released
Changed in systemd (Ubuntu Zesty):
status: Triaged → In Progress
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello slodki, or anyone else affected,

Accepted systemd into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/232-21ubuntu6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-zesty
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

systemd 232-21ubuntu5
# loginctl show-session 2227 c1 | grep -e Id= -e Leader
Id=2227
Leader=723
Id=2227
Leader=723

systemd 232-21ubuntu6
# loginctl show-session 2227 c1 | grep -e Id= -e Leader
Id=2227
Leader=723
Id=c1
Leader=593

tags: added: verification-done verification-done-zesty
removed: verification-needed verification-needed-zesty
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello slodki, or anyone else affected,

Accepted systemd into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/232-21ubuntu7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-zesty
removed: verification-done verification-done-zesty
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

ubuntu@sruz:~$ dpkg-query -W systemd
systemd 232-21ubuntu5
ubuntu@sruz:~$ loginctl show-session 3 1 | grep -e Id= -e Leader
Id=3
Leader=1290
Id=3
Leader=1290

ubuntu@sruz:~$ dpkg-query -W systemd
systemd 232-21ubuntu7
ubuntu@sruz:~$ loginctl show-session 3 1 | grep -e Id= -e Leader
Id=3
Leader=1290
Id=1
Leader=1370

tags: added: verification-done-zesty
removed: verification-needed-zesty
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 232-21ubuntu7

---------------
systemd (232-21ubuntu7) zesty; urgency=medium

  * networkd: accept `:' in ifnames in systemd/networkd. (LP: #1714933)
  * networkd: add support for ActiveSlave and PrimarySlave netdev options.
    (LP: #1709135)
  * Cherrypick upstream fix for a race between .mount and .automount units,
    which currently may result in automounts hanging. (LP: #1709649)
  * systemd.postinst: Fix-up version number check in the previous sru.
    The version check in the postinst was too tight, thus the SRU fix failed
    validation. (LP: #1710410)

systemd (232-21ubuntu6) zesty; urgency=medium

  * link: Fix offload features initialization.
    This fixes a regression introduced in v232 which caused TCP
    segmentation offloads being disabled by default, resulting in
    significant performance issues under certain conditions. (Closes: #864073)
    (LP: #1703393)
  * loginctl: Fix loginctl ignoring user given session IDs at command-line
    (LP: #1682154)
  * Disable fallback DNS servers.
    This causes resolved to call-home to google, attempt to access network when
    none is available, and spams logs. (LP: #1449001)
  * initramfs-tools: trigger udevadm add actions with subsystems first.
    This updates the initramfs-tools init-top udev script to trigger udevadm
    actions with type specified. This mimicks the
    systemd-udev-trigger.service. Without type specified only devices are
    triggered, but triggering subsystems may also be required and should happen
    before triggering the devices. This is the case for example on s390x with zdev
    generated udev rules. (LP: #1713536)
  * Enable systemd-resolved by default. (LP: #1710410)
  * core: fix systemd failing to serialize tasks correctly on daemon-reload.
    (LP: #1702823)

 -- Dimitri John Ledkov <email address hidden> Wed, 04 Oct 2017 14:22:02 +0100

Changed in systemd (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in systemd:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.