summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-11-11 20:35:29 (GMT)
committerErmal <eri@pfsense.org>2014-11-11 20:35:29 (GMT)
commitbaca968c298f978321796836e9ef8a2a76f579ab (patch)
tree3d1dc1b7a03586ab07280c40775bbd298d0430ca
parente16f6d03a790e0f8b4f8abaf770ae00c32381b57 (diff)
downloadunivnautes-baca968c298f978321796836e9ef8a2a76f579ab.zip
univnautes-baca968c298f978321796836e9ef8a2a76f579ab.tar.gz
univnautes-baca968c298f978321796836e9ef8a2a76f579ab.tar.bz2
Do not do operations for empty group members
-rw-r--r--etc/inc/auth.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 0fe9d20..81a54bd 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -623,10 +623,13 @@ function local_group_set($group, $reset = false) {
$group_name = $group['name'];
$group_gid = $group['gid'];
- $group_members = "''";
+ $group_members = '';
if (!$reset && !empty($group['member']) && count($group['member']) > 0)
$group_members = implode(",",$group['member']);
+ if (empty($group_members))
+ return;
+
/* read from group db */
$fd = popen("/usr/sbin/pw groupshow {$group_name} 2>&1", "r");
$pwread = fgets($fd);