summaryrefslogtreecommitdiffstats
path: root/include/pwd.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-04-16 00:22:41 +0000
committerwpaul <wpaul@FreeBSD.org>1996-04-16 00:22:41 +0000
commit24c5b47bb2eed224622ae01565ad620fa1506a5f (patch)
tree0c2267e23f54e2b60fd4f9cd265010794017f7cb /include/pwd.h
parent3ad2f69a9f86d650939c1e04a98ee4f59675af43 (diff)
downloadFreeBSD-src-24c5b47bb2eed224622ae01565ad620fa1506a5f.zip
FreeBSD-src-24c5b47bb2eed224622ae01565ad620fa1506a5f.tar.gz
NIS cleanups and fixes, the next generation.
getnetgrent.c: - Catch one bogon that snuck by: in _listmatch(), check for '\0' rather than '\n'; strings returned from yp_match() are terminated with a nul, not a newline. getpwent.c: - Rip out all of the +inclusion/-exclusion stuff from before and replace it with something a little less grotty. The main problem with the old mechanism was that it wasted many cycles processing NIS entries even after it already knew they were to be exlcuded (or not included, depending on your pointof view). The highlights of these changes include: o Uses an in-memory hash database table to keep track of all the -@netgroup, -user, and -@group exclusions. o Tries harder to duplicate the behavior normally obtained when using NIS inclusions/exclusions on a flat /etc/passwd file (meaning things come out in much the same order). o Uses seperate methods for handling getpwent() and getpwnam()/getpwuid() operations instead of trying to do everything with one general function, which didn't work as well as I thought it would. o Uses both getnetgrent() and innetgr() to try to save time where possible. o Use only one special token in the local password database (_PW_KEYYPBYNUM) instead of seperate tokens to mark + and - entries (and stop using the counter tokens too). If this new token doesn't exist, the code will make due with the standard _PW_KEYBYNUM token in order to support older databases that won't have the new token in them. All this is an attempt to make this stuff work better in environments with large NIS passwd databases.
Diffstat (limited to 'include/pwd.h')
-rw-r--r--include/pwd.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/pwd.h b/include/pwd.h
index 15b7b50..0cc41bb 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -61,10 +61,7 @@
#define _PW_KEYBYNUM '2' /* stored by entry in the "file" */
#define _PW_KEYBYUID '3' /* stored by uid */
#define _PW_KEYYPENABLED '4' /* YP is enabled */
-#define _PW_KEYPLUSBYNUM '5' /* special +@netgroup entries */
-#define _PW_KEYMINUSBYNUM '6' /* special -@netgroup entries */
-#define _PW_KEYPLUSCNT '7' /* number of +@netgroup entries */
-#define _PW_KEYMINUSCNT '8' /* number of -@netgroup entries */
+#define _PW_KEYYPBYNUM '5' /* special +@netgroup entries */
#define _PASSWORD_EFMT1 '_' /* extended encryption format */
OpenPOWER on IntegriCloud