Hi, Any comments? This project is dead? If so, I'll fork my smbldap-tools at Github...
Regards, At Tue, 08 Feb 2011 15:57:28 +0900, SATOH Fumiyasu@OSSTech wrote: > Hi, > > The get_next_id() subroutine in smbldap_tools.pm is used > to get the next UID or GID, but it always calls getpwuid(2). > > -- > -- Name: SATOH Fumiyasu (fumiyas @ osstech co jp) > -- Business Home: http://www.OSSTech.co.jp/ > -- Personal Home: http://www.SFO.jp/blog/ > [2 smbldap-tools-0.9.5-get_next_id.patch <application/octet-stream (7bit)>] > Use getgrgid() instead of getpwuid() for GID number > > -- SATOH Fumiyas @ OSS Technology, Inc., 2009-04-10 > > diff -urp smbldap-tools-0.9.5/smbldap_tools.pm > smbldap-tools-0.9.5-get_next_id/smbldap_tools.pm > --- smbldap-tools-0.9.5/smbldap_tools.pm 2008-04-22 17:13:29.000000000 > +0900 > +++ smbldap-tools-0.9.5-get_next_id/smbldap_tools.pm 2009-04-10 > 18:46:09.000000000 +0900 > @@ -1196,7 +1196,7 @@ sub get_next_id($$) { > if ( $check_uid_mesg->count == 0 ) { > > # now, look if the id or gid is not already used in /etc/passwd or > /etc/group > - if ( !getpwuid($nextuid) ) { > + if ($attribute =~ /^uid/i && !getpwuid($nextuid) || > !getgrgid($nextuid)) { > $found = 1; > return $nextuid; > } _______________________________________________ Smbldap-tools-tech mailing list [email protected] https://mail.gna.org/listinfo/smbldap-tools-tech
