Hi,
Now Proxmox VE 1.5 allows the only user whose primary group is 'root' to login. Does allowing all members of 'root' group have any problems? If not, is there something wrong with patches below?
Now Proxmox VE 1.5 allows the only user whose primary group is 'root' to login. Does allowing all members of 'root' group have any problems? If not, is there something wrong with patches below?
Code:
--- PVE/Utils.pm.orig 2010-02-14 02:02:47.273012446 -0500
+++ PVE/Utils.pm 2010-02-14 01:57:48.862472843 -0500
@@ -181,6 +181,17 @@
my ($name, $passwd, $uid, $gid) = getpwnam ($username);
my $groupname = getgrgid($gid) || 'nogroup';
+ while (my ($g, $p, $i, $members) = getgrent()) {
+ if ($g == 'root') {
+ foreach my $u (split(/ /, $members)) {
+ if ($u == $username) {
+ $groupname = $g;
+ last;
+ }
+ }
+ last;
+ }
+ }
# fixme: what groups are allowed?
if ($groupname ne 'root') {
Last edited: