mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix bug that slipped through last big round of changes: sometimes
yp_next_record() is called without a key (from xdr_my_ypresp_all()), in which case it returns the first key in the map. When doing this, it also needs to update the key index in the map queue entry. Without this, ypproc_all_2_svc() (and hence ypcat) don't work correctly. Noticed by: Michael L. Hench <hench@watt.cae.uwm.edu>
This commit is contained in:
parent
6e20a16589
commit
559605f1ec
1 changed files with 6 additions and 1 deletions
|
|
@ -600,8 +600,13 @@ int yp_next_record(dbp,key,data,all,allow)
|
|||
rval = yp_first_record(dbp,key,data,allow);
|
||||
if (rval == YP_NOKEY)
|
||||
return(YP_NOMORE);
|
||||
else
|
||||
else {
|
||||
#ifdef DB_CACHE
|
||||
qhead.cqh_first->dbptr->key = key->data;
|
||||
qhead.cqh_first->dbptr->size = key->size;
|
||||
#endif
|
||||
return(rval);
|
||||
}
|
||||
}
|
||||
|
||||
if (ypdb_debug)
|
||||
|
|
|
|||
Loading…
Reference in a new issue