aboutsummaryrefslogtreecommitdiffstats
path: root/src/logging
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-10-29 22:04:33 +0100
committerMattias Andrée <maandree@operamail.com>2014-10-29 22:04:33 +0100
commitad043221e3b5d20e7a6ba707ed33fd8255e9a667 (patch)
tree017b41a660847b0e64955b6dda30a2040a97297b /src/logging
parentmakefile: add install and uninstall rules (diff)
downloadcerberus-logging-ad043221e3b5d20e7a6ba707ed33fd8255e9a667.tar.gz
cerberus-logging-ad043221e3b5d20e7a6ba707ed33fd8255e9a667.tar.bz2
cerberus-logging-ad043221e3b5d20e7a6ba707ed33fd8255e9a667.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/logging')
-rwxr-xr-xsrc/logging12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/logging b/src/logging
index 14d2dfc..45e4815 100755
--- a/src/logging
+++ b/src/logging
@@ -71,12 +71,12 @@ user="${username}"
# Execute a program only if it exists
try ()
{
- if hash "${1}" 2>/dev/null then
+ if hash "${1}" 2>/dev/null; then
"$@"
fi
}
# Call logging programs (those that exists) for a successful login action
-log-login ()
+log_login ()
{
# This is useful if you want to print the last logging.
# log-login-lastlog updates the entry in lastlog so it is helpful
@@ -95,12 +95,12 @@ log-login ()
try log-login-syslog "$@"
}
# Call logging programs (those that exists) for a logout action
-log-logout ()
+log_logout ()
{
true
}
# Call logging programs (those that exists) for a failed login action
-log-denied ()
+log_denied ()
{
try log-login-btmp "$@"
try log-login-audit "$@"
@@ -120,8 +120,8 @@ pid=--pid="${pid}"
# Call the logging programs
if [ "${hostname}" = "" ]; then
- "log-${hook}" "${action}" "${username}" "${ttyname}" "${pid}"
+ "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}"
else
- "log-${hook}" "${action}" "${username}" "${ttyname}" "${pid}" --hostname="${hostname}"
+ "log_${hook}" "${action}" "${username}" "${ttyname}" "${pid}" --hostname="${hostname}"
fi