aboutsummaryrefslogtreecommitdiffstats
path: root/src/logging
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/logging10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/logging b/src/logging
index 63287d5..65b3104 100755
--- a/src/logging
+++ b/src/logging
@@ -120,9 +120,11 @@ ttyname=--ttyname="${ttyname}"
pid=--pid="${pid}"
# Call the logging programs
-if [ "${hostname}" = "" ]; then
- "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}"
-else
- "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}" --hostname="${hostname}"
+if [ "${hook}" = login ] || [ "${hook}" = logout ] || [ "${hook}" = denied ]; then
+ if [ "${hostname}" = "" ]; then
+ "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}"
+ else
+ "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}" --hostname="${hostname}"
+ fi
fi