Commit Graph

799 Commits

Author SHA1 Message Date
Andrey A. Chernov
46589cb624 Move TZ="" assignment just before exec to not touch other time stuff 1998-05-15 16:08:52 +00:00
Andrey A. Chernov
2903069462 Do TZ= as first thing, since FTP protocol is unable to tell zone offset in
any case.

It makes no difference for anon account (since chroot already makes it GMT),
but if you do mirror with special non-anon login, in old variant
your mirror will be wholy retransmitted twice in the year due to
time zone changes (/etc/localtime plays bad role here)
1998-05-15 15:06:58 +00:00
John Birrell
63e7e54aa4 NetBSD kernels don't support TCP_NOPUSH, so on alpha don't try setting
this socket option. This is temporary code while the alpha still uses
NetBSD socket code in the kernel.
1998-05-15 03:23:28 +00:00
John Birrell
ad12d72a41 Remove a bogus prototype for time() and let time.h do that.
Change pointer casts from int to long. The code that looks to index -1
of argv is still broken on alpha.
1998-05-14 10:07:29 +00:00
Bruce Evans
330698829e Fixed missing dependencies on headers generated by rpcgen, as usual.
Removed bogus dependencies of generated .c files on generated headers.
Sorted sources lists.
1998-05-10 16:01:36 +00:00
Robert Nordier
c898c25b02 Replace _exit() with exit()
Pointed out by: Nathan Torkington <gnat@prometheus.frii.com> PR 5585
1998-05-05 00:28:51 +00:00
Robert Nordier
871f7745a1 Fix typo.
Pointed out by: Junji SAKAI <sakai.jp.freebsd.org> PR 5621
1998-05-05 00:12:01 +00:00
Bruce Evans
ef87dd8703 Simplified by using new yacc rules and by not generating y.tab.h. 1998-05-04 18:20:18 +00:00
Peter Wemm
1a0082552a Argh, forgot to commit the update here for bind-8.. Sorry folks...
Prompted by:	John Hay <jhay@mikom.csir.co.za>
1998-05-04 05:12:49 +00:00
Steve Price
b1dd8a7b57 Clarify use of 'if' capability.
PR:		6499
Submitted by:	Doug Barton <Studded@san.rr.com>
1998-05-04 02:37:29 +00:00
Steve Price
f1f61bc603 Avoid stairstep effect on output of 'if=...' file.
PR:		part of 6492
Submitted by:	Chip Norkus via Doug White <studded@san.rr.com>
1998-05-03 16:29:06 +00:00
Doug Rabson
46066cf144 Add support for ldd. 1998-05-01 08:39:27 +00:00
Doug Rabson
2001f720ce Add GDB support. The method and some of the code came from NetBSD's elf
runtime linker.
1998-04-30 07:48:02 +00:00
David Greenman
dadb9fb334 Set TCP_NODELAY on the control channel to improve performance a bit. 1998-04-28 03:37:23 +00:00
David Greenman
b81d7e37bb Fixed a bug where if MAXUSRARGS amount of args were passed in, the argv[]
array would end up without the NULL pointer termination, causing the glob
code to glob whatever garbage happend to follow on the stack.
1998-04-27 10:51:26 +00:00
Poul-Henning Kamp
5708bd4228 telnetd does not recognize the if (display file before login) gettytab flag.
PR:		6365
Reviewed by:	phk
Submitted by:	Jason Garman <init@risen.org>
1998-04-26 06:51:36 +00:00
Gene Stark
c8e50f41fe PR: misc/4679
Submitted by:	Glen Foster (gfoster@gfoster.com)
Fix missing "/" in dump file pathname.
1998-04-18 13:37:24 +00:00
Poul-Henning Kamp
20ef883886 openlog() needs to have LOG_NDELAY added, or else the syslog() calls after
the chroot will not get sent to syslogd.

PR:		4910
Reviewed by:	phk
Submitted by:	Jim Mercer <jim@komodo.reptiles.org>
1998-04-12 11:15:54 +00:00
Philippe Charnier
99e2b73dd8 .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-19 07:37:43 +00:00
Philippe Charnier
c92c0f2628 .Sh AUTHOR -. .Sh AUTHORS. Use .An/.Aq. 1998-03-19 07:37:22 +00:00
John Polstra
59f198d1ff Enable rtld-elf when building an ELF system on the i386. 1998-03-07 19:43:48 +00:00
John Polstra
3124c3e093 Import the ELF dynamic linker. This is the ElfKit version with
quite a few enhancements and bug fixes.  There are still some known
deficiencies, but it should be adequate to get us started with ELF.

Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 19:24:35 +00:00
Daniel O'Callaghan
20d2e1ee59 PR: 5812
Pointed-in-the-right-driection-by: Mike Smith and Steve Price

Close syslogging before calling ls_main()
1998-02-25 07:10:57 +00:00
Eivind Eklund
f5c57d05c1 Make ftpd log IP-addresses in addition to hostnames. 1998-02-24 08:45:57 +00:00
David E. O'Brien
f97d7807ad MFS. 1998-02-18 10:53:16 +00:00
John Polstra
663690b388 Implement dladdr. 1998-02-06 16:46:46 +00:00
Philippe Charnier
81389de071 Convert to mdoc. Header -> Id. Typo. 1998-02-03 07:30:22 +00:00
Poul-Henning Kamp
55d6f63f1c Remove lfs_cleanerd 1998-01-30 12:36:10 +00:00
Poul-Henning Kamp
4f4a34fffa Disable lfs_cleanerd 1998-01-30 12:35:10 +00:00
Bruce Evans
81d50a41f6 Merged just enough files from Lite2 in lfs_cleanerd to convert from
MOUNT_LFS to "lfs" in one place.  The merge was painful because it
conflicted with cosmetic FreeBSD changes.  lfs_cleanerd still compiles
cleanly but has aproximately the same chance of working as before (0).
1998-01-20 14:41:53 +00:00
Bill Paul
e4a0e42ba8 Make these programs compile and work correctly now that /usr/include/rpcsvc
has been ANSI-fied.

