Commit Graph

638 Commits

Author SHA1 Message Date
Garrett Wollman
35482326b2 The European Commission went out and invented a new sort of summer-time
changeover, so we have to extend the format of timezone files (in a backward-
compatible way, of course).  This probably means that libc needs a minor
version number bump before 2.2 is released (or maybe not).
1995-08-05 20:28:08 +00:00
Garrett Wollman
21271a8c7a Don't depend on bogusly-installed <tzfile.h>. 1995-08-05 20:25:24 +00:00
Andrey A. Chernov
6240d16c20 Fix cut&paste error: LC_COLLATE should be LC_TIME 1995-08-05 17:32:06 +00:00
Andrey A. Chernov
e20b74fb9e Add time locale loading 1995-08-05 17:31:17 +00:00
Bruce Evans
f57698ff43 Move rtprio.2 from usr.sbin/rtprio to lib/libc/sys, overwriting the bogus
version in the latter directory.

Reviewed by:	davidg
1995-08-05 07:31:19 +00:00
Andrey A. Chernov
7800dc3823 Fix sh coredump in vi mode with empty colon command 1995-08-04 19:42:23 +00:00
Garrett Wollman
c28fbb7baa Implement locale-sensitive strftime () from ADO (heavily modified
by me).  This probably loses for multibyte characters, but I have no
way of telling.  I'll let ache decide whether to add this support to
startup_setlocale.  Note that for this to make any sense at all, the
symlinks in /usr/share/locale must go.  (For the moment, this doesn't
make any difference since there are no locales supplied.)

Obtained from:	Arthur David Olson <ado@elsie.nci.nih.gov>
1995-08-04 18:43:01 +00:00
Andrey A. Chernov
79ad0d4c63 Allow any speeds in baudrate 1995-08-04 11:06:00 +00:00
Andrey A. Chernov
d8af1fd8ae Add SA_RESTART to ^Z reaction, EIO was returned in other case 1995-08-04 11:05:29 +00:00
Andrey A. Chernov
bd13cecc22 Simplify baud printing code 1995-08-04 10:30:34 +00:00
Andrey A. Chernov
e390f0a585 Nuke local termcap.h and use system one 1995-08-04 09:26:10 +00:00
Jordan K. Hubbard
083cb36a3f Remove libftp from Makefile 1995-08-04 07:27:24 +00:00
Andrey A. Chernov
23b227cadc Eliminate ospeed switch with new _set_ospeed 1995-08-04 06:50:12 +00:00
Andrey A. Chernov
2f0c493d09 Add non-standard function: _set_ospeed(speed)
Basically all termios+termcap pgms needs it.
It set ospeed variable using nearest-matched stty speeds,
which helps termcap pgms works with non-fixed termios speeds
and not duplicate ospeed switch into every pgm.
Also it isn't standard function, its source code is too big to include it
in whole to every termcap+termios pgm.
1995-08-04 06:39:55 +00:00
Bill Paul
19f61b3433 Reviewed by: David Greenman
Back out the 'help NIS rebind faster' hack. This change used a
connect()/send() pair rather than the original sendto() to allow
RPC to pass ICMP host unreachable and similar errors up to RPC
programs that use UDP. This is not a terrible thing by itself, but it can
cause trouble in environments with multi-homed hosts: if the portmapper
on the multi-homed machine sends a reply with a source address
that's different than the one associated with the connection by
connect(), the kernel will send a port unreachable message and
drop the reply. For the sake of compatibility with everybody else
on the planet, it's best to revert to the old behavior.

*long, heavy sigh*
1995-08-02 09:14:23 +00:00
Andrey A. Chernov
765d5b0d6f Make strtod conforms manpage, use isspace to skip initial whitespaces
instead of hardcoded whitespaces
1995-08-01 22:20:16 +00:00
Andrey A. Chernov
e7241b8ffe Similar changes like in strtol, all this family is VERY broken
in 8bit environment (isalpha at the end of digits)
1995-08-01 22:04:57 +00:00
Andrey A. Chernov
2bdca0d9f0 strtol and atoi VERY broken in 8bit chars locale, i.e. if you pass something
like 38400<any 8bit char, isalpha> it not detect this stuff and
produce very big number instead. Fixed by operating with unsigned char
and checking for isascii. (secure/telnetd hits by it f.e.)
1995-08-01 21:38:00 +00:00
Mike Pritchard
a9680d7112 Null terminate all strings returned by the dummy uname() routine,
and make sure that the version string is somewhat sane.  This
closes out PR#462.

