History log of /src/usr.sbin/ypserv/common/ypdb.c |
Revision | | Date | Author | Comments |
1.13 |
| 01-Aug-2023 |
mrg | convert explicit length check before unchecked snprintf() with just a overflow checked snprintf(). for res_debug.c and res_query.c, convert from sprintf() to snprintf().
tested scp and rcp fail properly with too-long paths. tested getaddrinfo fails as expected for too-long domains. tested dig and ping for similar (res_debug.c/res_query.c). created a temporary fs with quotas to test edquota with a long EDITOR. did not test ypserv directly, but it's the same pattern.
avoids GCC 12 snprintf() warnings, and reduces total code size.
|
1.12 |
| 10-Jan-2017 |
christos | need <sys/stat.h>
|
1.11 |
| 29-Feb-2008 |
lukem | branches: 1.11.46; Simplify ypdb_open() API and just use it for opening the DB for reading. Provide a separate ypdb_mktemp() API to open a temporary file read-write. Use mkstemp() instead of mktemp().
NOTE: makedbm & mkalias tested ok. I couldn't test ypxfer.
|
1.10 |
| 20-Jun-2005 |
lukem | branches: 1.10.10; 1.10.16; ypdb_open(): * Clarify what it does (adds YPDB_SUFFIX if it's missing). * Add some explicit pathname length checks and display a warning if exceeded.
|
1.9 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
|
1.8 |
| 06-Jul-2002 |
wiz | ANSIfy, remove __P().
|
1.7 |
| 26-Jul-1999 |
lukem | remove superfluous casts
|
1.6 |
| 25-Jul-1999 |
lukem | because the ypserv struct datum and the db(3) struct DBT are not exactly the same (datum is { char *, int }, DBT is { void *, size_t /* u_int */ }), copy info to appropriate temporary variables before calling underlying db(3) operations.
|
1.5 |
| 01-Nov-1997 |
lukem | * rewrite read_line(), partially based on get_line in netgroup_mkdb.c: - use fgetln() instead of fgets() - store info in internal buffer - fix \\ support - count line numbers internally, so \\ lines don't mess up count * ypdb_store(): - ensure that the length of key or val doesn't exceed YPMAXRECORD * makedbm, mknetid, revnetgroup, stdethers, stdhosts: - improve error handling - take advantage of rewritten read_line(), and cleanup line parsing - don't print trailing ` ' for key/val pairs with an empty val * Makefile.yp: - fix up building of ypservers (from Chuck Cranor) * ypinit.sh: - remove leading spaces in variable assignment (from Chuck Cranor)
|
1.4 |
| 13-Oct-1997 |
lukem | branches: 1.4.2; - hack ypdb_open() to try the standard hash (for sendmail's aliases.db) if the initial open fails with EFTYPE. if a different database format is found to be more efficient, just add the code to open it prior to that of the other formats; this maintains backward compatibility with older databases whilst providing new functionality... - add rcsid's
|
1.3 |
| 07-Oct-1997 |
lukem | nuke register & unnecessary extern's, factor out common code
|
1.2 |
| 18-Jul-1997 |
thorpej | Fix compiler warnings (and an awful lot of annoying little bugs).
|
1.1 |
| 09-Aug-1996 |
thorpej | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 09-Aug-1996 |
thorpej | A ypserv implementation, originally written by Mats O Jansson, with some changes by me, including misc. cleanup, minor bug fixes, and brand-new access control list code.
|
1.4.2.1 |
| 28-Nov-1997 |
mellon | Pull rev 1.5 up from trunk (lukem)
|
1.10.16.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.10.10.1 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.11.46.1 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|