Mercurial > hg > foxridge-archiver
comparison unarchiver.pl @ 52:b762b5af6e42
fixed problem with user recogintion by getlogin
author | casties |
---|---|
date | Wed, 10 Sep 2008 14:59:45 +0200 |
parents | 724c615b5982 |
children | 7958ac21f9bf |
comparison
equal
deleted
inserted
replaced
51:116162d2d06e | 52:b762b5af6e42 |
---|---|
16 ####################################################### | 16 ####################################################### |
17 # internal parameters | 17 # internal parameters |
18 # | 18 # |
19 | 19 |
20 # program version | 20 # program version |
21 my $version = "0.3.2 (21.3.2007)"; | 21 my $version = "0.3.3 (10.9.2008)"; |
22 | 22 |
23 # read command line parameters | 23 # read command line parameters |
24 my $args = parseargs; | 24 my $args = parseargs; |
25 | 25 |
26 # debug level | 26 # debug level |
297 # | 297 # |
298 | 298 |
299 logger("INFO", "unarchiver $version"); | 299 logger("INFO", "unarchiver $version"); |
300 | 300 |
301 # make shure the right user is running this program | 301 # make shure the right user is running this program |
302 my $user = getlogin; | 302 my $user = getlogin || getpwuid($<); |
303 if (($user)&&($user ne "archive")&&($user ne "root")) { | 303 if (($user)&&($user ne "archive")&&($user ne "root")) { |
304 logger("ABORT", "you must be archive or root user to run this program!"); | 304 logger("ABORT", "you must be archive or root user to run this program!"); |
305 exit 1; | 305 exit 1; |
306 } | 306 } |
307 | 307 |