Pointed out by: bde
1998-01-19 23:13:38 +00:00
Bruce Evans
cc03533c8d Removed most unused includes of <net/if_var.h> outside the kernel. 1998-01-16 17:38:56 +00:00
Philippe Charnier
4493ca0bce Add missing dot. 1998-01-07 07:56:15 +00:00
Philippe Charnier
fcccc2999a Remove unused #includes and make it compile again with -DDEBUG. Use syslog()
instead of errx() when being a daemon.
1998-01-07 07:54:18 +00:00
Philippe Charnier
859c540701 Remove unused #include. Display if inetd started us in case of failure. 1998-01-07 07:51:00 +00:00
Philippe Charnier
09c4476e4e Typos. 1998-01-07 07:44:01 +00:00
Masafumi Max NAKANE
b1d9db7283 Typo fix: bootgw -> bootpgw 1997-12-29 13:59:28 +00:00
Warner Losh
a82e63028f style(9) nits
Submitted by:	bde
1997-12-26 23:36:43 +00:00
Warner Losh
d83662583c sprintf->snprintf paranoia
Obtained from: OpenBSD (?)
1997-12-24 19:39:57 +00:00
Warner Losh
45b3189258 Be extra paranoid about the length of data returned from gethostbyaddr or
gethostbyname.
Submitted by:	Julian Assange
1997-12-24 19:38:18 +00:00
Warner Losh
d3a9dd61ac sprintf->snprintf paranoia. The one thing that looks like a hole in
the diff is in an ifdef that isn't enabled for FreeBSD.
Obtained from:	OpenBSD(?)
1997-12-24 19:21:09 +00:00
Warner Losh
e760ef2c35 Various sprintf -> snprintf fixes.
Minor style fix (strcpy(foo,"") -> *foo = '\0')
Obtained from:	OpenBSD(?)
1997-12-24 19:13:23 +00:00
Warner Losh
9bc34f7ce1 Use snprintf rather than printf out of paranoia
Obtained from:	OpenBSD
1997-12-24 18:56:03 +00:00
Philippe Charnier
5802420635 Typo. 1997-12-18 07:39:27 +00:00
Philippe Charnier
20e9e8236d Cosmetic in usage string. 1997-12-15 07:19:41 +00:00
Philippe Charnier
27eed7e3b4 Use full path in synopsis. Sort #includes. Use .Tn for NIS. 1997-12-08 07:49:56 +00:00
Philippe Charnier
38de36c41c Sync with diffs I found in kerberised versions: -Wall, no `;' in macros. 1997-12-08 07:46:53 +00:00
John Polstra
6210388a93 Make emacs work again. This is a workaround for the fact that the
emacs a.out file, self-generated by emacs's "unexec" function in
"unexsunos4.c", is invalid.  In particular, its "_end" symbol has
the wrong value.  The dynamic linker was using the value of that
symbol to initialize its sbrk break level.

The workaround is to peek at the executable's a.out header in
memory, and calculate what "_end" should be based on the segment
sizes.

I will work out a fix for emacs and send it to the FSF.  This
dynamic linker workaround is still worthwhile, if only to avoid
forcing all emacs users to build a new version.

Note: xemacs gives a bogus warning at startup, for related reasons.
The warning is harmless and can safely be ignored.  I will send a
patch to the xemacs maintainers to get rid of it, and meanwhile
add a patch file to our port.
1997-12-05 02:06:37 +00:00
Philippe Charnier
14d460e1b4 Use err(3). Add prototypes. Document that startup scripts are rc.i386 and
rc.conf (enable/disable) not rc.local.
Use full pathname in SYNOPSIS section.
1997-12-04 07:25:19 +00:00
Philippe Charnier
8cda9fcc0d Sort #includes. Add rcsid. Use full pathname in SYNOPSIS section. 1997-12-04 07:20:45 +00:00
Steve Price
59c780cdc1 FTP_INTERNAL_LS -> FTPD_INTERNAL_LS
Pointed out by:	Jaye Mathisen <mrcpu@cdsnet.net>
1997-12-04 03:58:02 +00:00
Philippe Charnier
a8faeabc96 Use full path in synopsis. Syslog will add trailing \n. 1997-12-03 07:19:58 +00:00
Philippe Charnier
5f806c3ccf Use err(3). Remove progname and trailing \n in syslog strings. 1997-12-03 07:16:08 +00:00
Philippe Charnier
a846453c5e Use err(3). Add protos for -Wall. 1997-12-02 12:33:42 +00:00
Philippe Charnier
a40772799f No \n in syslog() strings. Add man page to Xrefs. Change null byte to NUL byte. 1997-12-02 12:30:04 +00:00
Philippe Charnier
c7c2ef669a Do not terminate syslog() messages with a dot, as others daemons do. 1997-12-02 12:25:39 +00:00
Philippe Charnier
40150947c4 Document -n flag. Use err(3). Add usage.
Add syslog capability.
1997-12-02 12:20:17 +00:00
John Polstra
08bdd3d27d Get rid of the dynamic linker's internal malloc package, and arrange
things so that it uses the same malloc as is used by the program
being executed.  This has several advantages, the big one being
that you can now debug core dumps from dynamically linked programs
and get useful information out of them.  Until now, that didn't
work.  The internal malloc package placed the tables describing
the loaded shared libraries in a mapped region of high memory that
was not written to core files.  Thus the debugger had no way of
determining what was loaded where in memory.  Now that the dynamic
linker uses the application's malloc package (normally, but not
necessarily, the system malloc), its tables end up in the regular
heap area where they will be included in core dumps.  The debugger
now works very well indeed, thank you very much.

Also ...

Bring the program a little closer to conformance with style(9).
There is still a long way to go.

Add minimal const correctness changes to get rid of compiler warnings
caused by the recent const changes in <dlfcn.h> and <link.h>.

Improve performance by eliminating redundant calculations of symbols'
hash values.
1997-11-29 03:32:48 +00:00
Philippe Charnier
622058ebd0 Use err(3). -Wall cleaning. cosmetics in man page. 1997-11-26 07:36:51 +00:00
Philippe Charnier
754c3c574d Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page. 1997-11-26 07:34:56 +00:00
Philippe Charnier
9ce3627ba1 Cosmetics in man page. Add rcsid and sort #includes. 1997-11-26 07:31:14 +00:00
Philippe Charnier
6896720af3 Use err(3). -Wall cleaning. Use Pa for file names and add section in Xrefs. 1997-11-26 07:29:04 +00:00
Philippe Charnier
943eade9ed Sort #includes. Add rcsid. Add man page section in .Xrefs. 1997-11-25 07:17:15 +00:00
Philippe Charnier
3029b69f0b Use warn(3). Hardcode progname instead of using argv[0]. Use Pa for file
name.
1997-11-25 07:14:34 +00:00
Philippe Charnier
eb0b829002 Add usage(), rcsids. 1997-11-24 07:33:42 +00:00
Philippe Charnier
ad17ca10b7 Cosmetics in usage() and man page. 1997-11-24 07:31:31 +00:00
Philippe Charnier
7d70b772c1 Key is 8 bytes according to code, not 10 as stated in man page. Add rcsid. 1997-11-24 07:29:12 +00:00
Philippe Charnier
d6bf9eb7bb Use err(3) instead of local redefinition. Add usage. -Wall cleaning. 1997-11-24 07:27:06 +00:00
Philippe Charnier
d748864d2c Correct incompletes .Xrs. Remove duplicate #includes and unused variables. 1997-11-21 07:43:53 +00:00
Philippe Charnier
692727e680 Use err(3). -Wall cleaning. 1997-11-21 07:40:48 +00:00
Philippe Charnier
e02897fa5b Cosmetics in man page. Exit(-1) -> exit(1). 1997-11-21 07:38:43 +00:00
Philippe Charnier
74b634ac40 Add const to copyright string. Put sccsid under #if 0/#endif control. 1997-11-20 07:26:04 +00:00
Philippe Charnier
55033a6f9f Use err(3). exit(-1) -> exit(1). 1997-11-20 07:23:44 +00:00
Philippe Charnier
864b6b6e0a Cosmetic in error strings. Sort Xrefs. Add usage (with syslog capability). 1997-11-20 07:21:55 +00:00
Sean Eric Fagan
c6633e1b9f Log the request from the remote side, in addition to it having happened.
Reviewed by:	julian
1997-11-14 04:39:38 +00:00
Alexander Langer
1dd902ff4b Switch the effective uid to that of the user when writing mail files,
allowing quotas to be enforced on mail spools.

PR:             1111
Submitted by:   Charles Henrich <henrich@crh.cl.msu.edu>
1997-11-13 23:14:34 +00:00
Wolfram Schneider
77a87957c8 Store temporary files in /var/tmp instead /tmp. This should avoid
a possible disk overflow for enormous large mails.
Submitted by:	grog
1997-10-11 22:05:44 +00:00
Frank Durda IV
f05011e686 PR: bin/771 and bin/1037 are resolved by this change
This change changes the default handling of linemode so that older and/or
stupider telnet clients can still get wakeup characters like <ESC> and
<CTRL>D to work correctly multiple times on the same line, as in csh
"set filec" operations.   It also causes CR and LF characters to be read by
apps in certain terminal modes consistently, as opposed to returning
CR sometimes and LF sometimes, which broke existing apps.  The change
was shown to fix the problem demonstrated in the FreeBSD telnet client,
along with the telnet client in Solaris, SCO, Windows '95 & NT, DEC OSF,
NCSA, and others.

A similar change will be incorporated in the crypto version of telnetd.

This resolves bin/771 and bin/1037.
1997-10-08 03:10:32 +00:00
Warner Losh
20271f308f Clarify the actions of -s and the list of allowable names. 1997-10-06 16:28:47 +00:00
Jordan K. Hubbard
97fe7f477f Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
Bill Paul
23677e98fe Putting records with zero-length keys into a Berkeley DB hash database
is asking for trouble (sequential database enumerations can get caught
in an infinite loop). The yp_mkdb(8) utility avoids putting such records
into a database, but ypxfr does not. Today I got bit by a NULL entry in
one of the amd maps on my network, which is served by a SunOS master.
The map was transfered successfully to my FreeBSD slave, but attempting
to dump it with ypcat(1) caused ypserv(8) to transmit the same record
over and over again, making the map appear to be infinitely large. I
finally noticed the problem while testing a new version of amd under
development at the Columbia CS department, which began gobbling up insane
amounts of memory while trying to swallow the map.

To deal with this problem, I'm modifying ypxfr to watch for records
with zero-length keys and turn them into something less destructive
before writing them to the database.
1997-09-30 18:08:11 +00:00
Mark Murray
1ba18872f4 Changes for KTH KerberosIV. 1997-09-28 09:07:34 +00:00
Mark Murray
8aeaa47e80 There is a clear separation of the crypto telnet and the non-crypto telnet.
As this is the non-crypto version, remove the useless (commented out)
directives and macros.
1997-09-28 08:40:54 +00:00
Mark Murray
0934db4674 Changes for the new KTH Kerberos4.
Also make -Wall a bit quieter
1997-09-28 08:38:04 +00:00
Mark Murray
e7509c75f5 Changes for the new KTH Kerberos.
Also make -Wall a bit quieter.
1997-09-28 08:36:04 +00:00
Poul-Henning Kamp
d030d2d2ae Many places in the code NULL is used in integer context, where
plain 0 should be used.  This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR:		2752
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-09-18 14:08:40 +00:00
Andrey A. Chernov
fe38e2f8f4 Allow backspace too 1997-09-15 00:42:04 +00:00
Andrey A. Chernov
4541df7be4 disable upper controls and enable all other
8bit codes due to lack of locale knowledge in daemon
1997-09-15 00:27:49 +00:00
Wolfram Schneider
d6940a479f -p flag misdocumented in telnetd(8)
PR: 4462
Submitted by:  hfir@math.rochester.edu
1997-09-14 18:25:19 +00:00
Wolfram Schneider
f6b31571f6 spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
Dima Ruban
8fad2d7e99 Do setlogin() before changing uid/gid, since
`at/batch' requires this.

