perform system calls in a more secure manner at suggestion of Adam Spiers <adam@spiers.net>
git-svn-id: svn://10.0.0.236/trunk@70535 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1ed14ca24a
commit
8199c2fa81
@ -85,8 +85,8 @@ LINE:
|
||||
|
||||
Lock();
|
||||
unless (-d "data/taginfo/$mungedname") {
|
||||
system("mkdir -p data/taginfo/$mungedname");
|
||||
system("chmod -R 777 data/taginfo/$mungedname");
|
||||
system("mkdir", "-p", "data/taginfo/$mungedname");
|
||||
system("chmod", "-R", "777", "data/taginfo/$mungedname");
|
||||
}
|
||||
if (open(TAGFILE, ">> $filename")) {
|
||||
print TAGFILE "$tagtime|" . join('|', @data) . "\n";
|
||||
@ -119,8 +119,8 @@ LINE:
|
||||
$mungedname =~ s!^_!!;
|
||||
$filename = "data/checkinlog/$mungedname";
|
||||
unless (-d "data/checkinlog") {
|
||||
system("mkdir -p data/checkinlog");
|
||||
system("chmod -R 777 data/checkinlog");
|
||||
system("mkdir", "-p", "data/checkinlog");
|
||||
system("chmod ", "-R", "777", "data/checkinlog");
|
||||
}
|
||||
if (open(TID, ">> $filename")) {
|
||||
print TID "${appendjunk}LOGCOMMENT\n$plainlog:ENDLOGCOMMENT\n";
|
||||
|
||||
@ -517,7 +517,7 @@ sub DataDir {
|
||||
|
||||
# Make sure it exists...
|
||||
unless (-d $dir) {
|
||||
system ("rm -rf $dir; mkdir -p $dir");
|
||||
system ("rm", "-rf", "$dir;", "mkdir", "-p", $dir);
|
||||
die "Couldn't create '$dir'\n"
|
||||
unless (-d $dir);
|
||||
chmod(0777, $dir);
|
||||
@ -547,7 +547,7 @@ sub LoadDirList {
|
||||
if (-f $modules) {
|
||||
if ((!(-f $dirsfile)) ||
|
||||
((-M $dirsfile) < (-M $modules))) {
|
||||
system("./createlegaldirs.pl $::TreeID");
|
||||
system("./createlegaldirs.pl", $::TreeID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ while (<STDIN>) {
|
||||
}
|
||||
close(FILE);
|
||||
chmod(0666, $filename);
|
||||
system("./adminmail.pl $filename");
|
||||
system("./adminmail.pl", $filename);
|
||||
|
||||
# unlink($filename);
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ while (<STDIN>) {
|
||||
}
|
||||
close(FILE);
|
||||
chmod(0666, $filename);
|
||||
system("./addcheckin.pl $filename");
|
||||
system("./addcheckin.pl", $filename);
|
||||
|
||||
# unlink($filename);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user