Commit Graph

451 Commits

Author SHA1 Message Date
Nate Williams
39f2a9e2db - In dlsym(), if the lookup fails using the original symbol, prepend an
underscore and try looking it up again.  This is a non-issue if we
  switch to ELF.

Reviewed by:	sef, jdp
1997-08-19 23:33:45 +00:00
Steve Price
f000d0afab .Nm --> .Xr so that gettytab(5) is shown instead of gettytab 5.
PR:		bin/4079
1997-08-17 16:36:41 +00:00
Bruce Evans
0e52df1255 Makefile.dist is a non-bmaked version of Makefile. We don't want it. 1997-08-02 18:52:16 +00:00
Bruce Evans
75d986c2a6 This commit was generated by cvs2svn to compensate for changes in r27847,
which included commits to RCS files with non-trunk default branches.
1997-08-02 18:46:42 +00:00
Bruce Evans
9c60775004 Import Lite2's src/libexec, except for makekey (which was spammed
by a repository copy from 1.1.5 and patched back to Lite1) and
rbootd/bootdir/SYSHPBSD (which is binary).  All changed files have
already left the vendor branch.
1997-08-02 18:46:42 +00:00
John Polstra
7e7344e2f4 Implement dlsym(RTLD_NEXT, symbol). 1997-08-02 04:56:44 +00:00
David Nugent
0512556a48 Make useage of hostname global variable consistent.
PR: 4135
Based on submitted patch by:	 blank@fox.uni-trier.de
1997-07-24 09:26:12 +00:00
Wolfram Schneider
506a9d513c Rshd print to much information if a user does not exists. 1997-07-18 21:04:19 +00:00
Peter Wemm
65b3003d2d kill the undead 1997-07-13 14:26:00 +00:00
Peter Wemm
593718bea0 .if exists(../eBones) tests the obj dir, not the source dir's existance.
The existance of a stale obj dir does not imply the source too.
1997-07-05 14:22:15 +00:00
Steve Price
11fe7d5e79 Zap register keyword usage and convert: bcopy -> memmove, bzero -> memset,
index -> strchr, and rindex -> strrchr.
1997-06-29 19:50:26 +00:00
Steve Price
5c8709fd6d Merge conflicts and make this compile -Wall clean. 1997-06-29 19:00:29 +00:00
Steve Price
6bc912a9a4 This commit was generated by cvs2svn to compensate for changes in r27074,
which included commits to RCS files with non-trunk default branches.
1997-06-29 18:50:34 +00:00
Steve Price
0559b33149 Import of NetBSD's rbootd version 19970629 1997-06-29 18:50:34 +00:00
Alexander Langer
b84136c8f6 Removed unused variables. 1997-06-27 21:51:59 +00:00
Gene Stark
8b9715c239 Submitted by: Gene Stark and Robert Sexton (robert@kudra.com)
Added patches from Robert Sexton to eliminate case sensitivity of the
xtend command.
1997-06-24 03:52:15 +00:00
Steve Price
681e5e7a09 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
David Nugent
85f5c8500d Reset alarm before invoking ppplogin.
PR: 3733
Reviewed by:
Submitted by: kfurge@worldnet.att.net
Obtained from:
1997-06-03 12:56:47 +00:00
David Nugent
6bdca427d7 login.group => login.conf.
PR: 3748
Reviewed by:
Submitted by:
Obtained from:
1997-06-02 21:03:20 +00:00
Masafumi Max NAKANE
d5fb0dffb4 Typo fix.
PR:		3693
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-05-27 13:46:40 +00:00
Daniel O'Callaghan
3401a71f4e Tell the chroot()ed user that "access restrictions apply". 1997-05-21 23:24:41 +00:00
Bill Paul
48d26cf410 Small tweak to the group parsing code to stop it from core dumping
on malformed /etc/group entries. This is a band-aid until I can pull
in the newer group parsing code from getgrent .

Pointed out by: branson@belmakor.hq.ferg.com (Branson Matheson)
1997-05-21 15:10:42 +00:00
Doug Rabson
3c0a9567e5 Changes to support the kernel linker:
Add a -Bforcedynamic option which generates a dynamic object even
	if no shared libraries were given in the link.

	Make RRS in text section warnings conditional on "-assert pure-text"
	so that I can link non-PIC kernel modules without tons of link
	errors.  Changes to bsd.lib.mk to follow.

	Fix a couple of bugs exposed by the fact that the kernel is not
	linked at zero.

