mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
When performing a user configuration upgrade, make sure the all group gets
created before syncing accounts to the system.
This commit is contained in:
parent
97b8e3fc89
commit
613cf46cdf
@ -93,6 +93,15 @@ function & getGroupEntry($name) {
|
||||
return $config['system']['group'][$groupindex[$name]];
|
||||
}
|
||||
|
||||
function & getGroupEntryByGID($gid) {
|
||||
global $config;
|
||||
foreach ($config['system']['group'] as & $group)
|
||||
if ($group['gid'] == $gid)
|
||||
return $group;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sync_local_accounts() {
|
||||
global $config;
|
||||
|
||||
@ -129,6 +138,10 @@ function sync_local_accounts() {
|
||||
pclose($fd);
|
||||
}
|
||||
|
||||
/* make sure the all group exists */
|
||||
$allgrp = getGroupEntryByGID(1998);
|
||||
set_local_group($allgrp);
|
||||
|
||||
/* sync all local users */
|
||||
if (is_array($config['system']['user']))
|
||||
foreach ($config['system']['user'] as $user)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user