Commit Graph

583 Commits

Author SHA1 Message Date
wollman
ceb5359a6a Numerous Makefile fixes:
1) Do dependencies.
2) Install all appropriate links to manual pages.
3) Install header file in `beforeinstall' like all the rest.
4) Install header file only if changed.
5) Install object files only if changed.
1995-06-30 15:30:35 +00:00
dfr
6da3ef3223 Change ld.so to correctly load dependant libraries for dlopen and unload them
on dlclose.  Also correctly call constructors and destructors for libraries
linked with /usr/lib/c++rt0.o.
Change interpretation of dlopen manpage to call _init() rather than init()
for dlopened objects.
Change c++rt0.o to avoid using atexit to call destructors, allowing dlclose to
call destructors when an object is unloaded.
Change interface between crt0 and ld.so to allow crt0 to call a function on
exit to call destructors for shared libraries explicitly.

These changes are backwards compatible.  Old binaries will work with the new
ld.so and new binaries will work with the old ld.so.  A version number has
been introduced in the crt0-ld.so interface to allow for future changes.

Reviewed by:	GAWollman, Craig Struble <cstruble@singularity.bevc.blacksburg.va.us>
1995-06-27 09:53:27 +00:00
wpaul
89e37d5aa0 Do the same sanity checking in _pw_breakout_yp() that we do in
_gr_breakout_yp(): if we encounter a NULL pointer generated as the
result of a badly formatted NIS passwd entry (e.g. missing fields),
we punt and return an error code, thereby silently skipping the
bad entry.
1995-06-26 16:04:57 +00:00
wpaul
74bdeb9992 Fix for a potential problem reported by a user I bumped into on IRC
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.
1995-06-26 14:59:46 +00:00
bde
769198d96b 41 headers must be implicitly included and one more (<sys/param.h>) must
be explicitly included before kvm_getprocs() can be used.
1995-06-25 03:35:49 +00:00
joerg
7343a5be69 Update the man page for kvm_getprocs.3 to reflect our sysctl-based
kvm mechanism.

Submitted by:	(Vic Abell) <abe@cc.purdue.edu>
1995-06-24 18:53:09 +00:00
wpaul
c3bd02d791 Fixes for PR #508 and #509 ('botched 'Bad netgroup' error message' and
'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.
1995-06-23 14:47:54 +00:00
ache
215845d698 Fix handling NULL-encapsulated interfaces (lo & tun)
Reviewed by: wollman
Submitted by: dvv@sprint.net
1995-06-22 16:56:00 +00:00
hsu
969b124869 Don't cast void functions to void.
Obtained from: NetBSD commit by jtc on June 16, 1995.
1995-06-20 18:31:16 +00:00
wpaul
3e0e2d1182 Make _havemaster() use yp_first() (again) instead of yp_order() to
ward off possible NIS+ evil. (I might be overly paranoid with this,
but it doesn't hurt, so...)
1995-06-17 04:00:02 +00:00
ache
4c49848733 Add /usr/local/share/nls to default search path 1995-06-17 03:02:21 +00:00
rgrimes
1b1ee55538 Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
rgrimes
bb2ad2880b Remove trailing whitespace. 1995-05-30 08:29:07 +00:00
rgrimes
a14d555c87 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
rgrimes
f05428e4cd Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
rgrimes
4f960dd75f Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
nate
0cd8cad49e Add a missing link from the setpgid manpage to the setpgrp manpage. 1995-05-27 04:17:04 +00:00
phk
20051e5d38 Remove Ontrack special from All_FreeBSD().
Add chunk->disk pointer.
1995-05-25 06:14:49 +00:00
jkh
33ee1a22ed Align slices to cylinder boundries.
Submitted By: phk
1995-05-24 08:59:40 +00:00
phk
048a5f2fc5 Fix a typo, now there should always be an active slice. 1995-05-21 07:47:24 +00:00
phk
7ee584e87b Do not allocate the first track. 1995-05-20 19:11:44 +00:00
phk
663c5c1f9d Remove two printfs before Jordan has a fit over them. 1995-05-18 22:25:37 +00:00
phk
ff15745bd7 Fixed the calculation of the reserved space for bad144. Thanks Rod! 1995-05-15 19:03:08 +00:00
dg
ab5358efa7 Fixed typo. 1995-05-15 12:23:03 +00:00
phk
ad0a2407f5 Create_Chunk_DWIM will not allocate anything in the last cylinder of a
CHUNK_BAD144 slice.
Also mknod the 'c' partition for freebsd slices, so bad144(8) will have
something to work on.
1995-05-15 00:58:25 +00:00
ache
d015557a82 Parse ^? correctly now 1995-05-14 22:33:52 +00:00
ache
471b2e6d7b Parse ^? now, our termcap use it and some termcaps from other
systems use it too
1995-05-14 22:29:13 +00:00
ache
4730235f67 Fix error returning address of local array 1995-05-14 19:14:53 +00:00
ache
cf6b207e9d Fix FtpPasv to not return address of local variable, close PR 399
Submitted by: John Capo <jc@irbs.com>
1995-05-13 22:09:52 +00:00
phk
c9a80054da Added MakeDevDisk(struct disk*, char *path);
fixed bug in extended slice naming.
1995-05-12 18:50:00 +00:00
paul
8e1c58addb Forgot to add these. 1995-05-12 17:31:45 +00:00
paul
65e32573aa New libforms.
Bumped major number.

Ncurses backend still needs improving.
Other back-ends need to be written.
1995-05-12 17:20:06 +00:00
phk
2e780cd86f Get the CHUNK_COMPAT_BSD flag right. 1995-05-11 05:22:54 +00:00
phk
b06a2da118 Create_Chunk_DWIM() is here, though it doesn't quite do what the name implies. 1995-05-10 05:57:04 +00:00
ache
aef44373fe Bump major number instead of minor 1995-05-08 16:08:49 +00:00
phk
021b1e61da Recognize slice type #6 as dos
handle OnTrack Disk manager correctly.
1995-05-08 02:08:33 +00:00
phk
6228dff953 Add check for rootfs > cyl 1024. 1995-05-08 01:34:31 +00:00
phk
dd5b13ab4b I bet Jordan is tearing his hair out, trying to figure the previous patch
out... here is the real thing.
1995-05-08 01:26:47 +00:00
phk
7633746449 Fix bug. 1995-05-08 00:44:46 +00:00
jkh
044b192e69 Whoops! An extra paren somehow got in there. Fixed. 1995-05-07 01:28:16 +00:00
jkh
97b64700b1 Always zero new chunks - keeps things like the private structures from having
bogus data in them.
1995-05-07 01:25:22 +00:00
phk
3f92c42b37 General sanitation and cleanup. Killed the "reserved" type, it wasn't. 1995-05-06 03:28:32 +00:00
dufault
e667a82b93 Make it so that the command formats are the same for both -i and -o.
This means "t" has to stand for bit fields, since b is a valid hex number.
1995-05-05 20:40:03 +00:00
phk
2ef08387ec If in Create_Chunk we (type==freebsd && (flags&CHUNK_ALIGN)), then we will
align this chunk properly.  Have at it Jordan...
1995-05-05 07:07:45 +00:00
phk
a0086bd087 Make the partitions names even more sensible
CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags.
1995-05-04 07:00:57 +00:00
phk
3a333cad85 Add the private void *pointer to the chunks, and the functions to manage it.
Make the reassignment of partition names less bogus.
1995-05-03 22:36:52 +00:00
ache
455d2a327b Bump minor number 1995-05-03 22:14:01 +00:00
ache
e945945e13 Bump minor number 1995-05-03 18:54:09 +00:00
wpaul
595e0167eb Cosmetic changes and paranoia checks:
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.
1995-05-03 18:33:10 +00:00
jkh
3864ecd382 Export the chunk names properly. 1995-05-03 17:38:00 +00:00