needrestart causes kernel upgrade messages in motd
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
needrestart (Ubuntu) | Status tracked in Oracular | |||||
Noble |
Fix Released
|
Undecided
|
Unassigned | |||
Oracular |
Fix Released
|
Critical
|
Simon Chopin |
Bug Description
[Impact]
needrestart shouldn't be writing to /run/reboot-
[Test plan]
We can use the mockuname thing from the autopkgtests to simulate a kernel
version mismatch:
# in a fresh VM
pull-lp-source needrestart noble
cd needrestart-3.6
gcc -shared -fPIC -ldl debian/
LD_PRELOAD=
# needrestart should complain that the system should be restarted
test ! -x /run/reboot-
[Where problems could occur]
That particular patch seems on the safer side, nothing in the code relies on this file being written to.
[Original report]
On Noble, I see this in my motd:
*** System restart required ***
Pending kernel upgrade!
Running kernel version:
6.8.0-22-generic
Diagnostics:
The currently running kernel version is not the expected kernel version 6.8.0-31-generic.
I found this code in needrestart:
/usr/sbin/
I'm told that it is incorrect for needrestart to be injecting this into motd. Steve points out that needrestart isn't installed on desktop and the behaviour shouldn't be different here, thinks that this shouldn't be injected into motd, and asked for a bug report for this.
needrestart 3.6-7ubuntu4
tags: | added: foundations-todo |
Changed in needrestart (Ubuntu Oracular): | |
status: | New → Fix Committed |
description: | updated |
description: | updated |
description: | updated |
Changed in needrestart (Ubuntu Noble): | |
status: | New → In Progress |
Steve asked for this to be Critical and assigned to Simon.