aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-08-03 09:18:19 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2009-08-03 09:18:19 +0000
commit5f392fc3cf8e94112ed7b15b2038e51f1b2b3800 (patch)
tree05042f0fe25431266bb325a14f6904ab4d4d68f4
parentce1f26c5f10d4a1a2c4c0de789371fedf2d4c88d (diff)
downloadgsc-5f392fc3cf8e94112ed7b15b2038e51f1b2b3800.tar.gz
gsc-5f392fc3cf8e94112ed7b15b2038e51f1b2b3800.tar.bz2
vpn/svpnsh: Fix concurrent login recognition
git-svn-id: file:///svnroot/gsc/trunk@338 d2de0444-eb31-0410-8365-af798a554d48
-rw-r--r--ChangeLog4
-rwxr-xr-xvpn/svpnsh10
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2446d88..6894c0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1 +1,5 @@
12009-08-03 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 * vpn/svpnsh: Fix concurrent login recognition.
4
12009-03-19 Sergey Poznyakoff <gray@gnu.org.ua> 52009-03-19 Sergey Poznyakoff <gray@gnu.org.ua>
diff --git a/vpn/svpnsh b/vpn/svpnsh
index 0185fc2..35f4eb1 100755
--- a/vpn/svpnsh
+++ b/vpn/svpnsh
@@ -2,3 +2,3 @@
2# svpnsh -- a simple vpn-only shell 2# svpnsh -- a simple vpn-only shell
3# Copyright (C) 2007 Sergey Poznyakoff 3# Copyright (C) 2007, 2009 Sergey Poznyakoff
4# 4#
@@ -22,3 +22,3 @@ logmsg() {
22 shift 22 shift
23 /usr/bin/logger -t vpnsh -p auth.$prio $* 23 /usr/bin/logger -t svpnsh -p auth.$prio $*
24} 24}
@@ -32,5 +32,5 @@ fi
32 32
33NLOGINS=`who -q | sed '2,$d' | tr ' ' '\n' | sort | sed '1d' | uniq -c | 33sdup=`who -q | sed '/^#/d' | tr -s ' ' '\n' | sort | uniq -d | grep "$USER"`
34 awk "\\$2==\"$USER\" { print \\$1 }"` 34
35if [ ${NLOGINS:-0} -gt 1 ] 35if [ -n "$sdup" ]
36then 36then

Return to:

Send suggestions and report system problems to the System administrator.