postinst: Rely on needrestart when present on the system

Bug #1935972 reported by Simon Chopin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pam (Ubuntu)
Fix Released
Undecided
Brian Murray

Bug Description

This patch bypasses the custom restarting logic backed into the postinst script if the needrestart utility is present, as it allows sharing the logic with the rest of the system.

It also changes the custom logic to compare the old package version to the current one instead of a hard-coded value. I don't feel particularly strongly about this, so feel free to drop it :)

Revision history for this message
Simon Chopin (schopin) wrote :
Revision history for this message
Simon Chopin (schopin) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

From what I can piece together from the debian/changelog it seems that the version is hard-coded because it is only ever updated when the libpam0g.symbols file is updated which is why services would need to be restarted. Subsequently, I'm dropping that part of the patch.

Changed in pam (Ubuntu):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pam - 1.3.1-5ubuntu8

---------------
pam (1.3.1-5ubuntu8) impish; urgency=medium

  * Disable custom daemon restart detection code if needrestart is available
    (LP: #1935972)

 -- Simon Chopin <email address hidden> Tue, 13 Jul 2021 10:28:04 +0200

Changed in pam (Ubuntu):
status: In Progress → 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.