|
@@ -1,6 +1,23 @@
|
1
|
1
|
#! /usr/bin/env sh
|
2
|
2
|
|
3
|
|
-[ "$PAM_TYPE" = "open_session" ] || exit 0
|
|
3
|
+if [ ! "${PAM_TYPE}" = "open_session" ]
|
|
4
|
+then
|
|
5
|
+ exit 0
|
|
6
|
+fi
|
|
7
|
+
|
|
8
|
+if [ -e /etc/notify-pam/ignore-list ]
|
|
9
|
+then
|
|
10
|
+ while read line
|
|
11
|
+ do
|
|
12
|
+ user="$(echo "${line}" | cut -d' ' -f1)"
|
|
13
|
+ service="$(echo "${line}" | cut -d' ' -f2)"
|
|
14
|
+ if [ "${PAM_USER}" = "${user}" ] && [ "${PAM_SERVICE}" = "${service}" ]
|
|
15
|
+ then
|
|
16
|
+ exit 0
|
|
17
|
+ fi
|
|
18
|
+ done < /etc/notify-pam/ignore-list
|
|
19
|
+fi
|
|
20
|
+
|
4
|
21
|
{
|
5
|
22
|
echo "User: $PAM_USER"
|
6
|
23
|
echo "Ruser: $PAM_RUSER"
|