Obtained from: me && OpenBSD
1997-09-08 23:39:48 +00:00
Thomas Gellekum
986a117274 Hopefully better fix for logwtmp(): rename to a private
version ftpd_logwtmp().
1997-09-05 11:44:00 +00:00
Thomas Gellekum
b11f88b09a logwtmp() prototype is in <libutil.h>. 1997-09-05 11:17:22 +00:00
David Nugent
1cc1582825 Fix botch with escaped characters, go back to using cgetstr().
For escaped characters used in modem strings, use double-backslashes
in gettytab.
PR: 4370
1997-09-03 01:05:36 +00:00
David Nugent
b92f6bd2b8 Use cgetustr() since we handled special escapes ourselves.
Fix typo in escape parsing function.
PR: 4370
Submitted by: sumii@is.s.u-tokyo.ac.jp
1997-09-01 10:06:05 +00:00
Joerg Wunsch
71c971334b Fix description of -t option.
PR:		3382
Submitted by:	furuta@sra.co.jp (Atsushi Furuta)
1997-08-24 18:21:34 +00:00
Steve Price
eb1ca88d07 Turn off hyphenation in this manpage so that .Xr macros, don't get
split between lines.

PR:		bin/4080
1997-08-23 16:22:30 +00:00
John-Mark Gurney
82681653a4 change -I/sys to -I${.CURDIR}/../../sys 1997-08-22 14:00:57 +00:00
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
Jordan K. Hubbard
ea8f0676cf Correct the ancient paths here in case someone ever uncomments this again. 1996-11-05 05:13:39 +00:00
Torsten Blum
ff4167733f Comment out the XIDLE extension stuff, it breaks make world on systems
with Xinside's CDE installed
1996-11-04 20:58:58 +00:00
Mark Murray
50ab54df69 Compile telnetd from eBones instead of secure.
2.2 candidate.
1996-11-03 17:00:12 +00:00
Bill Paul
81a82d4dfd Give ypxfr the ability to detect the presence of the YP_INTERDOMAIN
and YP_SECURE flags so that it can properly add them to newly created
maps when needed. This applies only when using the 'standard' method
for map transfers. When using rpc.ypxfrd, the whole map is copied
verbatim, along with any special entries that may be encoded in it.

Also made -Wall a little quieter for ypxfrd_getmap.c.
1996-10-25 16:13:09 +00:00
John Polstra
ab6c6377b3 If errors occur during the loading of the shared libraries required by
the main program, report them directly from the dynamic linker and die
there, rather than returning an error message to crt0.o.  This enables
the printing of error messages even for old executables, whose version
of crt0.o is not able to print them.

This fix closes PR bin/1869.

The code in crt0.o for printing error messages from the dynamic linker
is no longer used, because of this change.  But it must remain, for
backward compatibility with older dynamic linkers.
1996-10-24 16:24:19 +00:00
Bill Paul
2385e0163a Nuke a couple of useless lines of code from the /etc/netid parsing
section. (Cut & paste-o.)
1996-10-24 03:33:32 +00:00
Marc G. Fournier
80bcade31d Totally botched ths patch...revert back to Rev 1.7, and request a
proper context diff from the submitter...
1996-10-23 05:05:32 +00:00
Marc G. Fournier
59faa42d9d Last time I trust 'sucess's on a non-context diff...
Pointed out by: Bill Fenner <fenner@parc.xerox.com>
1996-10-22 22:52:37 +00:00
Marc G. Fournier
268fa61dc1 Fixes:
When an rsh is denied by rshd because the client is lacking appropriate
.rhosts permission, an error message is formatted for syslog which contains
the client's hostname.  The hostname portion of the message relies on a pointer
to a field within gethostbyname()'s internal struct hostent which changes state
between when the pointer is initialized and when it is dereferenced to create th
e
message.

