Commit Graph

53 Commits

Author SHA1 Message Date
Peter Wemm 5cc7d6a524 Deal with /usr/lib/compat/aout, and that we've been installing things
in the wrong places for a while.
Also, the the libtermlib.so -> libtermcap.so manually for elf, otherwise
the hard link follows the symlink and the result looks rather wierd.  The
*.a files are still hard linked under elf as before.
1998-10-11 04:39:56 +00:00
Warner Losh 2e9e5d3b4c Define PBUFSIZ in terms of MAXPATHLEN rather than hard coding it to
512.

Obtained, I think, from: OpenBSD
1998-09-11 05:44:41 +00:00
John Birrell 839de40e6e BINFORMAT -> OBJFORMAT ready for E-day. 1998-08-30 02:52:04 +00:00
Peter Wemm 21cd354328 Understand elf library naming rules for libtermlib alias.
Don't do the libtermcap un-bump hack for anything but a.out
1998-06-12 15:57:59 +00:00
John Birrell ffa54cc6bb The __set_ospeed() function is coded against the speed_t type declared
in termios.h, but it's prototype in termcap.h and the main file use
the underlying definition (which is now an int, not a long for
compatibility with NetBSD). Really termcap.h should use speed_t too,
but I guess that this might break sources that don't include termios.h
first.
1998-05-05 21:54:26 +00:00
Bruce Evans 16a4564707 Fixed bitrot in synopsis. 1998-03-23 13:23:22 +00:00
Bruce Evans df5cf212e6 Changed speed_t from long to unsigned long. POSIX.1 requires an
unsigned integral type.  Changing it doesn't seem to cause any
sign extension bugs in /usr/src.  In the kernel, this is partly
because `struct speedtab' and its lookup function are too bogus
to use speed_t's for speeds - they use ints.

Reminded by:	PR 5786
1998-03-12 14:09:55 +00:00
Bruce Evans df4c52a9df Fixed the termcap 3.0 hacks. They were very broken in my configuration
where shared libraries are in /lib and almost everything is linked
shared.  First, they removed the old shared library before installing
the new one.  Second, they attemped a cross-device link from /lib
to /usr/lib/compat.
1997-12-19 22:11:29 +00:00
Peter Wemm 027e5abe40 "un-bump" the major number for libtermcap.so. This brings -current back
to the same version numbers as 2.2.x.
The problem with the way things were was:
 - if you took a 2.2.x binary, it either wouldn't run on -current or
   if you had the old -current version of libtermcap.so.2.1 then it could
   potentially be a security problem.
 - the alternative is to start a compat22 tree dist for -current with a
   uuencoded binary.  This makefile hack is less cost.
libtermcap.so.3.0 is provided via /usr/lib/compat to avoid transition
problems.
1997-12-02 11:56:36 +00:00
Peter Wemm a987686543 s/geteid/geteuid/ - it's lucky I have a large supply of left-over pointy
hats from Tristan's last birthday party. :-]
1997-11-29 11:39:31 +00:00
Peter Wemm cf8e055700 Work around the problems caused by calling issetugid() in libtermcap in
a similar way to libc. Sigh.  This is not pretty but seems to work.
Somthing like this was needed in preference to bogusly bumping the major
library number here.

The syscall(SYS_issetugid) idea is originally Bruce's.
1997-11-29 11:30:57 +00:00
Andrey A. Chernov 0d589df709 Restore back issetugid() usage and bump major number 1997-08-31 08:37:28 +00:00
Andrey A. Chernov a139916b88 Temp restore of rev 1.9 1997-08-26 12:47:09 +00:00
Andrey A. Chernov a05c4d30fd Temporarily comment out issetugid() call until everyone installs libtermcap,
major number bumping will follows then
1997-08-25 16:42:22 +00:00
Andrey A. Chernov 32a7305976 Bump minor number due to issetugid() 1997-08-24 19:19:08 +00:00
Andrey A. Chernov 7b759a7f68 Replace uids comparison by issetugid() call 1997-08-22 11:14:53 +00:00
Bruce Evans 4b1753527e Fixed spelling of __set_ospeed (was _set_ospeed) and improved
nearby English.
1997-04-13 12:16:59 +00:00
Bruce Evans 4a127b0ff9 Declare the documented (modulo a spelling error) interface
`void __set_ospeed(long);' in the appropriate header.

The implementation still uses speed_t instead of long.  This
will break properly when speed_t is fixed (speed_t shall be
unsigned ...).
1997-04-13 11:41:59 +00:00
Warner Losh 6e42740802 Don't overflow buffers, and only open alternative termcap files if we're
not running setuid or setgid.

Fixes PR 2586

Submitted by:	Julian Assange
1997-03-24 06:41:30 +00:00
Bruce Evans f0821c98f2 Fixed wrong return type for tputs() in synopsis. 1997-03-19 01:57:06 +00:00
Eivind Eklund 43ec585267 Re-order terms to avoid potential pointer overflow, and remove one
more potential buffer overflow.

