Commit Graph

7 Commits

Author SHA1 Message Date
lukem 247856f4d7 Fixes from Bill Fenner <fenner@research.att.com> for problems he found
in FreeBSD's port of this nsswitch code:

- Don't ignore unknown characters.  The old lexer would treat
	hosts:!!!!!!!!@@@@@$%^&*()()*$(files{}{}|||++!)(dns
  exactly the same as
	hosts: files dns

- Recover from errors by looking for the end of a line.  This means
  that having a syntax error near the top of the file doesn't prevent
  a service at the bottom of the file with no syntax error from being
  looked up.

Thanks Bill!
2002-03-19 00:04:09 +00:00
christos d76f22c50c add _nsyylineno declaration 2000-12-20 20:50:46 +00:00
lukem 2468bbbf42 don't use err(); instead pass an error condition back to a higher
layer to warn() about.
1999-11-28 05:46:15 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
kleink 312f023d61 Need "namespace.h". 1999-07-02 15:27:08 +00:00
lukem 645b10c9c4 add rcsids 1999-01-25 00:16:17 +00:00
lukem de3b78d72a merge nsswitch into main branch 1999-01-15 12:48:41 +00:00