summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-09-01 16:58:53 +0200
committerChristian Poessinger <christian@poessinger.com>2018-09-01 16:59:01 +0200
commita14c7c1af0c7f4de51db922aba1d61addfe5747f (patch)
treec716519840665430a1ac0ee3a2049ddd9c5cb0bb /scripts
parent0760bf300a5a425e5cc147a7b58d27375137c2e2 (diff)
downloadvyatta-cfg-a14c7c1af0c7f4de51db922aba1d61addfe5747f.tar.gz
vyatta-cfg-a14c7c1af0c7f4de51db922aba1d61addfe5747f.zip
T731: fix use of uninitialized value in concatenation
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-log-commit.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-log-commit.pl b/scripts/vyatta-log-commit.pl
index bbf0852..7927500 100644
--- a/scripts/vyatta-log-commit.pl
+++ b/scripts/vyatta-log-commit.pl
@@ -21,7 +21,7 @@
# Portions created by Vyatta are Copyright (C) 2010 Vyatta, Inc.
# All Rights Reserved.
#
-# Author: Deepti Kulkarni
+# Author: Deepti Kulkarni
# Date: Feb 2012
# Description: Script to log active configuration commits to syslog.
#
@@ -40,7 +40,7 @@ my $status = $ENV{'COMMIT_STATUS'};
my $commit_status = 'Successful' if ($status eq 'SUCCESS');
#open log for logging commit details
if (defined $commit_status) {
- my $cur_tty = ttyname(0);
+ my $cur_tty = POSIX::ttyname(0) || "unknown";
my $cur_user = getlogin() || getpwuid($<) || "unknown";
openlog("commit", "", LOG_USER);