sap-vpn.pl
changeset 5 9e64828e7d70
parent 3 01314d620fe0
child 6 9ff263c701ef
--- a/sap-vpn.pl	Thu Nov 13 21:11:42 2008 +0000
+++ b/sap-vpn.pl	Thu Nov 13 21:19:09 2008 +0000
@@ -13,7 +13,7 @@
 use English qw(-no_match_vars);
 
 ($EUID, $UID) = ($UID, $EUID);    # release ROOT, doesn't harm, if not suid
-($0) = ($0 =~ /([\w-]+)/);        # untaint $0
+($0) = ($0 =~ /([\/\w-]+)/);      # untaint $0
 
 use constant ME => basename $0;
 
@@ -220,7 +220,7 @@
 
         }
         wait;
-	die ME . ": pppd didn't return sucessfully (rc: @{[$? >> 8]})\n" if $?;
+        die ME . ": pppd didn't return sucessfully (rc: @{[$? >> 8]})\n" if $?;
     }
 
     # now executing the script
@@ -241,7 +241,8 @@
                 $GID = $EGID = $group;
             }
 
-            verbose "% executing script $opt_script with uid $UID and gid $GID\n";
+            verbose
+              "% executing script $opt_script with uid $UID and gid $GID\n";
 
             exec $opt_script
               or die ME . ": Can't exec $opt_script: $!\n";
@@ -355,6 +356,11 @@
 
 =back
 
+=head1 VERSION and SOURCE
+
+    Id:	    $Id$
+    URL:    $URL$
+
 =cut
 
 ###