comparison archivecheck.pl @ 52:b762b5af6e42

fixed problem with user recogintion by getlogin
author casties
date Wed, 10 Sep 2008 14:59:45 +0200
parents 724c615b5982
children 2208ed7370cb
comparison
equal deleted inserted replaced
51:116162d2d06e 52:b762b5af6e42
14 ####################################################### 14 #######################################################
15 # internal parameters 15 # internal parameters
16 # 16 #
17 17
18 # program version 18 # program version
19 my $version = "0.4.3 (21.3.2007 ROC)"; 19 my $version = "0.4.4 (10.9.2008 ROC)";
20 20
21 # read command line parameters 21 # read command line parameters
22 my $args = parseargs; 22 my $args = parseargs;
23 23
24 # debug level 24 # debug level
341 # 341 #
342 342
343 logger("INFO", "archivecheck $version"); 343 logger("INFO", "archivecheck $version");
344 344
345 # make shure the right user is running this program 345 # make shure the right user is running this program
346 my $user = getlogin; 346 my $user = getlogin || getpwuid($<) ;
347 if (not (($user eq "archive")||($user eq "root"))) { 347 if (not (($user eq "archive")||($user eq "root"))) {
348 logger("ABORT", "you must be archive or root user to run this program!"); 348 logger("ABORT", "you must be archive or root user to run this program!");
349 exit 1; 349 exit 1;
350 } 350 }
351 351