joerg
b9cf7d31ab
Add the constant database reader (cdbr(3)) and writer ((cdbw(3)).
...
They implement a space efficent write-once database with fast access
path. Switch the services(5) database to use cdb. The size of the
database file decreases from 2.1MB disk space to 307KB. Access
performance is about the same if setservent(0) is used and about an
order of magnitude faster otherwise. services_mkdb defaults to the new
format, but can optionally create the old db(3) format as well for
statically linked legacy applications.
2010-04-25 00:54:44 +00:00
christos
5f01dfbd0d
PR/37708: A.Leo.: getservbyname, segetaddrinfo sefgfaults when user has no
...
rights for reading ``/etc/services''
2008-01-06 16:34:18 +00:00
christos
fd58d46323
when re-opening the file only set SV_FIRST, don't clear accidentally SV_DB
...
because it leads to core-dumps.
2006-09-14 19:58:48 +00:00
joerg
d52654469c
db->seq expects an u_int as fourth argument.
2006-07-28 01:24:24 +00:00
christos
754fca0e0d
use a db version of services if one is there.
2006-07-27 22:03:49 +00:00
kleink
4e3cae58ff
Move the (at this time private) get{proto,serv}ent_r() prototypes and
...
data structures into the libc sources until the interface gets redone.
Approved by christos.
2005-04-18 19:39:45 +00:00
taca
5509874609
Semantic fix for allocation size for malloc() and realloc() previously
...
modified. Allocation unit isn't sizeof(char **) but sizeof(char *).
Noted by Geoff Wing.
2004-02-25 06:28:10 +00:00
christos
e79fe4ef48
Fix allocation size bug from Takahiro Kambe.
2004-02-24 15:28:07 +00:00
christos
d3516aeed5
- fix a memory leak on the current line buffer.
...
- fix a memory leak on realloc failure.
2004-02-23 16:06:52 +00:00
christos
8059eed1bc
Re-entrant versions of services and prorocols functions.
2004-02-19 19:21:44 +00:00