File: 10-notify-send-timeout.diff

package info (click to toggle)
needrestart 3.8-2~bpo12%2B1
  • links: PTS
  • area: main
  • in suites: bookworm-backports
  • size: 796 kB
  • sloc: perl: 3,489; sh: 387; makefile: 83
file content (18 lines) | stat: -rw-r--r-- 945 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Add patch from Michał Mirosław <mirq-deboogs@rere.qmqm.pl> to fix a timeout
# in notify-send.
# Closes: #1024426
# Additional fixed later:
# Closes: #1079666

diff -Naur needrestart-3.6.orig/ex/notify.d/400-notify-send needrestart-3.6/ex/notify.d/400-notify-send
--- needrestart-3.6.orig/ex/notify.d/400-notify-send	2022-05-17 16:59:22.000000000 +0200
+++ needrestart-3.6/ex/notify.d/400-notify-send	2024-04-03 10:46:56.521125082 +0200
@@ -48,7 +48,7 @@
     MSGBODY=$(gettext 'Your session is running obsolete binaries or libraries as listed below.
 <i><b>Please consider a relogin or restart of the affected processes!</b></i>')'\n'$(cat)
 
-    su -p -s /bin/sh -c "$NSEND -a needrestart -u critical -i dialog-warning \"$MSGTITLE\" \"$MSGBODY\"" "$NR_USERNAME"
+    runuser -p -u "$NR_USERNAME" -- "$NSEND" -a needrestart -u critical -i dialog-warning "$MSGTITLE" "$MSGBODY"
     ;;
   *)
     echo "[$0] skip session '$NR_SESSION'" 1>&2