mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
parent
6f8e648f5c
commit
64fa420718
@ -880,11 +880,18 @@ function local_group_set($group, $reset = false) {
|
||||
$group_name = $group['name'];
|
||||
$group_gid = $group['gid'];
|
||||
$group_members = '';
|
||||
|
||||
if (!$reset && !empty($group['member']) && count($group['member']) > 0) {
|
||||
$group_members = implode(",", $group['member']);
|
||||
}
|
||||
|
||||
if (empty($group_name) || $group['scope'] == "remote") {
|
||||
if (empty($group_name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the group is now remote, make sure there is no local group with the same name
|
||||
if ($group['scope'] == "remote") {
|
||||
local_group_del($group);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -904,8 +911,8 @@ function local_group_set($group, $reset = false) {
|
||||
if ($debug) {
|
||||
log_error(sprintf(gettext("Running: %s"), $cmd));
|
||||
}
|
||||
mwexec($cmd);
|
||||
|
||||
mwexec($cmd);
|
||||
}
|
||||
|
||||
function local_group_del($group) {
|
||||
|
||||
@ -423,7 +423,8 @@ if ($pconfig['gtype'] == "system") {
|
||||
'*Scope',
|
||||
$pconfig['gtype'],
|
||||
["local" => gettext("Local"), "remote" => gettext("Remote")]
|
||||
));
|
||||
))->setHelp("<span class=\"text-danger\">Warning: Changing this setting may affect the local groups file, " .
|
||||
"in which case a reboot may be required for the changes to take effect.</span>");
|
||||
}
|
||||
|
||||
$section->addInput(new Form_Input(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user