diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-08-01 23:43:27 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-08-01 23:43:27 +0000 |
commit | 5878ca478dd08bdc6e0ea23f49131595fd71af04 (patch) | |
tree | eb4672f37b216003fbad8e916878e36c7fe04afc | |
parent | 613cf46cdfe979c939307eefd9230b4d995c718f (diff) | |
download | pfsense-5878ca478dd08bdc6e0ea23f49131595fd71af04.zip pfsense-5878ca478dd08bdc6e0ea23f49131595fd71af04.tar.gz |
Add an option to set_local_group to clear the system user member list.
-rw-r--r-- | etc/inc/auth.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc index c46a097..2d89e5d 100644 --- a/etc/inc/auth.inc +++ b/etc/inc/auth.inc @@ -140,7 +140,7 @@ function sync_local_accounts() { /* make sure the all group exists */
$allgrp = getGroupEntryByGID(1998);
- set_local_group($allgrp);
+ set_local_group($allgrp, true);
/* sync all local users */
if (is_array($config['system']['user']))
@@ -312,12 +312,12 @@ function set_local_user_groups($user, $new_groups = NULL ) { set_local_group($group);
}
-function set_local_group($group) {
+function set_local_group($group, $reset = false) {
$group_name = $group['name'];
$group_gid = $group['gid'];
$group_members = "''";
- if (count($group['member']))
+ if (!$reset && count($group['member']))
$group_members = implode(",",$group['member']);
/* read from group db */
|