summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add the nls code for XPG3-style message catalogs to libc.jkh1995-03-309-0/+854
| | | | Obtained from: NetBSD
* Add nls include to Makefile.jkh1995-03-301-0/+1
|
* Install the dlopen.3 manpage.phk1995-03-301-2/+2
|
* Clear IGNPAR in cfmakeraw() instead of set it.ache1995-03-291-2/+2
|
* Use __tty_fileno instead of STDERR_FILENO when detecting window sizedfr1995-03-281-1/+1
| | | | | changes Reviewed by: Bob Willcox <bob@obiwan.pmr.com>
* Tweak a few things just to show how form traversal might work fully.jkh1995-03-282-8/+8
| | | | | Fix some spelling errors in the example.c file and make error handling a little more explanatory.
* Include <strhash.h> instead now.jkh1995-03-281-1/+1
|
* Fix a missing _hash() to prevent namespace pollution with the db/hash routines.jkh1995-03-281-5/+7
| | | | | | | Grrr. If the dbhash routines weren't grossly overengineered I wouldn't even need to do this! :-( Also now export the hash_stats routine. Manpage coming RSN - I promise.
* Use yp_order() instead of yp_first() in _havemaster() to check for thewpaul1995-03-271-7/+7
| | | | | presence of the master.passwd.byname map, and remember to free the returned order value before exiting.
* Bump the shared library minor # because of the additions of thenate1995-03-271-0/+2
| | | | strhash() functions.
* Remove duplicates: parm rindex & scroll rightache1995-03-271-1/+1
|
* Fix bug using CSR for partial scrollingache1995-03-271-4/+4
|
* Hash 8bit chars without sign extensionache1995-03-261-3/+8
|
* Update info about LC_COLLATE implementationache1995-03-261-3/+1
|
* change hash.h to strhash.h to match new convention.jkh1995-03-264-5/+4
| | | | Manpage for strhash functions to follow tomorrow.
* Add the strhash family of routines. They provide a number of featuresjkh1995-03-262-2/+416
| | | | | that the db/hash functions don't, and they're much simpler to use for low-overhead string hashing.
* Use a hash table to hold all the bindings info rather than a linked list.paul1995-03-269-146/+321
| | | | | | | | | | Forms now have their own local bindings table so that anything declared within a form is local to that form. This means you can have fields of the same name in different forms. Added inlined attribute setting for strings e.g. "This is \bold bold" Added entry and exit functions for fields.
* Continue of previous fix: eliminate backslashes too.ache1995-03-261-1/+1
|
* Compact entry returned to user:ache1995-03-261-3/+49
| | | | | | | | | 1) Eliminate spaces and double ':'. 2) Remove duplicated capabilities from tc= expansion. It is needed to not overflow historycal 1024 limit. Add range check and return -1 if entry is too big instead of corrupting user memory.
* Updated manual page to indicate flags argument; added return value anddg1995-03-251-6/+24
| | | | errors section.
* scandir(3) didn't transfer d_type, and d_ino is called d_fileno now.phk1995-03-251-1/+2
|
* Add calls to endgrent() and endnetgrent() to the end of _createcaches().wpaul1995-03-251-0/+2
|
* Add more sanity checks. *Lots* of sanity checks. Huge tracts of sanity checks.wpaul1995-03-241-8/+40
| | | | | | | | | | | Make sure all arguments to the yp_*() functions are valid before sending them off to the server. This is somewhat distressing: once again my FreeBSD box brought down my entire network because of NIS bogosities. I *think* the poor argument checking in this module is the cause, but I still haven't been able to reproduce the exact series of events that lead to the ypserv crashes. For now I've resorted to sticking my FreeBSD box in a seprate domain. Hopefully a weekend of heavy testing will uncover the problem.
* Make sanity checks saner: don't let setnetgrent() or innetgr() swallowwpaul1995-03-241-2/+8
| | | | any bogus arguments.
* Get rid of strtok(), it is depricated in libsache1995-03-241-6/+6
|
* Change strtok() to strsep(), strtok() usage is depricatedache1995-03-243-14/+39
| | | | in libraries.
* Change strtok() to strsep(), using strtok() can cause memory corruptionache1995-03-241-16/+29
| | | | if user program use it too in the same time.
* Sicnce this code shares the same fragment as gethostnamaddr:ache1995-03-241-10/+16
| | | | | | | | Change strtok() to strsep(), cause memory corruption for all programs which use strtok() too in the same time. Fix potential NULL reference, depends of /etc/hosts.conf format Fix the bug when service name fetched always from beginning of the line, not from parsed token.
* Change strtok() to strsep(), cause memory corruption for allache1995-03-241-10/+16
| | | | | | | programs which use strtok() too in the same time. Fix potential NULL reference, depends of /etc/hosts.conf format Fix the bug when service name fetched always from beginning of the line, not from parsed token.
* Yikes! Fix stupid mistake I made in last commit that made getpwent() ignorewpaul1995-03-241-9/+12
| | | | | local password entries when YP was enabled. (How the heck did that get by me!?)
* As per Justin T. Gibbs's request, agument the +@netgroup/-@netgroupwpaul1995-03-241-36/+72
| | | | | | | | | | | | | remapping mechanism in the following manner: if given an entry +@foo and there is no netgroup named 'foo,' try searching for a regular user group called 'foo' and build the cache using the members of group 'foo' instead. If both a netgroup 'foo' and a user group 'foo' exist, the 'foo' netgroup takes precedence, since we're primarily interested in netgroup matching anyway. This allows access control schemes based on ordinary user groups (which are also available via NIS) rather than netgroups, since netgroups on some systems are limited in really brain-damaged ways.
* Don't let yp_match() or yp_next() operate on null or empty keys: askingwpaul1995-03-231-1/+11
| | | | | | ypserv to do a yp_match() with an a null or empty key causes much havok. (Note that this could be construed as a denial of service attack if used maliciously.)
* Don't let setnetgrent() operate on a null or empty group name: it canwpaul1995-03-231-0/+4
| | | | tickle a bug in ypserv and make a serious mess of things.
* Very important sanity checks: today I clobbered all four NIS servers onwpaul1995-03-231-6/+8
| | | | | | | | | | | | | my network because setnetgrent() was trying to do a lookup on group "". It seems that an attempt to do a yp_match() (and possible yp_next()) on a null or empty key causes Sun's ypserv in SunOS 4.1.3 to exit suddenly (and without warning). Our ypserv behaves badly in this situation too, thoush it doesn't appear to crash. In any event, getpwent, getnetgrent and yp_match() and yp_next() are now extra careful not to accidentally pass on null or empty arguments. Also made a small change to getpwent.c to allow +::::::::: wildcarding, which I had disabled previously.
* Lots of fixes/improvements in the +user substitution handling:wpaul1995-03-231-52/+39
| | | | | - Have the +@netgroup/-@netgroup caches handle the +user/-user cases too. - Clean up getpwent() to take advantage of the improved +user/-user handling.
* Small cleanups:wpaul1995-03-231-39/+44
| | | | | | - Prepend a '_' to a couple of things - Make sure YP is enabled in _createcaches() - Remove a couple of unused/uneeded variables from _createcaches()
* Phew! Done at last: getpwent now understands +@netgroup/-@netgroup directiveswpaul1995-03-231-9/+212
| | | | | in addition to the existing NIS substitutions. I may tweak this a bit in the future, but the important stuff is all here.
* Use better/stronger/faster NIS lookup code: by using yp_match() instead ofwpaul1995-03-211-44/+14
| | | | | the yp_first()/yp_next() combo, we let the database code in ypserv do some of the work for us.
* msun becomes the default -lm the right way now.phk1995-03-211-1/+1
|
* Reviewed by: Bill Paul <wpaul@freebsd.org>wpaul1995-03-211-2/+2
| | | | | | | | | | | | | | | | Submitted by: Sebastian Strollo <seb@erix.ericsson.se> - In /usr/src/lib/libc/yp/yplib.c, function yp_first when clnt_call fails with (r != RPC_SUCCESS) ysd->dom_vers should be set to 0! This ensures that /var/yp/bindings/dom.vers will be read again on retry. What happens now is that when our server is down and someone tries to use yp they will continue to try until kingdom come. So: if(r != RPC_SUCCESS) { clnt_perror(ysd->dom_client, "yp_first: clnt_call"); ysd->dom_vers = -1; ^^^^ change to 0 goto again; }
* Comment out declaration of kvm_uread until it can be fixed correctly.rgrimes1995-03-201-0/+2
|
* Change u_long to unsigned long to be consistent.rgrimes1995-03-201-1/+2
|
* At last! Modified __ivaliduser() to do the same kind of user/host validationwpaul1995-03-201-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | that everyone else does: you can now use +host/-host, +user,-user and +@netgroup/-@netgroup in /etc/hosts.equiv, /.rhosts, /etc/hosts.lpd and ~/.rhosts. Previously, __ivaliduser would only do host/user matches, which was lame. This affects all the r-commands, lpd, and any other program/service that uses ruserok(). An example of the usefullness of this feature would be a hosts.equiv file that looks like this: +@equiv-hosts Since the netgroup database can now be accessed via NIS, this lets you set up client machines once and then never have to worry about them again: all hosts.equiv changes can now be done through NIS. Once I finish with getpwent.c, we'll be able to do similar wacky things with login authentication too. (Our password field substitution will finally be on par with everyone else's, and I'll finally be able to fully integrate my FreeBSD machine into my network without having to worry about the grad students sneaking into it when I'm not looking. :) Danger Will Robinson! I tested this thing every which way I could, but Murphy's Law applies! If anybody spots a potential security problem with the way my matching algorithm works, tell me immediately! I don't want crackers snickering and calling me names behind my back. :)
* Whoops: expanding netgroups that reference multiple netgroups doesn'twpaul1995-03-191-1/+1
| | | | | | | | | | | | | | | work because parse_netgrp() doesn't recurse properly. Fixed by changing if (parse_netgrp(spos)) return(1); to if (parse_netgrp(spos)) continue; inside parse_netgrp(). (Lucky for me I happen to have a fairly complex 'live' netgroup database to test this stuff with.)
* Separated out the _putchar & __cputchar() routines so that programs suchnate1995-03-193-11/+51
| | | | | | | as tn3270 can replace _putchar(0 with their own routine and still keep using the __cputchar() routine used by all of the other curses routines. Reviewed by: "Andrey A. Chernov, Black Mage" <ache@astral.msk.su>
* libkvm exports kvm_uread(), so do declare it in the header file.joerg1995-03-191-0/+1
| | | | Got apparent by Philippe's -Wall patch for /usr/bin.
* Cast the offset of one call to lseek() to off_t, as it's already donejoerg1995-03-191-1/+1
| | | | | | | | in all other places here. This is a hack, the interface should be changed to use off_t's everywhere around, but this will require to update all the programs that happen to use libkvm.
* add a couple of missing #include linesphk1995-03-192-0/+3
|
* Two major changes:wpaul1995-03-191-4/+71
| | | | | | | | | | | | | | - Added support for reading netgroups from NIS/YP in addition to the local /etc/netgroups file. (Note that SunOS and many other systems only support reading netgroups via NIS, which is a bit odd.) - Fix Evil Null Pointer Dereferences From Hell (tm) that caused parse_netgrp() to SEGV when expanding netgroups that include references to other netgroups. Funny how nobody else noticed this. This is the first step in implimenting +@netgroup substitution in getpwent.c and any other places that could use it and don't already support it (which is probably everywhere).
* Fix authunix_maxgrouplist testache1995-03-181-2/+2
| | | | Submitted by: Scott Hazen Mueller <scott@zorch.sf-bay.org>
OpenPOWER on IntegriCloud