Reviewed by:	jdp
1997-05-13 10:23:47 +00:00
Poul-Henning Kamp
798c69cd78 Don't rely on stderr to report bad news. 1997-05-11 14:27:03 +00:00
David Nugent
04a59e678a Fix memory leak caused by not freeing memory returned by cgetstr()
calls. The cost is a little more up-front memory allocation, but the
effect seems minimal.

Problem noticed-by: bde

Added syslog at LOG_ERR when referencing an unknown gettytab entry
and for other cgetent() failues (circular reference et al).

To be merged into 2.2 after a few days testing.
1997-05-11 10:25:38 +00:00
David Nugent
5d0bfe39ec login_getclass() -> login_getpwclass(). 1997-05-10 19:02:03 +00:00
John Polstra
aafb797228 Fix a bug that caused the relocs for linker set members in shared
libraries to come out as 1-byte relocations instead of 4-byte
relocations.

Submitted by:	Doug Rabson <dfr@nlsystems.com>
1997-04-30 05:18:08 +00:00
David Nugent
ea4e54b942 Adds anon ftp virtual host capability to ftpd, using /etc/ftphosts for
definition of a system's virtual hosts.
1997-04-29 12:42:08 +00:00
David Nugent
31fea7b8f2 YAMF2.2: Allow @group entries in /etc/ftpusers & /etc/ftpchroot to deny
and allow chroot access to entire groups.
1997-04-27 08:29:21 +00:00
David Nugent
334ab9fdd0 Document internal ls, how to compile it in and what it changes wrt
anon ftp and chrooted users.
1997-04-26 12:23:51 +00:00
David Nugent
af85d782fd Adds optional "internal ls" support for ftpd, by collecting
modules from src/bin/ls, and handling exec(_PATH_LS,..) as a
special case, very useful in an environment where many users
are given chroot access. "~/etc/{s}pwd.db" files are still
needed if uid/gid->user/group translation is desired.

To enable this it must be compiled with the make variable
FTP_INTERNAL_LS defined, either in /etc/make.conf or the
environment.
1997-04-26 12:12:10 +00:00
David Nugent
b071c689de Add basic login.conf (sans authentication) support. 1997-04-23 04:56:39 +00:00
David Nugent
80b3b7342f Added login.conf support. 1997-04-23 03:06:47 +00:00
Bruce Evans
9453d60b10 Fixed `make depend' and related bogons. LDFLAGS was used for
ld-specific flags.  LDFLAGS is really for ld-related flags for cc,
not for ld, and some flags, e.g., -Bshareable, mean completely
different things to cc and ld.  Having the wrong things in LDFLAGS
also broke the standard ${PROG} target.  This was kludged around
by using a special rule that depended on LDFLAGS being bogus.
Fixing `make depend' broke the special rule but fixed the standard
rule (except in the DESTDIR case, which was handled more strictly
here than elsewhere).
1997-04-16 11:31:32 +00:00
David Nugent
d95f252dfe Remove text about unsupported flags 'mdmbuf', 'local', 'crtscts' etc
that are in reality handled in gettytab.

Document the new 'dialin' and 'network' tty flags.
1997-04-13 21:29:50 +00:00
David Nugent
c4c1e98233 Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
Fixes name size limitation (was hardcoded to 8).
Closes PR#3258
1997-04-12 01:04:50 +00:00
Mike Pritchard
eac60dd633 Ensure that the remote host name is Nul terminated.
Closes PR# 2589.
1997-04-08 20:36:36 +00:00
David Nugent
cbd13fcada Fix for expiration date test. Closes PR#3224. 1997-04-08 12:32:17 +00:00
Joerg Wunsch
758a95b7aa Use MAXHOSTNAMELEN, as opposed to an arbitrary number, and ensure
correct termination if it overflows.

Closes PR # misc/2982.

Submitted by:	Drew Derbyshire <ahd@kew.com>
1997-04-01 20:39:59 +00:00
Peter Wemm
f0ccf9018b Be a bit more careful about what port number we are using for the
second socket.  If we're going to check for reserved ports, we should
do it properly.
1997-03-29 12:35:06 +00:00
Warner Losh
91477cc4d7 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:48:21 +00:00
David Nugent
ce862ff5d3 Don't trucate username to 8 characters. 1997-03-25 09:52:38 +00:00
Mike Pritchard
42946c8261 Remove some incorrect text on how passwords are validated.
Closes PR# 3050.

Submitted by:	 Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1997-03-25 03:45:52 +00:00
Warner Losh
fca08b7cfa Fix non explloitable buffer overflows (since the largest packet processed
precludes it) to keep people from whining about it in the newsgroups and
mailing lists.
1997-03-24 06:04:08 +00:00
Warner Losh
0f5e6a0d00 Fix various buffer overflows that may or may not be exploitable.
Fixes PR 2588

