SAMR_QUERY_GROUPINFO got in loop, samba-3.0.4

Jeremy Allison jra at samba.org
Fri May 21 00:08:00 GMT 2004


On Wed, May 12, 2004 at 04:18:15PM +0200, Jianliang Lu wrote:
> When a domain group has some members which are no longer existed (may be 
> deleted from usrmgr, but not removed from its groups for wrong action), the 
> query_group_info wento in loop. You can try with usrmgr that got in hang!
> 
> FIX:
> --- rpc_server/srv_samr_nt.c.orig   Tue May 11 15:30:55 2004
> +++ rpc_server/srv_samr_nt.c    Wed May 12 15:57:51 2004
> @@ -3299,12 +3299,12 @@
>     while ((*gr != NULL) && ((*gr)[0] != '\0')) {
>         struct passwd *pw = getpwnam(*gr);
> 
> +       gr += 1;
>         if (pw == NULL)
>             continue;
> 
>         add_uid_to_array_unique(pw->pw_uid, uids, num);
> 
> -       gr += 1;
>     }

Well spotted ! Applied, thanks.

Jeremy.


More information about the samba-technical mailing list