mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Switch all calls to open() to explicitly open for read
This commit is contained in:
@@ -85,7 +85,7 @@ if ($type eq 'mod') {
|
||||
print $text{'edit_osall'};
|
||||
}
|
||||
else {
|
||||
open(OSLIST, "$root_directory/os_list.txt");
|
||||
open(OSLIST, "<$root_directory/os_list.txt");
|
||||
while(<OSLIST>) {
|
||||
chop;
|
||||
if (/^([^\t]+)\t+([^\t]+)\t+(\S+)\t+(\S+)\t*(.*)$/) {
|
||||
|
||||
@@ -63,7 +63,7 @@ elsif ($in{source} == 2) {
|
||||
$grant = $in{'grant'} ? undef : [ split(/\s+/, $in{'grantto'}) ];
|
||||
|
||||
# Check validity
|
||||
open(MFILE, $pfile);
|
||||
open(MFILE, "<$pfile");
|
||||
read(MFILE, $two, 2);
|
||||
close(MFILE);
|
||||
if ($two eq "\037\235") {
|
||||
|
||||
@@ -200,7 +200,7 @@ else {
|
||||
}
|
||||
|
||||
# gunzip the file if needed
|
||||
open(FILE, $file);
|
||||
open(FILE, "<$file");
|
||||
read(FILE, $two, 2);
|
||||
close(FILE);
|
||||
if ($two eq "\037\213") {
|
||||
|
||||
Reference in New Issue
Block a user