check for uid/gid or username/groupname correctly in config-xml files, fixes #1642
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -399,10 +399,11 @@ class ConfigDaemon {
|
|||||||
case "false": if ($order == true) { $return = -1; }; break;
|
case "false": if ($order == true) { $return = -1; }; break;
|
||||||
case "true": if ($order == false) { $return = -1; }; break;
|
case "true": if ($order == false) { $return = -1; }; break;
|
||||||
case "notempty": if ($order == "") { $return = -1; }; break;
|
case "notempty": if ($order == "") { $return = -1; }; break;
|
||||||
case "userexists": if (posix_getpwnam($order) === false) { $return = -1; }; break;
|
case "userexists": if (posix_getpwuid($order) === false) { $return = -1; }; break;
|
||||||
case "groupexists": if (posix_getgrnam($order) === false) { $return = -1; }; break;
|
case "groupexists": if (posix_getgrgid($order) === false) { $return = -1; }; break;
|
||||||
case "usernotexists": if (is_array(posix_getpwnam($order))) { $return = -1; }; break;
|
case "usernotexists": if (is_array(posix_getpwuid($order))) { $return = -1; }; break;
|
||||||
case "groupnotexists": if (is_array(posix_getgrnam($order))) { $return = -1; }; break;
|
case "groupnotexists": if (is_array(posix_getgrgid($order))) { $return = -1; }; break;
|
||||||
|
case "usernamenotexists": if (is_array(posix_getpwnam($order))) { $return = -1; }; break;
|
||||||
case "equals": $return = (isset($attributes['value']) && $attributes['value'] == $order ? 0 : -1); break;
|
case "equals": $return = (isset($attributes['value']) && $attributes['value'] == $order ? 0 : -1); break;
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|||||||
@@ -3875,7 +3875,7 @@ aliases: files
|
|||||||
<commands index="3">
|
<commands index="3">
|
||||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<visibility mode="usernotexists">{{settings.phpfpm.vhost_httpuser}}
|
<visibility mode="usernamenotexists">{{settings.phpfpm.vhost_httpuser}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
||||||
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
||||||
|
|||||||
@@ -4696,7 +4696,7 @@ aliases: files
|
|||||||
<commands index="3">
|
<commands index="3">
|
||||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<visibility mode="usernotexists">{{settings.phpfpm.vhost_httpuser}}
|
<visibility mode="usernamenotexists">{{settings.phpfpm.vhost_httpuser}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
||||||
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
||||||
|
|||||||
@@ -1695,7 +1695,7 @@ aliases: files
|
|||||||
<commands index="3">
|
<commands index="3">
|
||||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<visibility mode="usernotexists">{{settings.phpfpm.vhost_httpuser}}
|
<visibility mode="usernamenotexists">{{settings.phpfpm.vhost_httpuser}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
||||||
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
||||||
|
|||||||
@@ -1703,7 +1703,7 @@ aliases: files
|
|||||||
<commands index="3">
|
<commands index="3">
|
||||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<visibility mode="usernotexists">{{settings.phpfpm.vhost_httpuser}}
|
<visibility mode="usernamenotexists">{{settings.phpfpm.vhost_httpuser}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
||||||
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
||||||
|
|||||||
@@ -5504,7 +5504,7 @@ aliases: files
|
|||||||
<commands index="3">
|
<commands index="3">
|
||||||
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<visibility mode="usernotexists">{{settings.phpfpm.vhost_httpuser}}
|
<visibility mode="usernamenotexists">{{settings.phpfpm.vhost_httpuser}}
|
||||||
</visibility>
|
</visibility>
|
||||||
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
<command><![CDATA[groupadd -f {{settings.phpfpm.vhost_httpgroup}}]]></command>
|
||||||
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
<command><![CDATA[useradd -s /bin/false -g {{settings.phpfpm.vhost_httpgroup}} {{settings.phpfpm.vhost_httpuser}}]]></command>
|
||||||
|
|||||||
Reference in New Issue
Block a user