Hello Marc, It looks to me like #351552 was maybe closed before a complete patch was committed. Also, I am including a patch for a random other bug in the open bug list against adduser (I am trying to see if I can also close useability bugs along with serious bugs when I file patches). If you want them split out, let me know. The other bug is #121262, and is the bit of the patch beginning at line 564. Thanks, --- ../adduser-3.81.orig/adduser 2006-02-04 12:16:30.000000000 +0000 +++ ./adduser 2006-02-06 01:35:04.000000000 +0000 @@ -331,7 +331,8 @@ printf STDERR gtx("No UID/GID pair is available in the range %d-%d (FIRST_SYS_UID - LAST_SYS_UID).\n"),$config{"first_system_uid"},$config{"last_system_uid"}; dief (gtx("The user `%s'' was not created.\n"),$new_name); } - $new_gid = $new_uid; + $new_gid = &first_avail_gid($config{"first_gid"}, + $config{"last_gid"}); $ingroup_name = $new_name; } elsif (!defined($new_uid) && !$make_group_also) { @@ -415,7 +416,8 @@ printf STDERR gtx("No UID/GID pair is available in the range %d-%d (FIRST_UID - LAST_UID).\n"),$first_uid,$last_uid; dief (gtx("The user `%s'' was not created.\n"),$new_name); } - $new_gid = $new_uid; + $new_gid = &first_avail_gid($config{"first_gid"}, + $config{"last_gid"}); $ingroup_name = $new_name; } elsif (!defined($new_uid) && !$make_group_also) { @@ -564,11 +566,12 @@ if ($config{"skel"} && $copy_skeleton) { printf gtx("Copying files from `%s''\n"),$config{skel} if $verbose; - open(FIND, "cd $config{skel}; find . ! -name ''*.dpkg-*'' -print |") + open(FIND, "cd $config{skel}; find . -print |") || &cleanup("fork for find: $!\n"); while (<FIND>) { chop; next if ($_ eq "."); + next if ($_ =~ /dpkg-/); ©_to_dir($config{"skel"}, $_, $home_dir, $new_uid, $new_gid, ($config{"setgid_home"} =~ /yes/i)); } -- ----------------------------------------------------------------- | ,''''`. Stephen Gran | | : :'' : sgran@debian.org | | `. `'' Debian user, admin, and developer | | `- http://www.debian.org | ----------------------------------------------------------------- _______________________________________________ Adduser-devel mailing list Adduser-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/adduser-devel
Marc Haber
2006-Feb-26 15:48 UTC
Bug#351552: [Adduser-devel] Bug#351552: some random patches
On Mon, Feb 06, 2006 at 01:44:04AM +0000, Stephen Gran wrote:> --- ../adduser-3.81.orig/adduser 2006-02-04 12:16:30.000000000 +0000 > +++ ./adduser 2006-02-06 01:35:04.000000000 +0000 > @@ -331,7 +331,8 @@ > printf STDERR gtx("No UID/GID pair is available in the range %d-%d (FIRST_SYS_UID - LAST_SYS_UID).\n"),$config{"first_system_uid"},$config{"last_system_uid"}; > dief (gtx("The user `%s'' was not created.\n"),$new_name); > } > - $new_gid = $new_uid; > + $new_gid = &first_avail_gid($config{"first_gid"}, > + $config{"last_gid"}); > $ingroup_name = $new_name; > } > elsif (!defined($new_uid) && !$make_group_also) {That one seemed already to be in svn.> @@ -415,7 +416,8 @@ > printf STDERR gtx("No UID/GID pair is available in the range %d-%d (FIRST_UID - LAST_UID).\n"),$first_uid,$last_uid; > dief (gtx("The user `%s'' was not created.\n"),$new_name); > } > - $new_gid = $new_uid; > + $new_gid = &first_avail_gid($config{"first_gid"}, > + $config{"last_gid"}); > $ingroup_name = $new_name; > } > elsif (!defined($new_uid) && !$make_group_also) {That one was missing. I have applied it. J?rg will object if this was missing for a reason.> @@ -564,11 +566,12 @@ > > if ($config{"skel"} && $copy_skeleton) { > printf gtx("Copying files from `%s''\n"),$config{skel} if $verbose; > - open(FIND, "cd $config{skel}; find . ! -name ''*.dpkg-*'' -print |") > + open(FIND, "cd $config{skel}; find . -print |") > || &cleanup("fork for find: $!\n"); > while (<FIND>) { > chop; > next if ($_ eq "."); > + next if ($_ =~ /dpkg-/); > ©_to_dir($config{"skel"}, $_, $home_dir, $new_uid, > $new_gid, ($config{"setgid_home"} =~ /yes/i)); > }Part of this was already in svn, and I have now committed it completely. I am not too fond about that, since the mask is hardcoded. I''d rather have this configurable, and have opened a separate bug to have that implemented. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835