This file is indexed.

/etc/needrestart/notify.d/300-needrestart-session is in needrestart-session 0.3-5.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh

# needrestart-session - check for processes need to be restarted in user sessions
#
# Authors:
#   Thomas Liske <thomas@fiasko-nw.net>
#
# Copyright Holder:
#   2014 - 2015 (C) Thomas Liske [http://fiasko-nw.net/~thomas/]
#
# License:
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#

# Use dbus-send to launch needrestart-session in the user's session.

DBSEND='/usr/bin/dbus-send'
test -x "$DBSEND" || exit 1

case "$NR_SESSION" in
    session*)
	if [ -z "$(ps -Awwo uid,cmd -u "$NR_UID" --no-headers | grep needrestart-dbus-session)" ]; then
 	    echo "[$0] could not find a running needrestart-dbus-session for $NR_USERNAME" 1>&2
	    exit 1
	fi

 	echo "[$0] notify user $NR_USERNAME by needrestart-session" 1>&2

	# dbus-send fails if fd 1 is n/a
	if [ -e "/proc/$$/fd/2" ]; then
	    exec "$DBSEND" --system --print-reply --type=method_call \
		 --dest=net.ibh.NeedRestart.System \
		 /net/ibh/NeedRestart/System \
		 net.ibh.NeedRestart.System.emitNotifySessions 1>&2
	else
	    exec "$DBSEND" --system --print-reply --type=method_call \
		 --dest=net.ibh.NeedRestart.System \
		 /net/ibh/NeedRestart/System \
		 net.ibh.NeedRestart.System.emitNotifySessions 1> /dev/null
	fi
	;;
    *)
 	echo "[$0] skip session '$NR_SESSION'" 1>&2
	exit 1;
	;;
esac