mirror of
https://github.com/webmin/webmin.git
synced 2026-05-08 08:00:30 +01:00
Safely quote slave param
This commit is contained in:
@@ -211,7 +211,7 @@ else {
|
||||
open(TEMP, ">$temp");
|
||||
print TEMP "n\ny\n";
|
||||
close(TEMP);
|
||||
$out = &backquote_logged("/usr/sbin/ypinit -s $in{'slave'} <$temp 2>&1");
|
||||
$out = &backquote_logged("/usr/sbin/ypinit -s ".quotemeta($in{'slave'})." <$temp 2>&1");
|
||||
unlink($temp);
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
|
||||
@@ -243,7 +243,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ else {
|
||||
open(TEMP, ">$temp");
|
||||
print TEMP "n\ny\n";
|
||||
close(TEMP);
|
||||
$out = &backquote_logged("/usr/sbin/ypinit -s $in{'slave'} <$temp 2>&1");
|
||||
$out = &backquote_logged("/usr/sbin/ypinit -s ".quotemeta($in{'slave'})." <$temp 2>&1");
|
||||
unlink($temp);
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
|
||||
@@ -263,7 +263,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ if ($in{'type'}) {
|
||||
&apply_table_changes() if ($in{'boot'});
|
||||
}
|
||||
else {
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s $in{'slave'} 2>&1");
|
||||
$out = &backquote_logged("/usr/lib/yp/ypinit -s ".quotemeta($in{'slave'})." 2>&1");
|
||||
if ($?) { &error("<tt>$out</tt>"); }
|
||||
$config{'slave'} = $in{'slave'};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user