Subject: | Can't create empty groups |
If you want to create an empty group with Passwd::Unix it fails.
Please have a look at my simple patch. This quick fix allows you to
create empty groups.
With this patch you can use:
$pu->group('foo', 2000, undef );
Subject: | passwd_unix.diff |
--- /tmp/Passwd-Unix-0.46/lib/Passwd/Unix.pm 2008-12-17 13:46:26.000000000 +0100
+++ /usr/local/share/perl/5.10.0/Passwd/Unix.pm 2009-03-29 22:55:44.000000000 +0200
@@ -605,7 +605,7 @@
carp(qq/Incorrect GID "$gid"!/) if $self->warnings();
return;
}
- unless(ref $users and ref $users eq 'ARRAY'){
+ if(defined($users) && ref $users ne 'ARRAY' ){
carp(qq/Incorrect parameter "users"! It should be arrayref.../) if $self->warnings();
return;
}