Reviewed by:	Dan Cross?
Submitted by:	Julian Assange
1997-03-24 06:01:39 +00:00
Warner Losh
a51e2c9b04 Julian A's fix. Do chdir as user rather than as root. Fixes a minor NFS
compatibility problem at the same time.  Some buffer made large enough
for worst case hostname.

fixes PR 2593.

Reviewed by:	Dan Cross and maybe others
1997-03-24 05:57:28 +00:00
Mike Pritchard
b225fe2740 Change a reference to NetBSD to FreeBSD. 1997-03-14 06:09:04 +00:00
Peter Wemm
fce15c9ab3 Revert $FreeBSD$ to $Id$ 1997-02-22 15:48:31 +00:00
Peter Wemm
9e522f7a18 Revert $FreeBSD$ to $Id$ 1997-02-22 14:22:49 +00:00
Mike Pritchard
90ac6cd46a #include <string.h> to help silence -Wall. 1997-02-20 23:11:22 +00:00
Guido van Rooij
c65c314e66 Actually allow the -R flag. 1997-02-13 19:24:25 +00:00
David Nugent
26015440b9 Tidy-up modem-chat handling: ensure tty modes are restored to
'sane' standard (not raw) settings before abort/exiting; move
responsibility of setting raw mode for chat-handling out of
chat.c to avoid doing redundant tc{s,g}etattr()s; move DE
pause prior setting standard mode before issue/login prompt to
avoid echoing modem connect strings. Fixed up comment styles
in a couple of places.
1997-02-09 16:12:08 +00:00
Warner Losh
5b266377fd Buffer Overflow from OpenBSD
rev 1.7 deraadt:
	buf oflow
Obtained from: OpenBSD
1997-02-09 04:40:02 +00:00
Warner Losh
70dc969961 Some patches for source routed packets from OpenBSD.
Rev 1.16 deraadt:
	do not warn about valid options; invalid options correctly quit
Rev 1.15 deraadt:
	need not clear options since bad ones cause exit;
	provos@ws1.physnet.uni-hamburg.de
Rev 1.14 deraadt:
	IPOPT_LSRR/IPOPT_SSRR must exit() due to tcp sequencing; pointed
	out by provos@wserver.physnet.uni-hamburg.de. also another 1-char
	buffer overflow.

Reviewed by:    Peter Wemm
Obtained from:  OpenSBD
1997-02-09 04:18:43 +00:00
Warner Losh
2631d5a8d1 Some patches for source routed packets from OpenBSD.
Rev 1.13 deraadt:
	do not warn about valid options; invalid options correctly quit
Rev 1.12 deraadt:
	need not clear options since bad ones cause exit;
	provos@ws1.physnet.uni-hamburg.de
Rev 1.11 deraadt:
	IPOPT_LSRR/IPOPT_SSRR must exit() due to tcp sequencing; pointed
	out by provos@wserver.physnet.uni-hamburg.de. also another 1-char
	buffer overflow.

Reviewed by:	Peter Wemm
Obtained from:	OpenSBD
1997-02-09 04:16:27 +00:00
Jordan K. Hubbard
9a969423ea Fix a hop count datatype bogon pointed out in PR#2642 (though my fix
was slightly different than the one submitted).
Submitted by:	Elmar Bartel <bartel@informatik.tu-muenchen.de>
1997-02-07 20:03:49 +00:00
David Nugent
c2efe923b5 Increased username size to allow passing username:auth_method to
login.
1997-02-07 11:45:10 +00:00
David Nugent
635b1c4908 Make username size dependant on MAXLOGNAME in sys/param.h. Was
previously hard-coded at 16 characters (and possibly overflowing
the field when NUL terminating a username of exactly 16 characters
in length).
1997-02-02 14:43:32 +00:00
David Nugent
fe552114a3 Added:
ic=expect/send script    modem init script
    ac=expect/send script    modem answer script
    ct#val		     chat script timeout (seconds)
    rt#val		     recycle timeout (seconds) if 'ac' set
    dc#val		     debug bitmask for debugging chat scripts
    hw	(boolean)	     enable crtscts handshaking
    if=path		     'issue' file sent prior login prompt

