freebsd-dev/lib/libc
Bill Paul 2be5d4cba8 Add support for detecting and hopefully using the passwd.adjunct.byname
NIS map which is present on SunOS NIS servers with the SunOS C2 security
hack^Woption installed. I'm convinced that the C2 security option restricts
access to the passwd.adjunct.byname map in the same way that I restrict
access to the master.passwd.{byname,buid} maps (checking for reserved ports),
which means that we should be able to handle passwd.adjunct.byname map
correctly.

If _havemaster() doesn't find a master.passwd.byname map, it will now
test for a passwd.adjunct.byname map before defaulting back to the
standard non-shadowed passwd.{byname,byuid} maps. If _pw_breakout_yp()
sees that the adjunct map was found and the password from the standard
maps starts with ##, it will try to grab the correct password field
from the adjunct map. As with the master.passwd maps, this only happens
if the caller is root, so the shadowing feature is preserved; non-root
users just get back ##username as the encrypted password.

Note that all we do is grab the second field from the passwd.adjunct.byname
entry, which is designated to be the real encrypted password. There are
other auditing fields in the entry but they aren't of much use to us.

Also switched back to using yp_order() to probe for the maps (instead
of yp_first()). The original problem with yp_order() was that it barfed
with NIS+ servers in YP compat mode since they don't support the
YPPROC_ORDER procedure. This condition is handled a bit more gracefully
in yplib now: we can detect the error and just punt on the probing.
1996-12-03 17:55:49 +00:00
..
amd64 Correct a "spelling" error in a comment. 1996-10-31 17:50:45 +00:00
compat-43 fix .Xr macro 1996-09-21 15:08:10 +00:00
db Back out most of the last backout. :-) Guido removed the 1.1.1.1->1.1.1.2 1996-10-19 01:34:25 +00:00
gen Add support for detecting and hopefully using the passwd.adjunct.byname 1996-12-03 17:55:49 +00:00
gmon Cleaned up interrupt masking by declaring the state variable in a 1996-08-28 20:15:32 +00:00
i386 Correct a "spelling" error in a comment. 1996-10-31 17:50:45 +00:00
locale Add rcsid[] 1996-11-27 22:30:44 +00:00
net Doc updates and cleanups made with the bind-4.9.4 update some time ago. 1996-11-01 06:29:00 +00:00
nls General -Wall warning cleanup, part I. 1996-07-12 18:57:58 +00:00
quad Added prototypes. 1995-12-26 13:25:13 +00:00
regex collate_range_cmp -> __collate_range_cmp 1996-10-31 04:38:21 +00:00
rpc get_myaddress() wasn't following the interface array properly 1996-11-22 23:37:08 +00:00
stdio perror () does not prepend ": " for the non-NULL argument "". close PR 1492 1996-09-30 15:39:18 +00:00
stdlib If you run with option Z and malloc fails, memset gets called 1996-10-29 20:35:39 +00:00
stdtime Move PATH_LOCALE handling to setlocale.c, simplify locale path building, 1996-11-26 02:52:52 +00:00
string delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
sys upgrade STANDARDS from POSIX 1003.1-88 to 1003.1-90 using .St macro 1996-12-02 20:03:58 +00:00
xdr delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
yp - Avoid possible SEGVs: never call clnt_destroy() without checking 1996-11-08 01:42:02 +00:00
Makefile Back out minor bumping per Peter suggestion 1996-08-13 14:37:53 +00:00