Fix secondary group permissions
authorJamie Cameron <jcameron@webmin.com>
Fri, 23 Oct 2009 04:30:41 +0000 (21:30 -0700)
committerJamie Cameron <jcameron@webmin.com>
Fri, 23 Oct 2009 04:30:41 +0000 (21:30 -0700)
passwd/CHANGELOG
passwd/index.cgi
passwd/passwd-lib.pl

index c1039b4..48f1857 100644 (file)
@@ -6,3 +6,5 @@ Added an access control option to exclude users from the list of those whose pas
 Re-wrote the user interface code to use the new Webmin UI library, for a more consistent look.
 ---- Changes since 1.440 ----
 Converted commands in the module's API file to POD format, and added more details about each function.
+---- Changes since 1.490 ----
+Fixed restrictions based on secondary group membership.
index 49050a8..ec40528 100755 (executable)
@@ -33,7 +33,7 @@ elsif ($access{'mode'} == 5) {
                @g = getgrnam($g);
                $gcan{$g[2]}++;
                if ($access{'sec'}) {
-                       foreach $m (split(/,/, $g[3])) {
+                       foreach $m (split(/\s+/, $g[3])) {
                                $insec{$m}++;
                                }
                        }
index b1f7b35..3a1ec24 100755 (executable)
@@ -48,7 +48,7 @@ elsif ($access{'mode'} == 5) {
                foreach $gname (split(/\s+/, $access{'users'})) {
                        local @g = getgrnam($gname);
                        return 1 if (&indexof($_[0]->[0],
-                                             split(/,/, $g[3])) >= 0);
+                                             split(/\s+/, $g[3])) >= 0);
                        }
                }
        return 0;