chat.c is a simplistic expect/send chat module.
1997-02-02 14:24:57 +00:00
David Nugent
e91c4f7cc3 Fix bug in %s, %m, %r and %v macros not displaying data. 1997-02-02 07:38:26 +00:00
David Nugent
54472d02d2 Added support for %s (sysname) %m (machine) %r (release) and %v (version)
prompt macros to agree with getty(8).
1997-02-02 07:33:50 +00:00
David Greenman
ac7636cbfc Oops, fix white space in last commit. 1997-01-28 07:09:05 +00:00
David Greenman
0b4df2eec2 Fix signal handler race condition. 1997-01-28 07:06:54 +00:00
Joerg Wunsch
28f9fdc1ae Make even more copies of hostnames obtained by inet_ntoa(). iruserok()
could still clobber the static storage, yielding an error message with
a wrong hostname.
1997-01-27 15:38:46 +00:00
John Polstra
18be4a71df Use xmalloc instead of malloc in two places, so that out-of-memory
conditions will be detected.

Submitted by:	Philippe Charnier <charnier@xp11.frmug.org>
1997-01-24 00:07:03 +00:00
Paul Traina
dfe0d2158e Fix buffer overrun problem.
Cannidate for: 2.2	[must]

Obtained from: Lite/2 and BSDI's published patch
1997-01-18 08:30:01 +00:00
John Polstra
ac6c268b3d Pay attention to the environment variable "LD_IGNORE_MISSING_OBJECTS".
If it is set to a nonempty string, then simply skip any missing
shared libraries.  This came up in a discussion long ago as a
potentially useful feature at sysinstall time.  For example, an
X11 utility could be used without the X libraries being present,
provided the utility had a mode in which no X functions were actually
called.
1997-01-17 20:22:18 +00:00
Alexander Langer
8abdc2eb40 Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +00:00
John Polstra
20995a4fcc If a library is found in the hints file, but the library doesn't exist,
ignore the hint.

This is a straightforward fix, and it should go into 2.2 after a burn-in
period of a few days.

Noticed by:	bde
1997-01-14 17:53:55 +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
Wolfram Schneider
af20215665 Sort cross references. 1997-01-13 00:25:51 +00:00
John Polstra
d956f8a388 Use the RTLD_NOW symbol, now that it is defined in <dlfcn.h>. 1997-01-12 19:59:26 +00:00
John Polstra
aeea55e459 Correct typos and spelling errors. 1997-01-12 00:19:14 +00:00
John Polstra
0db65949ae Add support for the LD_BIND_NOW environment variable. If it is set to a
nonempty string, then function calls are relocated at program start-up
rather than lazily.  This variable is standard on Sun and SVR4 systems.

The dlopen() function now supports both lazy and immediate binding, as
determined by its "mode" argument, which can be either 1 (RTLD_LAZY) or
2 (RTLD_NOW).  I will add defines of these symbols to <dlfcn.h> as soon
as I've done a little more checking to make sure they won't cause
collisions or bootstrapping problems that would break "make world".

The "LD_*" environment variables which alter dynamic linker behavior are
now treated as unset if they are set to the empty string.  This agrees
with the standard SVR4 conventions for the dynamic linker.

Add a work-around for programs compiled with certain buggy versions of
crt0.o.  The buggy versions failed to set the "crt_ldso" member of the
interface structure.  This caused certain error messages from the
dynamic linker to begin with "(null)" instead of the pathname of the
dynamic linker.
1997-01-12 00:16:36 +00:00
John Polstra
d3c677c7e0 Add support for the LD_BIND_NOW environment variable. If it is set to a
nonempty string, then function calls are relocated at program start-up
rather than lazily.  This variable is standard on Sun and SVR4 systems.

The dlopen() function now supports both lazy and immediate binding, as
determined by its "mode" argument, which can be either 1 (RTLD_LAZY) or
2 (RTLD_NOW).  I will add defines of these symbols to <dlfcn.h> as soon
as I've done a little more checking to make sure they won't cause
collisions or bootstrapping problems that would break "make world".
1997-01-12 00:09:11 +00:00
Mike Pritchard
f3396fdc63 Document the fact that the administrator may have
to change syslog's config file in order for all of
ftpd's log messages to be displayed by syslogd.

Closes PR# 1559.
1997-01-11 20:17:05 +00:00
Andrey A. Chernov
b8b15e71f7 Build ebones/telnetd only if MAKE_EBONES defined 1997-01-08 11:46:23 +00:00
Mike Pritchard
0fd3140e80 Correct some misleading text.
Submitted by:	Klaus Klein <kleink@layla.inka.de>
Obtained from: NetBSD-bugs PR#3089
1997-01-08 07:12:47 +00:00
Paul Traina
a29e4eaa60 Some buffer overrun fixes and removed check for username starting with "-"
(replacied it with a getopt stopper (--) instead, which is more correct).