Submitted by: skynyrd@opus.cts.cwu.edu
1996-10-22 21:11:49 +00:00
Marc G. Fournier
d89ac03c9d Fixes:
>Description:

        /usr/libexec/mail.local runs as root.  As such is can fill up a
        mailbox on a quota'd filesystem, and keep going... Makes quota's
        almost useless in an ISP environment.

Closes: PR#bin/1111

Submitted by:	 Charles Henrich <henrich@crh.cl.msu.edu>
1996-10-22 21:01:01 +00:00
Bill Paul
2c33b20a87 Add a couple of reserved port checks: don't talk to either ypserv
or rpc.ypxfrd processes on remote systems that aren't bound to reserved
ports. The servers already do reserved port checks on the clients.

Obtained from: scrutinizing the OpenBSD ypxfr sources. (Note that this
applies to the ypserv check only; OpenBSD doesn't have an rpc.ypxfrd.)
1996-10-20 19:52:53 +00:00
Andrey A. Chernov
43658eac64 Implement alternative strategy if it is impossible to confirm
password: ask for it, but don't tell that S/key password required.
It looks like non-s/key system from outside.

Additionally tell that s/key required when it is so for normal case
1996-10-18 17:09:26 +00:00
John Polstra
16804804df Fix two minor typos in the manual page. 1996-10-18 04:49:43 +00:00
Andrey A. Chernov
28fbb50335 Oops, fix my previous commit, now tell user his s/key parameters 1996-10-17 17:46:00 +00:00
Andrey A. Chernov
28ed0fe08b Don't ever ask for password if it is impossible to confirm it
It happens if 1) regular passwords not allowed, 2) skey database
not activated for given user.
Under some rare circumstanes skey_challenge can return empty
diagnostic or even previous buffer, fix it.
1996-10-17 17:06:04 +00:00
John Polstra
e5bbb2e4b5 Add the search directories from the hints file only the first time it is
opened.  After that, the directories are already present, and there is
no point in adding them again.  This doesn't fix any bugs; it's just for
efficiency.
1996-10-10 23:16:50 +00:00
John Polstra
9151bb8d2d Fix a bug that caused a segmentation violation if dlsym() was called
with its first argument equal to NULL.
1996-10-10 04:10:32 +00:00
Wolfram Schneider
8607faf466 correct spelling of 'X Window System' (tm) 1996-10-06 17:59:28 +00:00
Wolfram Schneider
e83201b43a delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
Nate Williams
9ac501e21b There's no need to 'unsetenv()' unsafe environment variables explicitly
since rt_readenv() already takes care of not setting unsafe variables.
This was part of the changes I submitted to Peter and John during the
review which must have gotten missed.
1996-10-01 16:09:18 +00:00
Peter Wemm
3e17261bac Sigh, oh well, here's my obligigatory "oops" commit. I don't quite know
how I managed to get this out of sync, but I did.  I guess that's what I
get for directly committing from different machines that I was testing on.

Pointed out by: Paul Traina <pst@freebsd.org>
1996-10-01 11:54:38 +00:00
Peter Wemm
5584286a91 Update to handle new version ld.so.hints and info in executable for
configurable fallback search paths, as well as new crt interface version.

Also:
 - even faster getenv(), get all environment variable settings in a single
   pass.
 - ldd printf-like format specifications
 - minor code cleanups, one vsprintf -> vsnprintf (harmless)

The library search sequence is a little more complete now. Before,
it'd search $LD_LIBRARY_PATH (by opendir/readdir/closedir), then read
the hints file, then read /usr/lib (again by scanning thr directory).  It
would then fail if there was no "found" library.

Now, it does LD_LIBRARY_PATH and the hints file the same, but then uses
a longer fallback path.  The -R path is fetched from the executable if
specified at build time, the ldconfig path is appended, and /usr/lib is
appended to that. Duplicates are suppressed.  This means that simply
placing a new library in /usr/local/lib will work (the same as it did in
/usr/lib) without needing ldconfig -m.  It will find it quicker if the
ldconfig is run though.

Similar changes have been made to the NetBSD ld.so, but ours is rather
different now due to John Polstra's speedups and fixes from a while back.

The ldd printf-like format support came direct from NetBSD.

Reviewed by: nate, jdp
1996-10-01 01:52:03 +00:00
Peter Wemm
b186571cf6 Update the backends to go with the top-level ld changes. The non-i386
changes are for completeness, I don't think they work.  There are changes
to deal with the new include files.

Obtained from: NetBSD (mostly)
1996-10-01 01:28:10 +00:00
Peter Wemm
d0a184df5d Support for .weak (in addition to the N_INDR stab) for gcc/g++. Also deal
with the -R option and store the path in the dynamic header when specified.
The $LD_RUN_PATH environment variable is not checked yet.

While here, split up the code a bit more to enable more selective replacing
of GPL'ed components that are linked with ld.so with others.

Obtained from: NetBSD (mostly, the breakup is my fault)
1996-10-01 01:22:51 +00:00
Wolfram Schneider
e0e5145ce6 add missing comma(s) in .Xr macros 1996-09-23 22:24:39 +00:00
Wolfram Schneider
148531ef1e add forgotten $Id$ 1996-09-22 21:56:57 +00:00
Warner Losh
8ea3178507 Reviewed by: Bill Fenner <fennder@parc.xerox.com>
Reviewed by:	Garrett Wollman <wollman@freebsd.org>
Submitted by:	Warner Losh <imp@village.org>
Close PR bin/1145:
	Add -s flag to tftpd.  This enables the so-called secure mode
of tftpd where it chroots to a given directory before allowing access
to the files.  In addition, it runs as nobody when in this mode.
Reviewed a long time ago by Bill and Garrett.  Apply my patch from the
pr, and close the PR.
1996-09-22 04:19:27 +00:00
Paul Traina
39ea627d62 Fix some compilation warnings. 1996-09-21 18:01:23 +00:00
Bruce Evans
9e04d4c7f5 This should have gone away with the COMPAT_43 cruft. cgetent() is now
used instead of the rudimentary routines here.
1996-09-20 11:19:00 +00:00
Poul-Henning Kamp
d3e560a1d3 Make the inetd suggestion slightly less confusing. 1996-09-19 08:21:18 +00:00
Bruce Evans
eaa86f9d7f Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6.  Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.
1996-09-14 03:00:32 +00:00
Bruce Evans
87d0dcafca Use `install -C' instead of lots of shell commands to install ld.so
as atomically as possible.

(Immutable targets can't be renamed without opening a window when
neither the source nor the target is immutable.  Perhaps there
should be a rename_immutable syscall to do this if unsetting the
immutable flags would work.)
1996-09-12 03:42:54 +00:00
Paul Traina
86ca32cd60 bootpd.dump is in /tmp 1996-09-11 01:37:24 +00:00
Peter Wemm
163d0a5fb8 wrong C bracketing, *blush*... 1996-09-07 02:17:29 +00:00
Peter Wemm
f533eaf1c0 zap #include <sgtty.h>, it's not used. 1996-09-07 02:08:35 +00:00
Peter Wemm
2a29592214 Another sgtty use bites the dust.. 1996-09-07 02:05:53 +00:00
Bruce Evans
5b963fa12e Fixed DPADD. 1996-09-05 17:16:10 +00:00
Bruce Evans
680b396b51 Removed unused `-I.'s from CFLAGS.
"." means the object directory, so it is just confusing to use it
when nothing is included from the object directory unless the object
directory is also the source directory.  It is confusing for "."
not to mean the source directory anyway, so used `-I.'s should be
replaced by `-I${.OBJDIR}'.
1996-09-04 22:25:35 +00:00
Andrey A. Chernov
ea9ce57fe2 Unlocalize date 1996-09-01 00:53:45 +00:00
Peter Wemm
05403b9a0d Add named-xfer 1996-08-29 22:17:27 +00:00
Peter Wemm
b433e12930 build bind-4.9.4-P1 named-xfer in it's own directory 1996-08-29 21:50:49 +00:00
Wolfram Schneider
5a80fb277e sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
Mike Pritchard
c0b0bcf4d3 Use the .Bx macro where appropriate. 1996-08-23 20:36:11 +00:00
Mike Pritchard
0f7785061e Use the .At macro where appropriate. 1996-08-23 01:06:24 +00:00
Mike Pritchard
85cf659a76 Use the .Fx macro where appropriate. 1996-08-23 00:57:08 +00:00
Peter Wemm
326bbdd92f Add a ``-P altlogin'' option which allows the sysadmin to specify an
alternate login(1) type program to run.
1996-08-13 07:51:45 +00:00
Julian Elischer
105a3c98b9 Reviewed by: various
Submitted by:	archie@whistle.com

