summaryrefslogtreecommitdiff
path: root/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* Brought in changes from rev 1.10: various bugfixes.David Greenman1995-10-071-24/+41
| | | | Notes: svn path=/stable/2.1/; revision=11287
* Sync with main branch.David Greenman1995-10-055-85/+102
| | | | Notes: svn path=/stable/2.1/; revision=11226
* Brought in changes from main branch: security fixes.David Greenman1995-09-261-18/+86
| | | | Notes: svn path=/stable/2.1/; revision=11013
* Brought in changes from main branch: use ctime (again, sigh!).David Greenman1995-08-301-2/+1
| | | | Notes: svn path=/stable/2.1/; revision=10456
* Brought in changes from main branch...everything except the BIND 4.9.3-b24.David Greenman1995-08-286-10/+10
| | | | Notes: svn path=/stable/2.1/; revision=10357
* Brought in changes from rev 1.4: NULL terminate strings, produce saneDavid Greenman1995-08-251-9/+13
| | | | | | | version string. Notes: svn path=/stable/2.1/; revision=10263
* Brought in changes from revs 1.10-1.11: various bug fixes.David Greenman1995-08-251-13/+187
| | | | Notes: svn path=/stable/2.1/; revision=10262
* Brought in changes from rev 1.9: fixes for PRs 507, 508, and 509.David Greenman1995-08-051-7/+43
| | | | Notes: svn path=/stable/2.1/; revision=9924
* Brought in changes from main branch: check for NULL pointers.David Greenman1995-08-052-27/+39
| | | | Notes: svn path=/stable/2.1/; revision=9923
* This commit was manufactured by cvs2svn to create branch 'RELENG_2_1_0'.cvs2svn1995-06-1314-3724/+0
| | | | Notes: svn path=/stable/2.1/; revision=9211
* Merge RELENG_2_0_5 into HEADRodney W. Grimes1995-06-111-0/+9
| | | | Notes: svn path=/head/; revision=9202
* Remove trailing whitespace.Rodney W. Grimes1995-05-3025-124/+124
| | | | Notes: svn path=/head/; revision=8870
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-1/+1
| | | | Notes: svn path=/head/; revision=8857
* Parse ^? now, our termcap use it and some termcaps from otherAndrey A. Chernov1995-05-141-1/+5
| | | | | | | systems use it too Notes: svn path=/head/; revision=8522
* Fix bracket error for LogMaskAndrey A. Chernov1995-05-021-1/+1
| | | | | | | Submitted by: Ruslan Belkin <rus@home2.UA.net> Notes: svn path=/head/; revision=8226
* Added function and man page for ftok(3), used in conjunction withJoerg Wunsch1995-05-012-0/+135
| | | | | | | | | | the so-called "System V IPC". Submitted by: jbeukema@HK.Super.Net (John Beukema) Obtained from: Th. Lockert <tholo@sigmasoft.com>, via NetBSD Notes: svn path=/head/; revision=8198
* Small fix for the following problems:Bill Paul1995-04-291-2/+10
| | | | | | | | | | | | | | | | - If you take the wheel entry out of /etc/group and turn on NIS, the '+:*::' line is incorrectly flagged as the entry for wheel (the empty gid section is translated to 0), hence getgrgid() returns '+' as the name of the group instead of 'wheel.' - Using just '+:' as the 'turn on NIS' switch in /etc/group makes getgrgid() dump core because of a null pointer dereference. (Last time I was in here, I foolishly assumed that fixing the core dump problems with getgrnam() and getgrent() would fix getgrgid() too. Silly me.) Notes: svn path=/head/; revision=8172
* in _freecaches(): strdup() allocates us memory -- remember to free it.Bill Paul1995-04-221-10/+18
| | | | Notes: svn path=/head/; revision=8002
* Fix bugs in opendir():Bruce Evans1995-04-211-9/+23
| | | | | | | | | | - it succeeded on non-directories (see POSIX 5.1.2.4). - it hung on (non-open) named pipes. - it leaked memory if the second malloc() failed. - it didn't preserve errno across errors in close(). Notes: svn path=/head/; revision=7978
* Head off potential core dump in _havemaster() (we don't need to free anyBill Paul1995-04-151-4/+1
| | | | | | | memory here: the underlying YP routines handle this one for us). Notes: svn path=/head/; revision=7834
* Better conformance to SunOS behavior: if we can't match a user to oneBill Paul1995-04-141-2/+8
| | | | | | | | | | | of the plus or minus lists at all, reject him. This lets you create a +@netgroup list of users that you want to admit and reject everybody else. If you end your +@netgroup list with the wildcard line (+:::::::::) then you'll have a +@netgroup list that remaps the specified people but leaves people not in any netgroup unaffected. Notes: svn path=/head/; revision=7815
* Add err_set_file() and err_set_exit() functions to make it possible forGarrett Wollman1995-04-132-18/+64
| | | | | | | | programs which use err(3) to work nicely in a wider range of environments (e.g., dialog). Notes: svn path=/head/; revision=7803
* Add missing header referenceAndrey A. Chernov1995-04-091-0/+1
| | | | Notes: svn path=/head/; revision=7690
* The man page setmode(3) declares `void setmode' when it should beJoerg Wunsch1995-04-051-1/+1
| | | | | | | | | declared `void *setmode'. Submitted by: kargl@troutmask.apl.washington.edu Notes: svn path=/head/; revision=7638
* getpwent.c: fix problem with emacs dumping core when NIS is enabled. AlsoBill Paul1995-04-043-21/+34
| | | | | | | | | | | add #includes for YP headers when compiling with -DYP to avoid some implicit declarations. getgrent.c & getnetgrent.c: add some #includes to avoid implicit declarations of YP functions. Notes: svn path=/head/; revision=7615
* Clear IGNPAR in cfmakeraw() instead of set it.Andrey A. Chernov1995-03-291-2/+2
| | | | Notes: svn path=/head/; revision=7471
* Use yp_order() instead of yp_first() in _havemaster() to check for theBill Paul1995-03-271-7/+7
| | | | | | | | presence of the master.passwd.byname map, and remember to free the returned order value before exiting. Notes: svn path=/head/; revision=7422
* scandir(3) didn't transfer d_type, and d_ino is called d_fileno now.Poul-Henning Kamp1995-03-251-1/+2
| | | | Notes: svn path=/head/; revision=7349
* Add calls to endgrent() and endnetgrent() to the end of _createcaches().Bill Paul1995-03-251-0/+2
| | | | Notes: svn path=/head/; revision=7340
* Make sanity checks saner: don't let setnetgrent() or innetgr() swallowBill Paul1995-03-241-2/+8
| | | | | | | any bogus arguments. Notes: svn path=/head/; revision=7336
* Change strtok() to strsep(), using strtok() can cause memory corruptionAndrey A. Chernov1995-03-241-16/+29
| | | | | | | if user program use it too in the same time. Notes: svn path=/head/; revision=7327
* Yikes! Fix stupid mistake I made in last commit that made getpwent() ignoreBill Paul1995-03-241-9/+12
| | | | | | | | local password entries when YP was enabled. (How the heck did that get by me!?) Notes: svn path=/head/; revision=7322
* As per Justin T. Gibbs's request, agument the +@netgroup/-@netgroupBill Paul1995-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. Notes: svn path=/head/; revision=7319
* Don't let setnetgrent() operate on a null or empty group name: it canBill Paul1995-03-231-0/+4
| | | | | | | tickle a bug in ypserv and make a serious mess of things. Notes: svn path=/head/; revision=7289
* Very important sanity checks: today I clobbered all four NIS servers onBill Paul1995-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. Notes: svn path=/head/; revision=7288
* Lots of fixes/improvements in the +user substitution handling:Bill Paul1995-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. Notes: svn path=/head/; revision=7278
* Small cleanups:Bill Paul1995-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() Notes: svn path=/head/; revision=7262
* Phew! Done at last: getpwent now understands +@netgroup/-@netgroup directivesBill Paul1995-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. Notes: svn path=/head/; revision=7258
* Use better/stronger/faster NIS lookup code: by using yp_match() instead ofBill Paul1995-03-211-44/+14
| | | | | | | | the yp_first()/yp_next() combo, we let the database code in ypserv do some of the work for us. Notes: svn path=/head/; revision=7223
* Whoops: expanding netgroups that reference multiple netgroups doesn'tBill Paul1995-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.) Notes: svn path=/head/; revision=7175
* Two major changes:Bill Paul1995-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). Notes: svn path=/head/; revision=7149
* Fix 'putting +: in /etc/group causes many programs to dump core' bugBill Paul1995-03-181-1/+11
| | | | | | | | | | | | by heading off possible null pointer dereferences in grscan(). Also change getgrnam() slightly to properly handle the change: if grscan() returns an rval of 1 and leaves a '+' in the gr_name field and YP is enabled, poll the YP group.byname map before giving up. This should insure that we make every effort to find a match in the local and YP group databases before bailing out. Notes: svn path=/head/; revision=7124
* stdio.h --> unistd.hAndrey A. Chernov1995-03-091-1/+1
| | | | Notes: svn path=/head/; revision=6966
* Explain the full story, and make it understandable too.Poul-Henning Kamp1995-02-251-2/+7
| | | | Notes: svn path=/head/; revision=6693
* fix the synopsis to showPoul-Henning Kamp1995-02-241-5/+1
| | | | | | | | | | | | | | | | | void | *signal(int sig, void (*func)(int)) instead of | void | *signal(sig, func()) | | void | (*func)() Notes: svn path=/head/; revision=6681
* Add missing #include <time.h> with time() prototypeAndrey A. Chernov1995-02-241-0/+1
| | | | Notes: svn path=/head/; revision=6677
* Bruce pointed out, that a misleading warning would be issuedStefan Eßer1995-02-171-1/+1
| | | | | | | | | | in an (unlikely) border case (maxgroups==1 and the user is on an /etc/group line for the same group and that group only ...). Now this case is dealt with as before ... Notes: svn path=/head/; revision=6536
* Protect against duplicate gids in group list (as could be theStefan Eßer1995-02-171-2/+5
| | | | | | | result of being a member of some group in both /etc/group and YP). Notes: svn path=/head/; revision=6530
* Backed out Keith Bostic's getcwd/$PWD hack. It is causing things to breakDavid Greenman1995-02-072-31/+6
| | | | | | | all over the place. Notes: svn path=/head/; revision=6227
* Document the getenv(PWD) feature.Poul-Henning Kamp1995-02-051-1/+7
| | | | Notes: svn path=/head/; revision=6203