Obtained from: OpenBSD
1997-01-07 19:00:52 +00:00
Garrett Wollman
702a1d0148 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
David Nugent
4ae89ecddd Added group= facility to /etc/ttys for tty grouping for more
more manageable and convenient referencing by login.conf (login
class database) and (e.g.) login.access.

This is the first of a group of commits which implements the login
class capabilities database.
1997-01-02 08:05:43 +00:00
Jordan K. Hubbard
9189cfd1e6 Remove dmalloc.c reference from here too. :) 1997-01-01 11:03:27 +00:00
Mike Smith
b2a1dd44dc Add a new 'de' capability, specifying a number of seconds to sleep before
emitting the initial prompt.

This is useful in a number of circumstances :
 - you have (a) stupid modem(s) that assert(s) DCD too soon.
 - you have dialin users with stupid diallers and poorly
   written chatscripts. (esp. some Winsock diallers)

BSD/OS also has this capability.

Submitted by:	damian@cablenet.net (Damian Hamill)
1996-12-31 01:30:38 +00:00
Steven Wallace
43d7fd0390 Fix spelling error in manpage. 1996-12-26 21:51:09 +00:00
Bill Paul
a2e787bff1 Change declaration of yp_errno from int to enum ypstat so that it
matches what's in ypserv/yp_extern.h (which I changed when I added the
async DNS stuff). The conflict broke the build of rpc.yppasswdd.

Pointed out by: bde
1996-12-23 18:15:41 +00:00
Mike Pritchard
d3b133fb1c Document the -k, -v and -x options.
Closes PR# 801.
1996-12-16 00:01:28 +00:00
Mike Pritchard
487990280d Correct some xrefs/mlinks. 1996-12-14 23:27:20 +00:00
Bill Paul
79cc85d3ca Close PR #2193: support backslash line continuations.
(Also did some minor cleanups.)
1996-12-13 02:40:39 +00:00
Garrett Wollman
e831f30876 Convert this program to use sysctl rather than kvm for some of its
statistics.  Unfortunately, the coverage of sysctl isn't good enough to do
all of them :-( .
1996-12-11 19:11:52 +00:00
Garrett Wollman
628d2ac1b0 Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves.  (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!)  Also fix up some
other #include messes while we're at it.
1996-12-10 17:11:53 +00:00
Joerg Wunsch
84e1b7d26b Truncate the file when opening it with write intent. Otherwise,
there's a good chance that garbage will remain at the end.

Closes PR # bin/2112: tftpd doesn't truncate ...

Reviewed by:	fenner
1996-11-30 20:59:32 +00:00
Torsten Blum
5a392aec2b add flag to allow only anonymous ftp logins
Reviewed by:	pst
1996-11-30 12:00:25 +00:00
Andrey A. Chernov
e11ba3694e Use LC_TIME=C instead of LC_TIME= 1996-11-26 03:31:26 +00:00
Paul Traina
a13e275f66 Back out recent security patch for rexecd. After more careful analysis,
it is both uneeded and breaks certain lock-step timing in the rexec
protocol.

Yes, an attacker can "relay" connections using this trick,  but a properly
configured firewall that would make this sort of subterfuge necessary in the
first place (instead of direct packet spoofing) would also thwart useful
attacks based on this.
1996-11-22 08:59:07 +00:00
Paul Traina
dacc975297 Conditionalize setsockopt IP_PORTRANGE to make ftpd portable. 1996-11-20 22:13:51 +00:00
Paul Traina
312c86cfd9 Truncate argument list to avoid buffer overflows.
Cannidate for: 2.1 and 2.2
1996-11-20 22:12:50 +00:00
Paul Traina
6c6cc60e38 Do not attempt to open reverse channel until authentication phase has
succeeded.

Never allow the reverse channel to be to a privileged port.

Cannidate for:	2.1 and 2.2 branches

Reviewed by:	pst (with local cleanups)
Submitted by:	Cy Shubert <cy@cwsys.cwent.com>
Obtained from:	Jaeger <jaeger@dhp.com> via BUGTRAQ
1996-11-19 18:03:16 +00:00
Paul Traina
4c640c1689 remove newly added reference to ppplogin 1996-11-13 01:36:52 +00:00
Paul Traina
ee936a69e4 Add the >optional< ability to sense PPP link bringups and call an authentication program 1996-11-13 01:06:40 +00:00
Poul-Henning Kamp
9649260fa5 doc/1994: spelling error.
Submitted by:	David Leonard David Leonard <d@scry.dstc.edu.au>
1996-11-12 13:32:49 +00:00