Reviewed by: Bruce Evans
1995-07-31 10:10:02 +00:00
Joerg Wunsch
fb2deeabfb bkr() returns an int, and not a pointer. Document this.
Closes PR #pending/630.

Pointed out by: phk

Obtained from:
1995-07-23 07:01:05 +00:00
Andrey A. Chernov
d4cd186f62 Add missing entries for 38400/57600/115200 bauds to tmspc10[] 1995-07-23 02:25:18 +00:00
Bruce Evans
8e3d84bb83 Confirmed to work by: rcarter@geli.com (Russell Carter)
Enable xdr_float.c.  I believe it works on i386's although it isn't
portable enough to be in a machine-independent directory.
1995-07-22 23:32:13 +00:00
Peter Wemm
acc7e87c9b Slight adjustment to previous fix for __ivaliduser(). It was checking for
the comment before checking for long lines, so there was a possibility
that the wrap-around might be used as an exploitable hostname.
Reviewed by:
Submitted by:
Obtained from:
1995-07-16 17:03:58 +00:00
Joerg Wunsch
8f26c8ef60 Make ruserok() accept the #-starting comment lines we used to have
in our default /etc/hosts.equiv.

Closes PR #conf/620: Default /etc/hosts.equiv...
1995-07-16 10:12:32 +00:00
Bruce Evans
4baa77295e The declaration of sigaction was missing a `const'. 1995-07-16 09:44:58 +00:00
Bruce Evans
52a69cb00b Fix the synopsis of signal() again. Now it is uglier but correct.
(Declarations of signal that don't use typedefs can't be formatted
in the standard man page form.)
1995-07-16 09:41:03 +00:00
Poul-Henning Kamp
05f65b296e Change this to do what it should have done from the start.
Add argument for buffer for output.
Fix manuals.
1995-07-12 09:13:49 +00:00
Joerg Wunsch
2c413cbe50 Fix the prototypes for getservby{name,port}().
Closes PR #docs/568: minor manpage bug

Submitted by:	Michael Smith (email address no longer valid)
1995-07-09 08:17:01 +00:00
Bill Paul
bc8e373c9b The ypprot_err() function incorrectly maps YP_NODOM to YPERR_NODOM.
Strange as it sounds, it should map to YPERR_DOMAIN instead.

The YP_NODOM protocol error code is generally returned by ypserv when you
ask it for data from a domain that it doesn't support. By contrast,
the YPERR_NODOM error code means 'local domain name not set.'
Consequently, this incorrect mapping leads to yperr_string() generating
a very confusing error message. YPERR_DOMAIN says 'couldn't
bind to a server which serves this domain' which is much closer
to the truth.
1995-07-05 06:04:20 +00:00
Garrett Wollman
4fa53f8ca6 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
Doug Rabson
82aaeb09ad 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
Bill Paul
6c0828a6c6 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
Bill Paul
e0ee807b3d 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
Bruce Evans
d6c492bb18 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 Wunsch
d0be0c2b72 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
Bill Paul
dbf973c0c7 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
Andrey A. Chernov
11d290bdaf Fix handling NULL-encapsulated interfaces (lo & tun)
Reviewed by: wollman
Submitted by: dvv@sprint.net
1995-06-22 16:56:00 +00:00
Jeffrey Hsu
e78bad2371 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
Bill Paul
85e8f5bee2 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
Andrey A. Chernov
0b2c143cff Add /usr/local/share/nls to default search path 1995-06-17 03:02:21 +00:00
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
e5370bd7fe Remove trailing whitespace. 1995-05-30 08:29:07 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Nate Williams
43e6a2a89d Add a missing link from the setpgid manpage to the setpgrp manpage. 1995-05-27 04:17:04 +00:00
Poul-Henning Kamp
6331da9711 Remove Ontrack special from All_FreeBSD().
Add chunk->disk pointer.
1995-05-25 06:14:49 +00:00
Jordan K. Hubbard
2f2a4e7a4a Align slices to cylinder boundries.
Submitted By: phk
1995-05-24 08:59:40 +00:00
Poul-Henning Kamp
c5cc77ec44 Fix a typo, now there should always be an active slice. 1995-05-21 07:47:24 +00:00
Poul-Henning Kamp
13da1b0612 Do not allocate the first track. 1995-05-20 19:11:44 +00:00
Poul-Henning Kamp
739618d119 Remove two printfs before Jordan has a fit over them. 1995-05-18 22:25:37 +00:00
Poul-Henning Kamp
86577745c3 Fixed the calculation of the reserved space for bad144. Thanks Rod! 1995-05-15 19:03:08 +00:00
David Greenman
dbe38b75e5 Fixed typo. 1995-05-15 12:23:03 +00:00
Poul-Henning Kamp
ff88273903 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
Andrey A. Chernov
d9f3f4f9bb Parse ^? correctly now 1995-05-14 22:33:52 +00:00
Andrey A. Chernov
4f5129899a Parse ^? now, our termcap use it and some termcaps from other
systems use it too
1995-05-14 22:29:13 +00:00
Andrey A. Chernov
e7d6343ec1 Fix error returning address of local array 1995-05-14 19:14:53 +00:00
Andrey A. Chernov
c4de35376b 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
Poul-Henning Kamp
7b92fbb848 Added MakeDevDisk(struct disk*, char *path);
fixed bug in extended slice naming.
1995-05-12 18:50:00 +00:00
Paul Richards
e5e0d60df8 Forgot to add these. 1995-05-12 17:31:45 +00:00
Paul Richards
89e255f52c 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
Poul-Henning Kamp
8f9c995787 Get the CHUNK_COMPAT_BSD flag right. 1995-05-11 05:22:54 +00:00
Poul-Henning Kamp
59618a8666 Create_Chunk_DWIM() is here, though it doesn't quite do what the name implies. 1995-05-10 05:57:04 +00:00
Andrey A. Chernov
11d07acbab Bump major number instead of minor 1995-05-08 16:08:49 +00:00
Poul-Henning Kamp
d81adf1ebe Recognize slice type #6 as dos
handle OnTrack Disk manager correctly.
1995-05-08 02:08:33 +00:00
Poul-Henning Kamp
fccc689116 Add check for rootfs > cyl 1024. 1995-05-08 01:34:31 +00:00
Poul-Henning Kamp
c0b8ca15f5 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
Poul-Henning Kamp
f768aaceb4 Fix bug. 1995-05-08 00:44:46 +00:00
Jordan K. Hubbard
5ff77a9985 Whoops! An extra paren somehow got in there. Fixed. 1995-05-07 01:28:16 +00:00
Jordan K. Hubbard
3906ebee12 Always zero new chunks - keeps things like the private structures from having
bogus data in them.
1995-05-07 01:25:22 +00:00
Poul-Henning Kamp
b83d7daff4 General sanitation and cleanup. Killed the "reserved" type, it wasn't. 1995-05-06 03:28:32 +00:00
Peter Dufault
5134dcebcc 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
Poul-Henning Kamp
0be90238f6 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
Poul-Henning Kamp
e9851d87a8 Make the partitions names even more sensible
CheckRules sets the CHUNK_ALIGN & CHUNK_PAST_1024 flags.
1995-05-04 07:00:57 +00:00
Poul-Henning Kamp
afb3a9c529 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
Andrey A. Chernov
f3084e4019 Bump minor number 1995-05-03 22:14:01 +00:00
Andrey A. Chernov
fbe3680005 Bump minor number 1995-05-03 18:54:09 +00:00
Bill Paul
62967ca2b2 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
Jordan K. Hubbard
a7a5bb1246 Export the chunk names properly. 1995-05-03 17:38:00 +00:00
Poul-Henning Kamp
fcdd2c3c7d Make the target for tst01 more sensible.
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.
1995-05-03 06:30:59 +00:00
Jordan K. Hubbard
d81fc24bca foo -> unknown 1995-05-02 20:16:16 +00:00
Jordan K. Hubbard
1d56870d74 I need Open_Disk() to not spew on my screen. #ifdef out some diagnostic
printfs.
1995-05-02 19:52:27 +00:00
Andrey A. Chernov
ff17906bc9 Fix bracket error for LogMask
Submitted by: Ruslan Belkin <rus@home2.UA.net>
1995-05-02 17:46:30 +00:00
Jordan K. Hubbard
ec27acc8cb foo -> unknown.
I have to be able to show this stuff to the user. :-)
1995-05-01 21:30:24 +00:00
Joerg Wunsch
85c30cfa12 Added function and man page for ftok(3), used in conjunction with
the so-called "System V IPC".

Submitted by:	jbeukema@HK.Super.Net (John Beukema)
Obtained from:  Th. Lockert <tholo@sigmasoft.com>, via NetBSD
1995-05-01 08:53:21 +00:00
Jordan K. Hubbard
81b15f5715 Stick a more BSD-like Makefile here so that I can link to the library. 1995-05-01 08:08:02 +00:00
Poul-Henning Kamp
20c9844ca0 start CHS is 0xff,0xff,0xff if past 1024.
end CHS is 1023,bios_hd,bios_sect if past 1024.  This way we can find
bios the geometry again.
Added a primitive "scan" to tst01.
1995-05-01 04:05:27 +00:00
Poul-Henning Kamp
87d4886cc3 Use the DIOCSYNCSLICE ioctl now. (use only with kernel from this morning).
Get the CHS's right.
Get the disklabels (more) right.
1995-04-30 22:51:05 +00:00
Poul-Henning Kamp
9781a14091 get bootblocks right.
Add mbr and bteasy17 to tst01
read partitions from kernel instead of disk.
Still problems with writing labels, discussing with Bruce.
Extended slices doesn't get written yet.
1995-04-30 11:04:16 +00:00
Poul-Henning Kamp
e6b172ee57 Use 0xff for CHS when past 1024 cyls.
Fix (hopefully) a bug Gary found.
1995-04-30 07:30:45 +00:00
Poul-Henning Kamp
98fc07cacb Make the default case less scary :-) 1995-04-30 06:19:32 +00:00
Poul-Henning Kamp
2d5caf92d0 Now we do writes too. 1995-04-30 06:09:29 +00:00
Bill Paul
04adcdacbf Small fix for the following problems:
- 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.)
1995-04-29 17:14:50 +00:00
Poul-Henning Kamp
a29b6fccc0 Names are assigned when chunks are created.
Rules for only one fat & one extended in MBR.
1995-04-29 07:21:14 +00:00
Poul-Henning Kamp
a907b94117 Even More stuff. Disk_Names() is here amongst other things. 1995-04-29 04:50:39 +00:00
Poul-Henning Kamp
f9c10dfd1a Next Iteration, getting better.
Made an All_FreeBSD() function.
Added a cmd-line interface (lowest rank) to the tst01 program.
The tst01 program is harmless (worst it can do is coredump), but it
is instructive to run, you can see what the slice-code things of your
disk...
1995-04-29 04:00:57 +00:00
Poul-Henning Kamp
27bff5727d Sanitize and explain a little bit... Implement the first rules... 1995-04-29 01:55:25 +00:00
Poul-Henning Kamp
aded89c1b1 This is a revision 0.00 of the backend stuff for the fdisk/disklabel stuff
in the new sysinstall.  If you want to give a helping hand, then send email
to phk@FreeBSD.ORG.  DO NOT COMMIT TO THIS DIRECTORY!
1995-04-28 23:57:04 +00:00
Peter Dufault
c46c1a53eb Fix a few problems with the debugging output. Add a new "visit" function. 1995-04-28 19:23:51 +00:00
Garrett Wollman
003d29986d No sense in copying the hex[] array in each call to MDXEnd(), it's a
constant.  (There probably ought to be a single libc version of it.)
1995-04-27 16:05:51 +00:00