allow ftpd to bind to a single address/interface
this allows easy split services.
1996-08-09 22:22:30 +00:00
Mark Murray
9aca17cb12 Tidy up the Kerberised bits. While I'm here, fix some -Wall complaints. 1996-08-09 09:02:31 +00:00
Poul-Henning Kamp
3cde2031c8 Fix another bogon. 1996-08-06 14:29:06 +00:00
Poul-Henning Kamp
0bb6e9ed65 Make password checking in ftpd work again. 1996-08-06 08:43:43 +00:00
Paul Traina
a5a4544e77 Convert STATS and PARANOID to run-time options.
Document the new -R (relax paranoia) option.

From NetBSD/Lite2: code and man page cleanups, Kerberos IV hooks
(relax, we're still exportable), and /etc/ftpchroot feature for
semi-anonymous accounts
1996-08-05 00:21:15 +00:00
Paul Traina
61f891a6df If PARANOID is set, do not allow PORT commands to remote ports less than 1024
or addresses other than the requestor's address.  This violates the FTP
protocol (hmm...as I write this, I'm going to change this to a run-time var.)

Require login before PASV and RNTO commands.

Close unused PASV ports so they don't hang around forever.

Do not allow file overwrites via rename or STOR when anonymous
(suspenders).

Clean up buffer utilization.

My code, but heavily inspired by Hobbit's changes to wu-ftpd as pointed out
by Mike Prettejohn and Kit Knox.
1996-08-04 22:40:35 +00:00
Bill Paul
09cd72056a Use err() instead of perror()/exit() and remember to #include <errno.h>
and <err.h>.
1996-08-04 19:17:15 +00:00
Adam David
30c690ce79 consistent presentation of emphasis 1996-07-23 12:21:46 +00:00
Bruce Evans
884d83ff09 Include <sys/types.h> before including <grp.h> so that this doesn't
depend on <stdio.h> bogusly including <sys/types.h>

Reordered includes to satisfy KNF rules.
1996-07-12 05:55:38 +00:00
Wolfram Schneider
e3908fd51f add manpage getNAME(1) 1996-07-08 20:18:28 +00:00
Bill Paul
78acff3281 Fill in new arguments in the ypxfr_getmap structure (byte order,
db type, filename) and check for new failure codes (db mismatch,
endian mismatch).
1996-07-04 02:13:11 +00:00
Bill Paul
4c2e2040b6 Improve performance with very large user databases by increasing
hash table size from 256 to 1024.

Generate output that looks more like the SunOS mknetid: uses a space
instead of tabs for white space.

Fix typo in comment in hash.h: Groupit -> Groupid.
1996-06-27 05:42:01 +00:00
Bill Paul
281a1128d8 Turn on mknetid. 1996-06-25 20:32:30 +00:00
Bill Paul
ca09eb424c (This import had better work correctly or so help me I'll move to
the Himalayas and become a hermit.)

Import new mknetid program. This replaces the crufty, soon to be defunct
mknetid script packaged with ypserv.

This program parses the group, passwd, hosts and netid databases into
the netid.byname map. Duplicate checking is performed using hash tables.
Testing on my 486DX2/66 with FreeBSD 2.1.0 showed that this program can
process a 30,000-entry passwd database into a netid map (along with
assorted group and hosts information) in about 22 seconds. On my SPARC IPX
with SunOS 4.1.3, it takes about 15 seconds. This compares favorably with
the SunOS mknetid program, which parses the same database(s) in 13 seconds.
(With smaller databases, my program is actually slightly faster. Go
figure.)
1996-06-25 20:26:38 +00:00
Andrey A. Chernov
333468bac7 If hostname > UT_HOSTSIZE, use its numerical address instead to keep
valid utmp and wtmp entries
1996-06-17 14:59:07 +00:00
Bill Paul
1ed0ebdc98 Take ypxfrd_xdr.c out of SRCS line. It should be included in librpcsvc,
which ypxfr links with. (Sorry: left over development bogon.)

Just a reminder: you must rebuild librpcsvc before you build
this program.

Pointed out by: Stephen Hocking
1996-06-06 03:58:06 +00:00
Bill Paul
16deb43a45 Add support for rpc.ypxfrd and document it in the man page.
Also generallize the yp_dbwrite functions a little: allow the caller
to specify certain flags. I need this mostly for some changes to
rpc.yppasswdd to allow in-place updates.

Also change Makefile a little to use the same format as ypserv.
1996-06-05 05:42:52 +00:00
Paul Traina
6cde43480c Pass in both username and file to jkfprintf 1996-06-04 15:42:09 +00:00
Poul-Henning Kamp
6b5139742c backout yacc changes 1996-06-02 17:10:13 +00:00
Peter Wemm
40e9d39e59 Use the sysctl settable data port ranges rather than the statically
compiled values.  see sysctl net.inet.ip.portrange.* and the IP_PORTRANGE
discussion in <netinet/in.h>
1996-05-31 03:10:25 +00:00
Poul-Henning Kamp
9ad70fa0b2 Fix yacc rule usage. 1996-05-30 21:29:03 +00:00
John Polstra
1dd43c183e When checking to see whether a needed shared library has already
been loaded, look for a match by device and inode number if the
traditional pathname comparisons don't find a match.  This detects
the case in which a library is requested using two different names
which are really links to the same file, and avoids loading it
twice.

Requested by:	peter@freebsd.org
Reviewed by:	peter@freebsd.org
1996-05-22 06:34:12 +00:00
Bill Paul
d7b71c676e Small touchups:
- Fix typos in comments in hash.c.
- Remove unneeded and unused member from grouplist struct in hash.h.
  (Curiously, the compiler never complained about this even though the
   member was of type 'struct grps' which is not defined anywhere in
   this program.)
- char ch -> int ch in revnetgroup.c.
- char *argv[0]; -> char *argv[]; also in revnetgroup.c.
- Force the user to specify at least one of the -u or -h flags
  and complain if they specify both.
1996-05-12 17:17:45 +00:00
Wolfram Schneider
9fb933075e `mv'' -> `mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
1996-05-07 23:19:49 +00:00
Bill Paul
a7bd0e76fc phkmalloc doesn't like the call to xdr_free() in ypxfr_get_master().
Nuke it.
1996-05-07 21:08:20 +00:00
Andrey A. Chernov
03749d174f Localize time 1996-05-07 19:10:32 +00:00
Andrey A. Chernov
65fe4a53c3 Replace non-POSIX speed setting by POSIX one 1996-05-07 16:42:26 +00:00
Joerg Wunsch
cae66988a1 Finally commit the changes that make getty(8) no longer depend on the
COMPAT_43 cruft.  This is supposedly the last core utility that has
been using it!  (So now, one should be able to remove this option from
the config files.  Be aware that the last officially released xterm
however still requires it.)

The getty has been running now for several weeks on my modem line, so
i feel safe about it.

Obtained from:	mostly from the NetBSD vendor-branch
1996-05-05 19:01:13 +00:00
Bill Paul
b95c787ed4 Small tweak to yp_put_record(): call the DB put routine with the
R_NOOVERWRITE flag and process return codes so that we can tell the
difference between a failure due to a duplicate database entry and
failure due to some other error.
1996-04-28 03:59:56 +00:00
John Polstra
dd2b076850 Implement support for LD_PRELOAD in the dynamic linker. Remove
descriptions of LD_NO_INTERN_SEARCH and LD_NOSTD_PATH from the manual
page, since they are not supported.

Submitted by:	Doug Ambrisko <ambrisko@ambrisko.roble.com>
1996-04-20 18:29:50 +00:00
John Polstra
c049096e82 Implement support for LD_PRELOAD in the dynamic linker.
Submitted by:	Doug Ambrisko <ambrisko@ambrisko.roble.com>
1996-04-20 18:27:56 +00:00
Joerg Wunsch
712c581c89 Import NetBSD's termios'ed getty into a vendor branch.
Obtained from:	NetBSD 1.1R
1996-04-13 15:33:16 +00:00
Joerg Wunsch
474bf6693a This commit was generated by cvs2svn to compensate for changes in r15249,
which included commits to RCS files with non-trunk default branches.
1996-04-13 15:33:16 +00:00
Joerg Wunsch
5e814ff6c2 Introduce a -b option for sites who are not interested in the old biff
service.  (Avoid a ``in_vain'' warning...)
1996-04-13 11:44:12 +00:00
David Greenman
cf09a2067c Implemented a "-D" option that causes ftpd to detach and become a daemon -
accepting connections on the FTP port and forking children processes to
handling them. This is lower overhead than spawning ftpd from inetd and
can be a significant win on busy FTP servers. Be sure to disable ftpd in
inetd.conf if you decide to use this option.
These changes are based on similar changes I made to wu-ftpd and have
been in use on wcarchive for several months.
1996-04-11 10:22:16 +00:00
Mike Pritchard
edf0e5b3f8 Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
1996-04-08 04:18:31 +00:00
Joerg Wunsch
ea5256699d Import the 4.4Lite2 getty into a vendor branch. 1996-04-07 10:28:57 +00:00
Mike Pritchard
906c1e27fc Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
Jordan K. Hubbard
a7939d5aa6 Here is a patch to talkd which makes it send the request to the tty with
the lowest idle time.
Submitted by:	loodvrij@gridpoint.com (Bruce J. Keeler)
1996-03-24 09:27:20 +00:00
David Greenman
1332892bcf Fix bug that caused a coredump when attempting to enter passive mode when
not logged in. Original fix slightly altered by me to return the correct
reply code.

Submitted by:	Vadim Kolontsov <vadim@tversu.ac.ru>
1996-03-18 11:09:03 +00:00
Mike Pritchard
b8c8989377 Update the uucpd makefile to install the man page. 1996-02-18 21:38:13 +00:00
Mark Murray
7648a7d3a5 New man page for uucpd. There is precious little info for this thing
available, but I managed to find something in the BSD4.4 uucico(8)
docs.

Closes pr docs/131.
1996-02-18 20:32:30 +00:00
Bill Paul
b6248eebf5 Turn on ypxfr. 1996-02-13 14:59:20 +00:00
Joerg Wunsch
2ec6fd6a09 Include both, the regular and the `secure' telnetd, when building
a release.
1996-02-13 09:20:16 +00:00
Mike Pritchard
78b0b234eb Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.
1996-02-11 22:38:05 +00:00
Mark Murray
bbff7ca556 #include <kerberosIV/des.h> -> #include <des.h> 1996-02-11 09:18:18 +00:00
Mike Pritchard
c4c23c4df8 Another round of various man page cleanups. 1996-02-09 17:25:57 +00:00
Mike Pritchard
ba849e6bf8 Correct a file location in the FILES section. 1996-02-09 02:31:23 +00:00
Bill Paul
bc66df81bb ypxfr_getmap.c:
- Handle 'empty' maps more gracefully. By empty I mean a valid map that
  just happens not to have any entries in it, such as you would get if
  you built a map database from an empty file. Previously, trying to
  ypxfr such a map would yield an 'NIS map/database error' which is not
  the correct behavior.

ypxfr_misc:
- Make sure to free() or xdr_free() dynamically allocated memory in
  ypxfr_get_master() as necessary.
1996-02-04 05:18:44 +00:00
Mark Murray
5bf1814b0e Rename des_set_key -> des_set_key_krb. (libdes conflict) 1996-02-03 11:51:19 +00:00
Mike Pritchard
5ea43fd200 Add some missing manual page links. 1996-02-02 17:48:46 +00:00
Wolfram Schneider
4714ab693b Section FILES and SEE ALSO completed
Section FILES and SEE ALSO completed
1996-01-28 23:57:38 +00:00
Wolfram Schneider
7b30d8a2b1 Section FILES and SEE ALSO completed 1996-01-28 23:57:09 +00:00
Paul Traina
4f5241c655 Fix getif() to work under 4.3bsd and later 1996-01-23 09:44:45 +00:00
Paul Traina
21759429e4 Remove bootpgw 1996-01-23 02:24:03 +00:00
Paul Traina
7870f32ed0 Disconnect bootpgw 1996-01-23 02:23:20 +00:00
Paul Traina
6e159bbc62 Merge back in 4.4bsd ARP changes by hand 1996-01-23 02:22:16 +00:00
Paul Traina
0490e2a765 Add bootpgw makefile 1996-01-23 02:02:03 +00:00
Paul Traina
d1c0e75921 Fix conflicts from 2.4.3 merge 1996-01-23 01:58:00 +00:00
Paul Traina
e08ac58bbe Import bootpd-2.4.3 from ftp.mc.com 1996-01-23 01:35:04 +00:00
Paul Traina
ee3ee9eeaa Minor cleanups from NetBSD-current.
Obtained from: NetBSD
1996-01-23 00:57:19 +00:00
John Polstra
5a81ed9667 This release is a moderate restructuring of the dynamic linker.
It addresses a number of problems that were present in earlier
versions.

The calls to the "init" and "fini" functions of shared libraries
have been reordered, so that they are called in a strictly nested
fashion, as is required for C++ constructors and destructors.  In
addition, the "init" functions are called in better order relative
to each other.  That makes the system more tolerant of C++ programs
which depend on a library's being initialized before its clients.

The dynamic linker is now more tolerant of shared libraries in
which dependencies on other shared libraries are incompletely
recorded.

Cleanup in the event of errors has been improved throughout the
dynamic linker.  A number of memory leaks were eliminated.

The warning message for a shared library whose minor version number
is too old has been clarified.

The code dealing with the "ld.so.hints" file has been cleaned up.
A bug that caused the hints file to be unmapped incompletely has
been fixed.  A different bug that could potentially cause the hints
file to be mapped on top of a loaded object has been fixed.

The code that searches for shared libraries has been cleaned up.
The searching is now more compatible with that done by SunOS and
SVR4.  Also, some unnecessary and useless searches of both the
hints file and library directories have been eliminated.

Reviewed by:	nate@freebsd.org
1996-01-13 00:15:25 +00:00
John Polstra
eb4a4eeb45 Split up the code so that a single directory can be searched, to
support some changes in the dynamic linker.  (This code is shared
by the dynamic linker.)

Reviewed by:	nate@freebsd.org
1996-01-13 00:14:53 +00:00
Poul-Henning Kamp
bbb1dc53a4 Another '-' needed for make release. 1996-01-11 17:49:55 +00:00
Poul-Henning Kamp
5a39b83123 Make the new realinstall target a little less draconian so that make release
doesn't fall over.
1996-01-11 17:27:16 +00:00
John Polstra
b25d7c2bbc Install ld.so in a way that is safe even on a running system. 1996-01-11 03:45:55 +00:00
Bill Paul
34a042e8b8 - Fix error reporting when checking order number via NIS: we return zero
on a failure, but if we're checking a corrupt map we could also get back
  a zero from ypserv without really encountering any actual error. Flag this
  condition and generate an meaningful error message.

- Fix transmission of ypxfr_clear to ypserv: error checking was wrong
  and we sending YPXFR_YPERR as an error status instead of YPXFR_CLEAR.

- To help avoid a race condition (or at least reduce the likelyhood of
  it occuring), use rename() to move a newly transfered map into place
  instead of unlink()ing the old one first and then renaming. Da man page
  sez that rename should do the unlink() for us. This prevents ypserv
  from returning 'no such map in domain' when asked to query a map which
  ypxfr has just unlink()ed but not yet replaced.
1996-01-10 17:44:10 +00:00
Bill Paul
d6cab90261 Sync with my sources at home (these are really tiny changes):
- Fix a SEGV condition in ypxfr_main.c that reared its ugly head while I
  was working on the 'parallel jobs' feature of the new yppush. After we've
  completed the map transfer and created a local temporary copy, we check
  the order number of the map on ypserv again to make sure it didn't change
  while the transfer was in progress (map skew). If for some reason we flat
  out fail to get the order number from the server, we flag this as an
  error and bail, telling ypxfr_exit() to clean up our temporary files
  for us. However, ypxfr_exit() tries to close the database before unkining
  it, not realizing that it has already been closed prior to the skew check.
  The second attempt to close the database causes a SEGV somewhere inside
  the DB code.

  (Well, it does on my 2.0.5 machine anyway. I haven't seen anyone modify
  the DB library code in ages, so the condition is probably still there.)

  To work around this, we deliberately set dbp to NULL after closing the
  database and check for the condition in ypxfr_exit(), being careful to
  avoid the second close if we see the NULL.

- In yp_dbwrite.c, make yp_open_db_rw() open the database with O_EXLOCK
  flag set. This probably won't affect much of anything, but I feel better
  having it there.
1996-01-06 20:28:06 +00:00
Thomas Graichen
f1fba5f1b8 added rpc.rquotad and rpc.sprayd 1996-01-05 09:44:31 +00:00
Thomas Graichen
968a1b9ae4 Obtained from: NetBSD
imported the rpc.sprayd from NetBSD - it is used by the new spray
command for network analysis
1996-01-05 08:53:39 +00:00
Thomas Graichen
59d7b5792a This commit was generated by cvs2svn to compensate for changes in r13240,
which included commits to RCS files with non-trunk default branches.
1996-01-05 08:53:39 +00:00
Thomas Graichen
1a3e5dd740 Obtained from: NetBSD
Imported rpc.rquotad from NetBSD - currently only used by the
quota-command to display quota's over nfs
1996-01-05 08:47:12 +00:00
Thomas Graichen
e26af47a28 This commit was generated by cvs2svn to compensate for changes in r13237,
which included commits to RCS files with non-trunk default branches.
1996-01-05 08:47:12 +00:00
Peter Wemm
b63e1fe2c4 Make ftpd use setproctitle() from libutil
I've left the old code in there under #ifdef OLD_SETPROCTITLE in case
somebody wants to try to compile out ftpd on some other machine.
1996-01-01 08:35:11 +00:00
Peter Wemm
6065a0be11 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Bill Paul
665823d011 Import the new ypxfr, written by yours truly. Functionally equivalent
to the old one, except that it supports an additional option (-p path)
that lets you specify the top level path wiere your NIS maps live.
(ypserv allows you to specify a path like this, so it makes sense that
ypxfr should too. ypserv will automagically pass the -p flag to ypxfr
if you use a path other than /var/yp when you start it.)

This program uses client stub code generated by rpcgen as well as
the yp_dblookup.c module from ypserv.
1995-12-25 03:07:13 +00:00
Garrett Wollman
dd07a8677b Implement server-side transaction TCP. (Has no effect on non-TTCP clients.) 1995-12-17 20:25:28 +00:00
Peter Wemm
279884182f Fix the bug which allowed people to avoid the "-s" (secure) bug.
Now, "finger" is invoked with "--" before the first network supplied
argument, so the "--" and "-l" hacks will be stopped.
1995-12-10 15:07:12 +00:00
Nate Williams
56dbd97bcb Fix typo. 1995-12-02 18:23:00 +00:00
Guido van Rooij
d7b3176278 It is not necessary to check if a '-' is in lusername., Checking if
lusername starts with a '-' is enough. Otherwise, no users with a '-'
in there name can use rlogin.
1995-12-01 20:38:40 +00:00
Guido van Rooij
d6ed3c374d Timeout when an expected accept does not happen after all.
This gets rids of dozens of hanging ftpd's because some broken
pc implementation `forgets' to open a passive connection.
Obtained from: Wietse Venema
1995-11-29 19:52:30 +00:00
Peter Wemm
2d9cb0580d Stop rlogind from bogusly ignoring an explicit .rhosts file for root.
It still correctly ignores hosts.equiv.  This is now consistant with rshd.
1995-11-20 23:25:35 +00:00
Andrey A. Chernov
cd0106ae43 Add missing & in des_set_key argument 1995-11-19 15:20:48 +00:00
Peter Wemm
b048c73588 Move the setlogin() call a little earlier.. It was being done in the child
process - which would be no longer allowed if the setlogin() changes go
through.  Now the parent (the session leader, when started by inetd) does it.
1995-11-12 18:31:23 +00:00
Nate Williams
1e37fc9d59 Changed the terminology for what used to be called the "memorizing"
vector.  Now it is called the "symbol caching" vector.  This was made
possible and unconfusing by other changes that allowed me to localize
everything having to do with the caching vector in the function
reloc_map().

Switched to alloca() for allocating the caching vector, and eliminated
the special mmap-based allocation routines.  Although this was motivated
by performance reasons, it led to significant simplification of the
code, and made it possible to confine the symbol caching code to the
single function reloc_map().

Got rid of the unnecessary and inefficient division loop at the
beginning of rtld().

Reduced the number of calls to getenv("LD_LIBRARY_PATH") to just 1, on
suggestion from <davidg@root.com>.

Added breaks out of the relocation loops when the relocation address is
found to be 0.  A relocation address of 0 is caused by an unused
relocation entry.  Unused relocation entries are caused by linking a
shared object with the "-Bsymbolic" switch.  The runtime linker itself
is linked that way, and the last 40% of its relocation entries are
unused.  Thus, breaking out of the loop on the first such entry is a
performance win when ld.so relocates itself.  As a side benefit, it
permits removing a test from md_relocate_simple() in
../i386/md-static-funcs.c.

Unused relocation entries in other shared objects (linked with
"-Bsymbolic") caused even bigger problems in previous versions of the
runtime linker. The runtime linker interpreted the unused entries as if
they were valid. That caused it to perform repeated relocations of the
first byte of the shared object.  In order to do that, it had to remap
the text segment writable.  Breaking out of the loop on the first unused
relocation entry solves that.

Submitted by:	John Polstra <jdp@polstra.com>
1995-11-02 18:48:15 +00:00
Andrey A. Chernov
e2326c6ef6 Revert fsync ifdef behaviour and name, now default variant acts like
original one.
Suggested by: peter
1995-10-31 09:16:46 +00:00
Andrey A. Chernov
e3807a3f8f Put fsync under #ifdef EXTRA_SANITY and turn it off by default.
fsync here cause real disk trashing when large UUCP mail chanks
parsed.
1995-10-31 08:22:13 +00:00
Bill Paul
0b8ab5c8e1 Add revnetgroup. 1995-10-26 16:28:33 +00:00
Bill Paul
a44e4d1407 Import the first cut of my (finally finished) revnetgroup program. This
program parses the /etc/netgroup file into netgroup.byuser and netgroup.byhost
format for NIS.

I used hash tables to store the initial netgroup data in memory and to
construct the 'reverse' netgroup output. It seems just as fast as the
SunOS revnetgroup, which is surprising considering this is my first
attempt at using hash tables in a real application. :)

Note that I canibalized a large chunk of getnetgrent.c to save myself
from having to write my own netgroup parsing functions.
1995-10-26 16:25:29 +00:00
Nate Williams
468f82b316 Run-time linker speedups - Round One
Implemented symbol memorizing to reduce the number of calls to lookup(),
making relocation go faster.  While relocating a given shared object,
the dynamic linker maintains a memorizing vector that is directly
indexed by the symbol number in the relocation entry.  The first time a
given symbol is looked up, the memorizing vector is filled in with a
pointer to the symbol table entry, and a pointer to the so_map of the
shared object in which the symbol was defined.  On subsequent uses of
the same symbol, that information is retrieved directly from the
memorizing vector, without calling lookup() again.

A symbol that is referenced in a relocation entry is typically
referenced in many relocation entries, so this memorizing reduces the
number of calls to lookup() dramatically.  The overall improvement in
the speed of dynamic linking is also dramatic -- as much as a factor of
three for programs that use many shared libaries.

Submitted by:	jdp@polstra.com "John Polstra"
1995-10-25 16:16:35 +00:00
Andrey A. Chernov
d7582593f6 Remove LD_NOSTD_PATH unsetenv, isn't exist anymore 1995-10-24 06:50:45 +00:00
Andrey A. Chernov
a4057ed8d3 Remove LD_NOSTD_PATH implementation, it isn't works and
can cause some problems.
Suggested-by: davidg
1995-10-24 06:48:16 +00:00
Andrey A. Chernov
b2105a0990 if uid != euid or gid != egid unsetenv("LD_NOSTD_PATH") too 1995-10-21 14:52:48 +00:00
Andrey A. Chernov
d549e5cc7f Fix original patch error with ! before strncmp
Zap only needed LD_* variables
1995-10-20 22:17:35 +00:00
Andrey A. Chernov
68942f23dd Don't allow LD_* env. variables to be tricked
Submitted by: Sam Hartman <hartmans@mit.edu>
1995-10-20 17:26:40 +00:00
David Greenman
dfd651579c Added a -D option to set the TCP_NODELAY socket option. This improves
responsiveness at the expense of some additional network traffic.
1995-10-15 03:40:57 +00:00
Justin T. Gibbs
f4390542d7 Kerberos can now deal with multi-homed clients.
Kerberos obtains a network address for the local host from the routing
tables and uses it consistently for all Kerberos transactions.  This ensures
that packets only leave the *authenticated* interface.  Clients who open
and use their own sockets for encrypted or authenticated correspondance
to kerberos services should bind their sockets to the same address as that
used by kerberos.  krb_get_local_addr() and krb_bind_local_addr() allow
clients to obtain the local address or bind a socket to the local address
used by Kerberos respectively.

Reviewed by: Mark Murray <markm>, Garrett Wollman <wollman>
Obtained from: concept by Dieter Dworkin Muller <dworkin@village.org>
1995-10-05 21:30:21 +00:00
Nate Williams
c68c38c86b This is a FreeBSD manpage, not a NetBSD manpage. :) 1995-10-05 05:16:52 +00:00
Andrey A. Chernov
12e35e512e Build secure telnetd if available and allowed 1995-09-29 19:47:51 +00:00
Bruce Evans
9987ab26d8 Fix SRCS (.c's were .o's) so that `make depend' works. 1995-09-28 17:33:16 +00:00
Nate Williams
6f5457454c Make the error message more readable when 'ld.so' cannot locate a needed
shared library.  Formerly, the message looked like this:

    ld.so: run: libjdp1.so.1.0: Undefined error: 0

The new message looks like this:

    ld.so: run: Can't find shared library "libjdp1.so.1.0"

(Where "run" is the name of the program being executed.)

Submitted by:	jdp@polstra.com (John Polstra)
1995-09-27 23:17:33 +00:00
Nate Williams
e1ec3d8b3c Fixup the "ld.so failed" message for the case when ld.so finds undefined
symbols.

An easy example to see this is to develop an X program which links
against Xt, but doesn't add -lX11 to the link line.  It will link fine,
but cause run-time errors by ld.so because of missing symbols used by Xt
defined in X11.  This patch makes the errors more readable.

Submitted by:   jdp@polstra.com (John Polstra)
1995-09-27 23:14:08 +00:00
David Greenman
430ff9b689 Fixed bug introduced with the change of startslave()...two arguments
were chopped off of the function call and garbage was passed instead.
The solution involves making some variable globals as well as fixing the
call to have all the arguments.
1995-09-11 20:54:49 +00:00
Paul Traina
b74fc1026f Move erase cleanup outside linemode conditional 1995-09-06 02:03:36 +00:00
Paul Traina
e22b1cd1ca Properly set the erase character for the login prompt.
Submitted by:	John Capo <jc@irbs.com> & Peter Wemm
1995-09-05 17:38:31 +00:00