Submitted by:	bde
1997-03-18 16:09:27 +00:00
Eivind Eklund 92d1e8a27b Buffer overflow fix - closes PR bin/2983 for -current. Should really
go into 2.2.0 Release, even at the present time.  Problem spotted by
Tero Kivinen <kivinen@ssh.fi> - was in BugTraq today :-(
1997-03-17 09:30:19 +00:00
Peter Wemm 7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Peter Wemm 2fdc74a617 Change the last -Wall cleanup so that the tputs declaration doesn't
conflict with the other declarations in other files.  tputs() is
traditionally declared to return int, not void.  curses.h has it as int.
ncurses has int and actually sets the return value.  This problem has
been causing the ircII port to not compile.

(I've only minimally tested this, I do not have libtermcap on my systems)
1996-09-10 12:42:10 +00:00
Peter Wemm 7cf4460f12 oops, install termcap.h from ${.CURDIR}, not the obj dir.
Pointed out by: asami
1996-08-30 16:38:45 +00:00
Peter Wemm 345be915f7 cmp -s || install -c ==> install -C 1996-08-30 02:12:07 +00:00
Jordan K. Hubbard 51295a4d3e General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
Mike Pritchard bcff8e2ae4 Another round of man page cleanups.
Down to only about 100 items left to cleanup! :-)
1996-02-12 04:57:03 +00:00
Bruce Evans 48cfb668fc Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.

Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.
1995-08-06 12:24:38 +00:00
Andrey A. Chernov 021e5b9d1f Do a little trick which covers 99% cases: initialize ospeed
variable directly in tgetent by stderr or stdout output speed.
It helps hide in non-standard __set_ospeed function and remove it
from other sources (coming soon).
Do prototype cleanup too.
1995-08-05 21:22:07 +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
Andrey A. Chernov d4cd186f62 Add missing entries for 38400/57600/115200 bauds to tmspc10[] 1995-07-23 02:25:18 +00:00
Rodney W. Grimes 6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Andrey A. Chernov f3084e4019 Bump minor number 1995-05-03 22:14:01 +00:00
Andrey A. Chernov bc4908f401 Continue of previous fix: eliminate backslashes too. 1995-03-26 00:47:02 +00:00
Andrey A. Chernov 9da94f20f7 Compact entry returned to user:
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.
1995-03-26 00:35:36 +00:00
Andrey A. Chernov 6d1385d8be tputs: (char) -> (int) 1994-12-10 22:01:25 +00:00
Andrey A. Chernov f13e0e1455 Fix tputs declaration 1994-12-09 21:59:06 +00:00
Andrey A. Chernov f38f7e1a33 Describe tparm 1994-12-04 03:15:30 +00:00
Andrey A. Chernov d6761eb4f8 Add $Id$ 1994-12-04 02:49:24 +00:00
Andrey A. Chernov fc98213f95 Add termcap.h & tparm 1994-12-04 02:41:41 +00:00
Andreas Schulz d85050deb1 Ooops, change back the LIBDIR macro to the SHLIBDIR macro for the shared
libs as told by Bruce. Now it works.
1994-11-19 14:01:58 +00:00
Andreas Schulz 1e0b142e29 Makefile:
Change the reference for the libtermcap libtermlib link from SHLIBDIR
to LIBDIR. SHLIBDIR is undefined in the standard case.
termcap.c:
Initialize a local variable to zero. Otherwise an erroneous free call
can happen and clobber the calling program.
Seen with vi and gdb. If you have TERMCAP set with a terminal entry and
set TERM with something like huhu, vi and gdb core dumps.
1994-11-18 12:38:43 +00:00
Poul-Henning Kamp cb19812e97 Remove ${DESTDIR} from link-macros. Already applied behind the scenes. 1994-11-18 00:59:33 +00:00
Bruce Evans ff8189b3f8 Install shared libraries in ${SHLIBDIR} instead of in ${LIBDIR}.
Add missing ${DESTDIR}'s.
1994-11-14 06:45:23 +00:00
Andrey A. Chernov f2628bf835 Forget to change = to += in previous commit 1994-11-08 17:33:22 +00:00
Andrey A. Chernov 5327f96c2e Add missing link for shared libtermlib 1994-11-08 17:31:52 +00:00
Andrey A. Chernov 81ea763d01 Oops, back out ospeed fix, I forget that flushing can occurse _after_
usleep, too quick commit :-(
1994-10-06 21:02:21 +00:00
Andrey A. Chernov 82360d78e6 Change padding mechanism to use usleep, old variant not works
on terminals with no pad char (cons25) and quote from tputs.c says so too:
! 	 * Too bad there are no user program accessible programmed delays.
! 	 * Transmitting pad characters slows many
! 	 * terminals down and also loads the system.
1994-10-06 20:32:08 +00:00