summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix for a potential problem reported by a user I bumped into on IRCwpaul1995-06-261-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | last night: _gr_breakout_yp() doesn't check for badly formatted NIS group entries. For example, a bogus entry like this: bootp::user1,user2,user3 will lead to a null pointer dereference and a SEGV (note that the GID field is missing -- this results in one of the strsep(&result, ":") returning NULL). The symtpom of this problem is programs dumping core left and right the moment you add a + entry to /etc/group. Note that while this is similar to an earlier bug, it's caused by a different set of circumstances. The fix is to check for the NULL pointers and have _gr_breakout_yp() punt and return a failure code if it catches one. This is more or less the behavior of SunOS: if a bad NIS group entry is encountered, it's silently ignored. I don't think our standard (non-NIS) group parsing code behaves the same way. It doesn't crash though, so I'm citing the 'it ain't broken, don't fix it' rule and leaving it alone. I'll probably have to add similar checks to _pw_breakout_yp() in getpwent.c to ward off the same problems. It's rare that bad NIS map entries like this occur, but we should handle them gracefully when they do.
* 41 headers must be implicitly included and one more (<sys/param.h>) mustbde1995-06-251-1/+2
| | | | be explicitly included before kvm_getprocs() can be used.
* Update the man page for kvm_getprocs.3 to reflect our sysctl-basedjoerg1995-06-241-9/+9
| | | | | | kvm mechanism. Submitted by: (Vic Abell) <abe@cc.purdue.edu>
* Fixes for PR #508 and #509 ('botched 'Bad netgroup' error message' andwpaul1995-06-231-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'cycle in netgroup check too greedy'). PR #508 is apparently due to an inconsistency in the way the 4.4BSD netgroup code deals with bad netgroups. When 4.4BSD code encounters a badly formed netgroup entry (e.g. (somehost,-somedomain), which, because of the missing comma between the '-' and 'somedomain,' has only 2 fields instead of 3), it generates an error message and then bails out without doing any more processing on the netgroup containing the bad entry. Conversely, every other *NIX in the world that usees netgroups just tries to parse the entry as best it can and then silently continues on its way. The result is that two bad things happen: 1) we ignore other valid entries within the netgroup containing the bogus entry, which prevents us from interoperating with other systems that don't behave this way, and 2) by printing an error to stderr from inside libc, we hose certain programs, in this case rlogind. In the problem report, Bill Fenner noted that the 'B' from 'Bad' was missing, and that rlogind exited immediately after generating the error. The missing 'B' is apparently not caused by any problem in getnetgrent.c; more likely it's getting swallowed up by rlogind somehow, and the error message itself causes rlogind to become confused. I was able to duplicate this problem and discovered that running a simple test program on my FreeBSD system resulted in a properly formatted (if confusing) error, whereas triggering the error by trying to rlogin to the machine yielded the missing 'B' problem. Anyway, the fixes for this are as follows: - The error message has been reformatted so that it prints out more useful information (e.g. Bad entry (somehost,-somedomain) in netgroup "foo"). We check for NULL entries so that we don't print '(null)' anymore too. :) - Rearranged things in parse_netgrp() so that we make a best guess at what bad entries are supposed to look like and then continue processing instead of bailing out. - Even though the error message has been cleaned up, it's wrapped inside a #ifdef DEBUG. This way we match the behavior of other systems. Since we now handle the error condition better anyway, this error message becomes less important. PR #507 is another case of inconsistency. The code that handles duplicate/circular netgroup entries isn't really 'too greedy; -- it's just too noisy. If you have a netgroup containing duplicate entries, the code actually does the right thing, but it also generates an error message. As with the 'Bad netgroup' message, spewing this out from inside libc can also hose certain programs (like rlogind). Again, no other system generates an error message in this case. The only change here is to hide the error message inside an #ifdef DEBUG. Like the other message, it's largely superfluous since the code handles the condition correctly. Note that PR #510 (+@netgroup host matching in /etc/hosts.equiv) is still being investigated. I haven't been able to duplicate it myself, and I strongly suspect it to be a configuration problem of some kind. However, I'm leaving all three PRs open until I get 510 resolved just for the sake of paranoia.
* Fix handling NULL-encapsulated interfaces (lo & tun)ache1995-06-221-3/+12
| | | | | Reviewed by: wollman Submitted by: dvv@sprint.net
* Don't cast void functions to void.hsu1995-06-204-7/+7
| | | | Obtained from: NetBSD commit by jtc on June 16, 1995.
* Make _havemaster() use yp_first() (again) instead of yp_order() towpaul1995-06-171-2/+6
| | | | | ward off possible NIS+ evil. (I might be overly paranoid with this, but it doesn't hurt, so...)
* Add /usr/local/share/nls to default search pathache1995-06-171-2/+2
|
* Merge RELENG_2_0_5 into HEADrgrimes1995-06-1114-85/+172
|
* Remove trailing whitespace.rgrimes1995-05-308-79/+79
|
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* Remove trailing whitespace.rgrimes1995-05-30522-3833/+3840
|
* Remove trailing whitespace.rgrimes1995-05-302-3/+3
|
* Add a missing link from the setpgid manpage to the setpgrp manpage.nate1995-05-271-0/+1
|
* Remove Ontrack special from All_FreeBSD().phk1995-05-253-8/+9
| | | | Add chunk->disk pointer.
* Align slices to cylinder boundries.jkh1995-05-243-7/+18
| | | | Submitted By: phk
* Fix a typo, now there should always be an active slice.phk1995-05-211-2/+2
|
* Do not allocate the first track.phk1995-05-201-1/+5
|
* Remove two printfs before Jordan has a fit over them.phk1995-05-181-4/+1
|
* Fixed the calculation of the reserved space for bad144. Thanks Rod!phk1995-05-151-2/+2
|
* Fixed typo.dg1995-05-151-1/+1
|
* Create_Chunk_DWIM will not allocate anything in the last cylinder of aphk1995-05-151-3/+18
| | | | | | CHUNK_BAD144 slice. Also mknod the 'c' partition for freebsd slices, so bad144(8) will have something to work on.
* Parse ^? correctly nowache1995-05-141-0/+3
|
* Parse ^? now, our termcap use it and some termcaps from otherache1995-05-141-1/+5
| | | | systems use it too
* Fix error returning address of local arrayache1995-05-141-1/+2
|
* Fix FtpPasv to not return address of local variable, close PR 399ache1995-05-131-1/+1
| | | | Submitted by: John Capo <jc@irbs.com>
* Added MakeDevDisk(struct disk*, char *path);phk1995-05-123-4/+93
| | | | fixed bug in extended slice naming.
* Forgot to add these.paul1995-05-124-0/+1228
|
* New libforms.paul1995-05-129-872/+1141
| | | | | | | Bumped major number. Ncurses backend still needs improving. Other back-ends need to be written.
* Get the CHUNK_COMPAT_BSD flag right.phk1995-05-113-45/+40
|
* Create_Chunk_DWIM() is here, though it doesn't quite do what the name implies.phk1995-05-104-4/+53
|
* Bump major number instead of minorache1995-05-082-6/+6
|
* Recognize slice type #6 as dosphk1995-05-084-12/+28
| | | | handle OnTrack Disk manager correctly.
* Add check for rootfs > cyl 1024.phk1995-05-081-2/+6
|
* I bet Jordan is tearing his hair out, trying to figure the previous patchphk1995-05-081-2/+2
| | | | out... here is the real thing.
* Fix bug.phk1995-05-081-1/+2
|
* Whoops! An extra paren somehow got in there. Fixed.jkh1995-05-071-2/+2
|
* Always zero new chunks - keeps things like the private structures from havingjkh1995-05-071-2/+2
| | | | bogus data in them.
* General sanitation and cleanup. Killed the "reserved" type, it wasn't.phk1995-05-066-79/+76
|
* Make it so that the command formats are the same for both -i and -o.dufault1995-05-052-16/+71
| | | | This means "t" has to stand for bit fields, since b is a valid hex number.
* If in Create_Chunk we (type==freebsd && (flags&CHUNK_ALIGN)), then we willphk1995-05-052-8/+41
| | | | align this chunk properly. Have at it Jordan...
* Make the partitions names even more sensiblephk1995-05-047-31/+56
| | | | CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags.
* Add the private void *pointer to the chunks, and the functions to manage it.phk1995-05-034-8/+41
| | | | Make the reassignment of partition names less bogus.
* Bump minor numberache1995-05-031-0/+2
|
* Bump minor numberache1995-05-032-2/+6
|
* Cosmetic changes and paranoia checks:wpaul1995-05-031-5/+5
| | | | | | | | | | | | | | | ypbind.c: Make fewer assumtions about the state of the dom_alive and dom_broadcasting flags in roc_received(). If select() fails, use syslog() to report the error rather than perror(). Check that all our malloc()s succeed. Report malloc() failure in ypbindproc_setdom_2() to callers. yplib.c: Use #defined constants in ypbinderr_string() rather than hard-coded values.
* Export the chunk names properly.jkh1995-05-033-7/+16
|
* Make the target for tst01 more sensible.phk1995-05-035-43/+60
| | | | | | | | | | | | | Remove bogus targets. Allocate partition letters as follows: lowest offset "flags & CHUNK_IS_ROOT" gets 'a', lowest offset "subtype==FS_SWAP" gets 'b' the rest is allocated in offset order from this sequence "defghab". This will generally make sense. Added rules to complain if more than one CHUNK_IS_ROOT or more than one FS_SWAP per FreeBSD chunk. Set CHUNK_IS_ROOT on the 'a' partition in Open_Disk. Run Fixup_Names in Open_Disk.
* foo -> unknownjkh1995-05-021-2/+2
|
* I need Open_Disk() to not spew on my screen. #ifdef out some diagnosticjkh1995-05-021-1/+3
| | | | printfs.
OpenPOWER on IntegriCloud