diff options
author | Jeremy Allison <jra@samba.org> | 2001-06-06 23:07:10 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-06-06 23:07:10 +0000 |
commit | 11b2de50fc0e8bfcd810e8b07a7eb39a5d903621 (patch) | |
tree | 958c98c751380e3bacc0de3454c11f23ce3da76d /source3/rpc_server/srv_samr_nt.c | |
parent | e8e07a26eb1365d195c0345ad075ff828517fe53 (diff) | |
download | samba-11b2de50fc0e8bfcd810e8b07a7eb39a5d903621.tar.gz samba-11b2de50fc0e8bfcd810e8b07a7eb39a5d903621.tar.bz2 samba-11b2de50fc0e8bfcd810e8b07a7eb39a5d903621.zip |
Added getconf flags for RH7.1 lfs support. Changed while() to a for()
loop in Simo's code (removes much grp = gep->next code).
Jeremy.
(This used to be commit d0c276c2429fa19cd95ca887654e049593de68d5)
Diffstat (limited to 'source3/rpc_server/srv_samr_nt.c')
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 55e20ebd07..010da5c3e5 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -820,16 +820,14 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta if (grp == NULL) return NT_STATUS_NO_MEMORY; - while ((num_entries < max_entries) && (grp != NULL)) { + for (; (num_entries < max_entries) && (grp != NULL); grp = grp->next) { uint32 trid; if(!get_group_from_gid(grp->gr_gid, &smap)) { - grp = grp->next; continue; } if (smap.sid_name_use!=SID_NAME_ALIAS) { - grp = grp->next; continue; } @@ -838,24 +836,21 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta /* Don't return winbind groups as they are not local! */ if (strchr(smap.nt_name, *sep) != NULL) { DEBUG(10,("get_group_alias_entries: not returing %s, not local.\n", smap.nt_name )); - grp = grp->next; continue; } /* Don't return user private groups... */ if (Get_Pwnam(smap.nt_name, False) != 0) { DEBUG(10,("get_group_alias_entries: not returing %s, clashes with user.\n", smap.nt_name )); - grp = grp->next; continue; } for( i = 0; i < num_entries; i++) - if ( (*d_grp)[i].rid == trid ) break; + if ( (*d_grp)[i].rid == trid ) + break; - if ( i < num_entries ) { - grp = grp->next; + if ( i < num_entries ) continue; /* rid was there, dup! */ - } /* JRA - added this for large group db enumeration... */ @@ -864,7 +859,6 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta not very efficient, but hey... */ start_idx--; - grp = grp->next; continue; } @@ -877,7 +871,6 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta fstrcpy((*d_grp)[num_entries].name, smap.nt_name); (*d_grp)[num_entries].rid = trid; num_entries++; - grp = grp->next; } grent_free(glist); |