# This need to be fixed if(system("grep", "-q", "^.*:.*:.*:$gr_gid:.*:.*:.*\$", "/etc/passwd") == 0) { dief (_("There are users having %s'' as primary group!\n"),$group); } Can you explain the comment? Do you mean that this needs to be rewritten using getpwent? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Karlsruhe, Germany | lose things." Winona Ryder | Fon: *49 721 966 32 15 Nordisch by Nature | How to make an American Quilt | Fax: *49 721 966 31 29
Roland Bauerschmidt
2004-Mar-25 12:32 UTC
[Adduser-devel] deluser code "this needs to be fixed"
Marc Haber wrote:> # This need to be fixed > if(system("grep", "-q", "^.*:.*:.*:$gr_gid:.*:.*:.*\$", "/etc/passwd") == 0) { > dief (_("There are users having %s'' as primary group!\n"),$group); > } > > Can you explain the comment? Do you mean that this needs to be > rewritten using getpwent?Yes, definitely. I don''t remember though, why that''s not the case. Roland
On Thu, Mar 25, 2004 at 01:32:58PM +0100, Roland Bauerschmidt wrote:> Marc Haber wrote: > > # This need to be fixed > > if(system("grep", "-q", "^.*:.*:.*:$gr_gid:.*:.*:.*\$", "/etc/passwd") == 0) { > > dief (_("There are users having %s'' as primary group!\n"),$group); > > } > > > > Can you explain the comment? Do you mean that this needs to be > > rewritten using getpwent? > > Yes, definitely. I don''t remember though, why that''s not the case.Probably to ease load on the NIS/LDAP server? I fear that we need to iterate through all users here? Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Karlsruhe, Germany | lose things." Winona Ryder | Fon: *49 721 966 32 15 Nordisch by Nature | How to make an American Quilt | Fax: *49 721 966 31 29
This noon, I have comitted a bunch of changes to adduser. I am currently waiting for all tags to propagate through the BTS before starting another round to look for easy-to-fix bugs. The changes are not tested very well, I intend to do this once after committing all changes. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Karlsruhe, Germany | lose things." Winona Ryder | Fon: *49 721 966 32 15 Nordisch by Nature | How to make an American Quilt | Fax: *49 721 966 31 29
Hello, On Thu, Mar 25, 2004 at 02:41:37PM +0100, Marc Haber wrote:> This noon, I have comitted a bunch of changes to adduser. I am > currently waiting for all tags to propagate through the BTS before > starting another round to look for easy-to-fix bugs. The changes are > not tested very well, I intend to do this once after committing all > changes.I have now committed all changes that I currently see fit to do. The other bugs wait either for feedback from the submitter or from Roland. Testing needs to be done. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don''t trust Computers. They | Mailadresse im Header Karlsruhe, Germany | lose things." Winona Ryder | Fon: *49 721 966 32 15 Nordisch by Nature | How to make an American Quilt | Fax: *49 721 966 31 29
Marc Haber wrote:> I have now committed all changes that I currently see fit to do. The > other bugs wait either for feedback from the submitter or from Roland. > Testing needs to be done.Thanks, your help is much appreciated! I''m sorry that I have such little time at the moment, but I''ll try to get a chance to have a look over the issues on the weekend. Roland