Commit Graph

798 Commits

Author SHA1 Message Date
markm
3290d0db4d Fix for new Kerberos4. Make a fist cut at PAM-ising while I'm here. 1999-09-19 22:05:32 +00:00
mharo
d97b5b4d32 When a STAT command is sent to ftpd as an out-of-band transmission during
a file transfer, the command was mishandled on every other receipt of the
command.

PR:		13261
Submitted by:	Ian Lepore <ian@plutotech.com>
1999-09-12 01:27:46 +00:00
markm
1a4d710930 Fix more Common Error brokenness. 1999-09-06 20:18:44 +00:00
markm
e67a6313e8 Add common error lib for the Kerberos case. 1999-09-06 06:32:02 +00:00
jdp
cc0f9ff2f5 Make jdk-1.1.8 work again. It turns out that some code inside
libjava peeks into the dynamic linker's private Obj_Entry structures.
My recent changes introduced some new members near the front of
the structures, causing libjava to get the wrong fields.  This commit
moves the new members toward the end of the structure so that the
layout of the portion that is relevant to JDK remains the same as
before.

I will work with the JDK porting team to see if we can come up with
a less fragile way for them to do what they need to do.  I understand
the current approach was necessary in order to work around some
limitations of the dynamic linker.  Maybe it's not necessary any
more.
1999-09-05 21:12:53 +00:00
jdp
bc43c4e07b Enable -Wformat checking for debug_printf(). 1999-09-04 20:36:27 +00:00
jdp
74f0e38f17 Change the warning about unrecognized entries in the dynamic table
to a debug message which is disabled in production builds of the
dynamic linker.  The condition warned about is normally harmless.

PR:		bin/12849
1999-09-04 20:14:48 +00:00
jdp
72d7b993cf When looking up symbols, search the objects loaded at program start
up first -- before the dlopened DAGs containing the referencing
object.

This makes dynamically loaded perl modules work properly again.
1999-09-04 04:00:09 +00:00
jdp
848a374d79 Get the actual pathname of the dynamic linker from the executable's
PT_INTERP program header entry, to ensure that gdb always finds
the right dynamic linker.

Use obj->relocbase to simplify a few calculations where appropriate.
1999-08-30 01:54:13 +00:00
jdp
b4e6b734d3 When checking to see if a shared object is already loaded, look for
a device/inode match if no pathname match is found.
1999-08-30 01:50:41 +00:00
jdp
18f468e8be Revamp the symbol lookup algorithm to cope better with objects
loaded separately by dlopen that have global symbols with identical
names.  Viewing each dlopened object as a DAG which is linked by its
DT_NEEDED entries in the dynamic table, the search order is as
follows:

  * If the referencing object was linked with -Bsymbolic, search it
    internally.
  * Search all dlopened DAGs containing the referencing object.
  * Search all objects loaded at program start up.
  * Search all objects which were dlopened() using the RTLD_GLOBAL
    flag (which is now supported too).

The search terminates as soon as a strong definition is found.
Lacking that, the first weak definition is used.

These rules match those of Solaris, as best I could determine them
from its vague manual pages and the results of experiments I performed.

PR:		misc/12438
1999-08-30 01:48:19 +00:00
jdp
042137c9ea When honoring -Bsymbolic, still keep searching if only a weak
definition was found in the referencing object.
1999-08-30 01:25:38 +00:00
jdp
1dfbc06c79 Simplify the logic in find_symdef(). 1999-08-30 01:24:08 +00:00
mpp
08e72288bf Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR:		docs/13418
Submitted by:	Alexey Zelkin <phantom@cris.net>
1999-08-28 23:10:20 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
peter
673d35729a unifdef -DINTERNAL_LS - it's too useful to be off by default. If anyone
really dislikes this, we could add a switch to disable it at runtime and
check in popen.c.
1999-08-26 00:45:36 +00:00
imp
d0cf6388a3 Ufff. cflags -> chflags. I could have sworn this change has been in
my last three successful make buildworlds...

Noticed by: phk
1999-08-21 20:54:40 +00:00
imp
20c94656c5 Remove all flags from devices before we try to assert ownership and
set permissions.

Bug not fixed:
	We silently ignore failures of chflags, chmod and chown.
1999-08-21 18:15:55 +00:00
jdp
1323dfb72b Add a NULL pointer check whose absence could cause segmentation
violations in certain obscure cases involving failed dlopens.  Many
thanks to Archie Cobbs for providing me with a good test case.

Eliminate a block that existed only to localize a declaration.
1999-08-20 22:33:44 +00:00
jkh
e04a075bf4 Back out previous commit - it's not necessary now that tty.h properly includes
the queue macros.
1999-08-09 07:51:03 +00:00
green
8be258942d Add a missing include (sys/queue.h for sys/tty.h SLIST usage.) 1999-08-09 02:19:38 +00:00
stark
38f15418dd Correction to previous commit. 1999-08-08 07:23:12 +00:00
stark
3d027f9fed Corrected mistake that was causing daemon to loop without serving
user requests.  Note that nothing can be said about the value of 'user'
unless User != NULL.
1999-08-08 07:05:46 +00:00
jdp
ab1b9caa66 Change many asserts into normal errors. They were all for conditions
caused by invalid shared objects rather than by internal errors.

Enable format string mismatch checking for _rtld_error().
1999-07-18 00:02:19 +00:00
jdp
83b97458dd Change the symbol used to find the end of an object's address space
from "end" to "_end".  The former does not exist in most shared
libraries.  This fixes problems in dladdr() and dlsym(RTLD_NEXT, ...).
1999-07-14 04:09:11 +00:00
mpp
7912840a2b Fix a couple of typos.
PR:		12610
Submitted by:	Seth <seth@freebie.dp.ny.frb.org>
1999-07-12 18:37:48 +00:00
dfr
a5b5a62db4 Add code to 'handle' R_ALPHA_NONE relocations by ignoring them. 1999-07-12 07:54:45 +00:00
jdp
f1d6b4fb32 Add a MAINTAINER line naming myself. We control the vertical. We
control the horizontal.
1999-07-09 16:27:43 +00:00
jdp
2e4c2d155e Fix bug: if a dlopen() failed (e.g., because of undefined symbols),
the dynamic linker didn't clean up properly.  A subsequent dlopen()
of the same object would appear to succeed.

Another excellent fix from Max Khon.

PR:		bin/12471
Submitted by:	Max Khon <fjoe@iclub.nsu.ru>
1999-07-09 16:22:55 +00:00
jdp
eccca16b3f Shake hands with GDB a little bit earlier so that it is possible to
debug the init functions.

Submitted by:	dfr
1999-07-03 23:54:02 +00:00
mpp
08f385247d Update the SYNOPSIS to reflect that the -l option can be specified
more than once.

Pointed-out-by: sheldonh
1999-06-28 10:50:47 +00:00
jdp
86ed7099cb Fix a reference counting problem when using dlopen(NULL, ...).
PR:		bin/12129
1999-06-25 04:50:06 +00:00
jdp
5ab77d8d27 Fix a serious performance bug for large programs on the Alpha,
discovered by Hidetoshi Shimokawa.  Large programs need multiple
GOTs.  The lazy binding stub in the PLT can be reached from any of
these GOTs, but the dynamic linker only has enough information to
fix up the first GOT entry.  Thus calls through the other GOTs went
through the time-consuming lazy binding process on every call.

This fix rewrites the PLT entries themselves to bypass the lazy
binding.

Tested by Hidetoshi Shimokawa and Steve Price.

Reviewed by:	Doug Rabson <dfr@freebsd.org>
1999-06-25 02:53:59 +00:00
peter
40c0ae945c Identify illegal switches, don't print them as '?' in the error.. 1999-05-18 05:51:09 +00:00
wpaul
ebce373f7e Fix ypxfr so that it can be run from cron.
Patch submitted by: Dan Nelson <dnelson@emsphone.com>
1999-05-10 20:55:29 +00:00
ghelmer
6c58e4987d Add missing -A option to SYNOPSIS.
PR:		docs/10771
1999-05-04 19:42:01 +00:00
imp
945fc2a1a0 More egcs warning fixes:
o main returns int not void
	o use return 0 at end of main when needed
	o use braces to avoid potentially ambiguous else
	o don't default to type int (and also remove a useless register
	  modifier).

Reviewed by: obrien and chuckr
1999-04-25 22:23:38 +00:00
jdp
072c9803b2 Back out my change from 6 April PDT that added a new dlversion()
function.  It was an ill-considered feature.  It didn't solve the
problem I wanted it to solve.   And it added Yet Another Version
Number that would have to be maintained at every release point.
I'm nuking it now before anybody grows too fond of it.
1999-04-22 01:54:38 +00:00
jdp
e2d9e4f987 After relocating the main program, but before calling any of the
_init() functions, initialize the global variables "__progname" and
"environ".  This makes it possible for the _init() functions to call
things like getenv() and err().
1999-04-21 04:06:57 +00:00
jdp
1723187361 The ELF specification says that the RPATH in the executable or
shared object takes precedence over LD_LIBRARY_PATH.  Make the
dynamic linker do it that way.
1999-04-09 06:42:00 +00:00
jdp
3ca4129b7d Eliminate all machine-dependent code from the main source body and
the Makefile, and move it down into the architecture-specific
subdirectories.

Eliminate an asm() statement for the i386.

Make the dynamic linker work if it is built as an executable instead
of as a shared library.  See i386/Makefile.inc to find out how to
do it.  Note, this change is not enabled and it might never be
enabled.  But it might be useful in the future.  Building the
dynamic linker as an executable should make it start up faster,
because it won't have any relocations.  But in practice I suspect
the difference is negligible.
1999-04-09 00:28:43 +00:00
brian
3952a292dd Determine the host name using an array size of
MAXHOSTNAMELEN and call trimdomain() before implementing
the -u option.

This allows local hosts of a lan with a long domain name to
appear properly in utmp by base host name (w/o domain) rather
than by IP number.
1999-04-08 21:36:27 +00:00
brian
ba101cbc29 Really fix -u.... 1999-04-07 08:39:54 +00:00
brian
3794629aa4 Ensure that things returned by gethostname() and
friends are terminated and allow for a maximum
host name length of MAXHOSTNAMELEN - 1.
Put parenthesis around sizeof args.
Make some variables static.
Fix telnetd -u (broken by my last commit)

Prompted by: bde
1999-04-07 08:27:45 +00:00
brian
16c492fa93 Fix the size of rhost, don't forget to NUL terminate
it and use brackets for sizeof.
Requested by: bde
1999-04-07 06:00:22 +00:00
jdp
14c2ca1dbb Fix a couple of typos in comments. 1999-04-07 02:48:43 +00:00
jdp
fed809049f Add a new function dlversion() which returns the version number of
the dynamic linker in the same form as __FreeBSD_version.  This is
mainly intended for checking the dynamic linker version during a make
world.
1999-04-07 02:43:11 +00:00
brian
950e07be1f Link with libutil 1999-04-06 23:40:25 +00:00
brian
86a9f98333 Use realhostname() rather than various combinations of
gethostbyaddr() & gethostbyname().

Remove brokeness in ftpd for hosts of MAXHOSTNAMELEN length.
1999-04-06 23:06:00 +00:00
brian
f22725557b After receiving a connection and doing a reverse
lookup on the incoming IP, do a forward lookup on
the result and make sure that the IP is in the
resulting list.  If it's not, put the IP number
in utmp/wtmp instead of the rogue name.

Stolen from: rlogind
Suggested by: sef
1999-04-06 00:29:41 +00:00
jdp
d0e7d2aafe Resolve undefined weak references to a value of 0. This solves the
"__deregister_frame_info" problem that was seen when combining a
program linked using the old gcc with shared libraries that were
built using egcs.
1999-04-05 02:36:40 +00:00
peter
5d5c9b046d If somebody does an execv("foo", NULL) (which theoretically is an error),
avoid crashing inside rtld (since it's easy) since everything else handles
it.  Of course, if the target program checks argv[], it'll fall over.

Reviewed by:	jdp
1999-04-04 06:01:09 +00:00
peter
dfef9d33c9 Add an 'al' (autologin username) capability to getty/gettytab. This is a
damn useful thing for using with serial consoles in clusters etc or secure
console locations.  Using a custom gettytab entry for console with
an entry like 'al=root' means that there is *always* a root login ready on
the console.  This should replace hacks like those which go with conserver
etc.  (This is a loaded gun, watch out for those feet!)

Submitted by:  "Andrew J. Korty" <ajk@purdue.edu>
1999-04-04 04:36:50 +00:00
joerg
a8b65d01a4 Ignore empty usernames, and repeat the login: prompt in this case.
There's not much point in having uucpd behave differently than
login(1) for this, and now uucpd is compatible to the default chat
script of Taylor UUCP which sends a single \r at first.

While i was at it, added a few strategic ``errno = 0;''s, so at least
an `Undefined error 0' will be returned for things like a closed
connection while reading the login ID or password, as opposed to an
even more bogus thing like `No such file or directory'.
1999-03-30 10:23:35 +00:00
nate
5b778b1b78 - Commit the correct dladdr() implementation.
Reviewed by:	jdp@FreeBSD.org <This is the version he reviewed!>
1999-03-24 23:47:29 +00:00
nate
0879092ae7 - Added dladdr(3) support.
Reviewed by:	jdp@FreeBSD.org
1999-03-24 23:37:35 +00:00
brian
9cc9bbf16e Set the CPU resource limit back to infinity before exec()ing PP.
PR:	10399
1999-03-09 22:04:44 +00:00
fenner
bcb8a8bf5f Clean up some .Os macro uses: quotes are not needed, multiple arguments
don't really work if the first one isn't "FreeBSD", and "FreeBSD-Experimental"
isn't an OS name.
1999-02-15 08:34:14 +00:00
nate
46834a8536 - Set the system immutable flag when installing ld.so to avoid people
accidentally clobbering it.

Submitted by:	numberous people on -current
1999-02-15 05:02:54 +00:00
asami
f3868ac8c6 Oops, I missed a few more /etc/nologin references yesterday. It appears
my check of the tree was incomplete.  Sorry guys.

Reported by:	Ben Smithurst <ben@scientia.demon.co.uk>
1999-01-12 14:09:23 +00:00
peter
43d6c9bdd7 As previously threatened, clean up the rshd -a option and make it default
on rshd and rlogind.  However, note that:
1: rshd used to drop a connection with -a if the hostname != ip address.
   This is unneeded, because iruserok() does it's own checking.
   It was also wrong if .rhosts had an explicit IP address in it,
   connections would be dropped from that host solely because the DNS was
   mismatched even though it was explicitly intended to work by IP address.
2: rlogind and rshd check the hostname mappings by default now because that
   is what goes into the utmp/wtmp and logs.  If the hostname != ip address,
   then it uses the IP address for logging/utmp/wtmp purposes.  There isn't
   much point logging ficticious hostnames.
3: rshd -a is now accepted (but ignored) for compatability.  If you really
   want to make life miserable for people with bad reverse DNS, use tcpd in
   paranoid mode (which is questionable anyway, given DNS ttl tweaking).
1998-12-16 07:20:45 +00:00
peter
2037fae0b2 Old stuff laying around: Don't use a function called getstr(), that has
nasty consequences when the system curses is ncurses as this conflicts
with a ncurses funciton and causes recursion.
1998-12-16 06:04:29 +00:00
eivind
e4da10eed0 Block for buffer overflow. 1998-12-13 21:02:28 +00:00
dillon
fb4bfa26bb PR: bin/9031
Changed unbounded strcpy() to snprintf() to fix buffer overrun exploit
1998-12-12 20:56:53 +00:00
bde
fea18eb3bc Fixed long line in previous commit. 1998-12-03 05:45:18 +00:00
billf
cb5e048b7b Update to correctly reflect the default values of
net.inet.ip.portrange.hifirst and net.inet.ip.portrange.hilast

PR:		docs/6745
Submitted by:	Masachika Ishizuka <ishizuka@ish.org>
1998-12-02 22:11:02 +00:00
dg
3016a9e716 Added a -D option to turn on TCP_NODELAY. 1998-12-01 23:27:24 +00:00
dillon
494ff12a54 Reviewed by: freebsd-current, freebsd-security
Removed getuid() root check so ntalkd can be run from a tty sandbox.
    It isn't suid root anyway, who knows why the getuid() check was even
    in there in the first place!
1998-12-01 21:12:57 +00:00
dfr
d494c31af1 Use the runpath of the main program for locating libraries loaded by
dlopen().

Reviewed by: jdp
1998-11-27 21:19:52 +00:00
jdp
f21429fd93 Find "klogin.c" in "src/lib/libpam/modules/pam_kerberosIV" instead
of in "src/usr.bin/login".  The latter instance is going away.  As
soon as ftpd is PAMized, it won't need to use klogin.c at all.
1998-11-21 02:11:16 +00:00
dima
11207334ba Enable named-xfer and rbootd for alpha. 1998-11-10 06:50:35 +00:00
jdp
c2e4cecfcd Fix a bug in the handling of minor version numbers. Formerly, the
rtld would accept the first shared library it found with the right
major version number, even if the minor version number was too low.
If a different version of the shared library with an adequate minor
version number appeared later in the search path, it would not be
found.

Now the rtld searches all locations first looking for a library
with a minor version that is high enough.  Only if such a library
is not found will it fall back to accepting a minor version number
that is too low.  As before, a warning comes out in that case.

This solves some problems encountered when building an older world
on a -current system.
1998-11-07 01:59:39 +00:00
dg
3817691886 Rename a function name so that it doesn't conflict with a future system call. 1998-10-30 16:17:50 +00:00
des
3ff517c5c8 Set the user context correctly so that cd ~ does the right thing.
PR:		bin/7943 bin/8293
Submitted by:	Bill Fenner <fenner@parc.xerox.com>
Approved by:	jkh
1998-10-13 20:42:01 +00:00
jdp
db2840b038 Fix a bug in dlclose that broke the apache13 port. The list of
loaded objects wasn't being maintained properly.
1998-10-13 03:31:59 +00:00
jkh
639b1d931e This thing has its own puts function, so use it.
Submitted by:	Matthew Jacob <mjacob@nas.nasa.gov>
1998-10-08 23:14:02 +00:00
ken
614c235f78 Fix a memory leak in rpc.rstatd that shows up when it's run in standalone
mode.  (i.e., not from inetd)

PR:		bin/8212
1998-10-08 19:59:40 +00:00
alex
5bdd606449 Added double quotes around CHMOD description to prevent garbled output.
PR:		8094
Submitted by:	Christoph Weber-Fahr <wefa@callcenter.systemhaus.net>
1998-09-29 22:02:06 +00:00
jdp
eeb13953e9 Make LD_PRELOAD work for ELF. 1998-09-22 02:09:56 +00:00
obrien
04be6dc763 Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:06 +00:00
dfr
2ace007d74 Work around an alpha compiler bug.
Reviewed by: Kenneth D. Merry <ken@plutotech.com>
1998-09-16 21:33:14 +00:00
jdp
39ca3db720 Fix a bug that showed up when debugging dynamically linked programs.
References from GDB to "printf" and various other functions would
find the versions in the dynamic linker itself, rather than the
versions in the program's libc.  This fix moves the GDB link map
entry for the dynamic linker to the end of the search list, where
its symbols will be found only if they are not found anywhere else.
It was suggested by Doug Rabson, though I implemented it a little
differently.

I personally would prefer to leave the dynamic linker's entry out
of the GDB search list altogether.  But Doug argues that it is
handy there for such things as setting breakpoints on dlopen().
So it stays for now, at least.

Note, if we ever integrate the dynamic linker with libc (which has
several important benefits to recommend it), this whole problem
goes away.
1998-09-16 02:54:08 +00:00
jdp
04cd93fac8 Make the pathname pointed to by the Obj_Entry structure for the
dynamic linker itself dynamically allocated.  All of them are
supposed to be dynamically allocated, but we cheated before.  It
made gdb unhappy under some circumstances.
1998-09-15 21:07:52 +00:00
gibbs
1b53fcd958 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
		mike@smith.net.au (Mike Smith)
1998-09-15 08:15:30 +00:00
dfr
f6827e3b6c Update to the binutils-2.9.1 PLT format. 1998-09-11 18:31:55 +00:00
dfr
6612fb5072 Add the r_addend of the relocation when processing GLOB_DAT relocations. 1998-09-11 18:30:55 +00:00
dfr
e4d9383fcc Fix a cut&paste error which prevented LD_BIND_NOW from working. 1998-09-08 09:47:35 +00:00
jdp
ffbea3c142 Don't recognize a file as an a.out shared library unless it has at
least 2 version numbers.  This fixes the bug where the dynamic
linker would try to load an ELF shared library if it found one.

Note, this change also fixes the same thing in "ld", because the
code is shared.

For "ld" there is still a problem with ".a" libraries, which cannot
be distinguished by name.  I haven't decided what, if anything, to
do about that.
1998-09-05 20:28:48 +00:00
jb
bebafb1654 Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98.
Remove a couple of unsupported machines.
1998-09-05 08:33:10 +00:00
jb
03356e5274 Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98. 1998-09-05 08:31:10 +00:00
jdp
223720d306 Implement ldconfig functionality for ELF. The hints are stored in
a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints".
These hints consist only of the directory search path.  There is
no hash table as in the a.out hints, because ELF doesn't have to
search for the file with the highest minor version number.  (It
doesn't have minor version numbers at all.)

A single run of ldconfig updates either the a.out hints or the ELF
hints, but not both.  The set of hints to process is selected in
the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout"
or "-elf" command line option.  The rationale is that you probably
want to search different directories for ELF than for a.out.

"ldconfig -r" is faked up to produce output like we are used to,
except that for ELF there are no minor version numbers.  This should
enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports
even for ELF.

I implemented the ELF functionality in a new source file, with an
eye toward eliminating the a.out code entirely at some point in
the future.
1998-09-05 03:31:00 +00:00
jb
6c8bd8f8ef Add -lcrypt when building kerberos. 1998-09-05 00:32:27 +00:00
jb
f872545ef0 Enable rtld-elf for build on alpha too. We now have support for shared
libraries on alpha!
1998-09-04 22:55:17 +00:00
dfr
61d8f0b0b1 Add alpha support.
Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me)
Obtained from: Probably NetBSD
1998-09-04 19:03:57 +00:00
jdp
bb404e6bbf Suppress duplicate entries in ldd output. 1998-09-02 02:51:12 +00:00
jdp
9bf76278fc Style fixes. If it seems like a lot of lines of changes, it's
because I moved some functions.  Mr. Tidy likes them to be in
alphabetical order.
1998-09-02 02:00:20 +00:00
jdp
649f889aaf Handle dlsym(NULL, ...) properly, by searching in the caller's
shared object.  Note, this searches _only_ that object, and not its
needed objects, in accordance with the documentation.

Also fix dlopen(NULL, ...) so that the executable's needed objects
are searched as well as the executable itself.
1998-09-02 01:09:34 +00:00
wosch
a024876276 Sort cross references. 1998-08-31 16:41:09 +00:00
jb
ad07d4a0af BINFORMAT -> OBJFORMAT ready for E-day. 1998-08-30 01:57:55 +00:00
mckay
d0b73b3b1b Pass me the pointy hat with the extra sequins. Just a moment, while I get
it to sit right...

The __error() hack gave out the wrong address.  It returned the address of
errno in ld.so instead of the address of errno in the main program.  Oops.

The hack is now correct, just in time to be obsoleted by elf.
1998-08-22 15:51:41 +00:00
jb
eb522a9455 Update this header to use the revamped elf headers which select Elf32
or Elf64 based on the inclusion of the machine dependent header.

I've left the addition of the extra fields to handle the relocation
structures with addend for a separate commit after jdp has had a chance
to review what I've done. The current change is needed to compile
csu/alpha/crt1.c
1998-08-21 03:29:40 +00:00
jdp
ba5269475b Add "-C" to INSTALLFLAGS to install atomically. An elf->elf
installworld dies at this point otherwise, leaving the system
without a dynamic linker.
1998-08-17 04:59:15 +00:00
markm
57b61e8f72 Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
peter
614c5aca56 Build mail.local and smrsh (when building sendmail) 1998-08-04 15:32:43 +00:00
peter
2ae39b6062 Build sendmail-8.9.1 smrsh 1998-08-04 15:31:31 +00:00
peter
b468bf2ae3 Use sendmail-8.9.1 mail.local (with our changes). It has LMTP support. 1998-08-04 15:30:17 +00:00
bde
fdf039c199 Fixed printf format errors. 1998-08-02 16:44:18 +00:00
phk
6043c98f63 Getty is missing the speed table entry for 230400 baud.
PR:		7280
Reviewed by:	phk
Submitted by:	Craig Leres <leres@ee.lbl.gov>
1998-07-22 05:57:22 +00:00
steve
eca8e681f8 Remove no longer needed FreeBSD specific code.
PR:		5497
Submitted by:	Jacob Bohn Lorensen <jacob@jblhome.ping.mk>
Obtained from:	OpenBSD (indirectly it seems so just to be safe)
1998-07-20 04:52:26 +00:00
jkoshy
0fc0040fdc Document the use of lines beginning with a '#' as comment lines.
PR: 5676
1998-07-09 11:38:21 +00:00
jkoshy
8dc7ded82e Clean up grammar. Provide proper pathnames for spool directories.
Document dependency on current load average for starting new batch jobs.

PR: 7109
1998-07-01 05:47:58 +00:00
bde
531465c9e6 Fixed printf format errors. 1998-06-30 15:19:51 +00:00
bde
ab05e68061 Don't assume that time_t is long. 1998-06-29 17:06:00 +00:00
bde
046bf17a6b Don't assume that time_t is long. Fixed printf format errors. 1998-06-29 16:47:08 +00:00
mckay
478200d356 Since I got no objections to this patch, and no one has offered any
alternative, I present .. ta! da! .. the __error() hack.

This patch to the a.out dynamic loader provides old a.out binaries
with __error() if they are linked with an older libc that lacks it,
but are also linked against a library that needs it.

There is a smaller, tricker hack that takes advantage of the fact
that ld.so has __error() too, courtesy of the new libc, but this
hack is the straightforward version.
1998-06-21 14:22:29 +00:00
peter
7f08ebd518 Fix stupid typo, I had only tested this in elf mode. 1998-06-12 19:45:14 +00:00
peter
d74499329c Only build rtld-aout if we're in an a.out build environment. 1998-06-12 16:09:33 +00:00
peter
74a7bc6597 Activate libbind 1998-06-11 09:17:58 +00:00
phk
306618399a Spelling fixes.
PR:		6903
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
brian
55965d83a4 Search for libraries in dlopen() when the specified path
contains no ``/''s.
Elf already searches it seems.
Mostly submitted by: Mike Smith <mike@smith.net.au>
1998-06-07 03:53:08 +00:00
jb
5a00ef6309 named-xfer can't be linked static due to the duplicated symbols in
libc and libbind.

rpc.rstatd required libkvm.

Only try to build these on i386 for the time being.
1998-06-06 07:09:01 +00:00
jkoshy
d7a9959d8d Mention that syslog.conf(5) does not log LOG_FTP messages by default.
PR: 5287
1998-06-05 10:31:24 +00:00
joerg
d5fe0276dd Use gethostname(3) to obtain the local host name, as opposed to uname(3).
Otherwise the length of the name is limited to 32 characters only.
1998-06-03 20:01:28 +00:00
jb
3613b8e4e0 signal() returns SIG_ERR on error, not int.
time() requires a time_t pointer, not a long.
1998-06-03 11:33:44 +00:00
jkoshy
50fa01edd2 Spelling corrections.
PR: 6829
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-03 04:21:41 +00:00
peter
fdb5eaa21e SUBDIR += rtld-aout 1998-06-01 14:33:06 +00:00
peter
8e01f767c7 Seperate the Paul Kranenburg a.out rtld stuff into a stand-alone area away
from the gpl ld code.  This is part 2 of something that I began in 1996.
A repository copy has happened behind cvs's back.
1998-06-01 13:00:32 +00:00
sos
d721e2b3d6 ELF preparation step 2:
Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...
1998-05-26 20:12:56 +00:00
steve
0440c8d7dd Make ftpd(8) honor its default group setting in the config files.
PR:		6682
Submitted by:	Max Euston <meuston@jmrodgers.com>
1998-05-25 03:45:35 +00:00
ache
e5618d9c47 Back out "always UTC" fix since some people want visually identical 'ls'
output for local users. FTP protocol RFC also says that 'ls' output is
not machine-readable. "always UTC" still possible with TZ= in ftpd
environment by price of having UTC in log files too.

Fix INTERNAL_LS to sense new /etc/localtime after chroot
1998-05-18 00:06:28 +00:00
ache
cbf681e617 Return back initial tzset() must be before first chroot 1998-05-16 21:23:33 +00:00
ache
4f62e1acde Return back vfork and use execve with TZ="" environment in vfork case 1998-05-15 16:51:06 +00:00
ache
3a9a1a3486 Use fork instead of vfork since setenv clobber parent environment
Fork already used for INTERNAL_LS in anycase
1998-05-15 16:30:09 +00:00
ache
04888d021e Move TZ="" assignment just before exec to not touch other time stuff 1998-05-15 16:08:52 +00:00
ache
4ca333f904 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
jb
ff02009c11 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
jb
43347b0407 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
bde
4b408b42d7 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
rnordier
92afefeb0b Replace _exit() with exit()
Pointed out by: Nathan Torkington <gnat@prometheus.frii.com> PR 5585
1998-05-05 00:28:51 +00:00
rnordier
46a3ce617a Fix typo.
Pointed out by: Junji SAKAI <sakai.jp.freebsd.org> PR 5621
1998-05-05 00:12:01 +00:00
bde
7746dc49bf Simplified by using new yacc rules and by not generating y.tab.h. 1998-05-04 18:20:18 +00:00
peter
1c2afda8cf 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
91b45ff170 Clarify use of 'if' capability.
PR:		6499
Submitted by:	Doug Barton <Studded@san.rr.com>
1998-05-04 02:37:29 +00:00
steve
7e4a22c718 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
dfr
c97988bb9c Add support for ldd. 1998-05-01 08:39:27 +00:00
dfr
fb4b627fd3 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
dg
18da8f9801 Set TCP_NODELAY on the control channel to improve performance a bit. 1998-04-28 03:37:23 +00:00
dg
5b2c685f2a 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
phk
7fb3aa582e 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
stark
2ca484c0f3 PR: misc/4679
Submitted by:	Glen Foster (gfoster@gfoster.com)
Fix missing "/" in dump file pathname.
1998-04-18 13:37:24 +00:00
phk
06b26864f6 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
charnier
dc3901b8d6 .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq. 1998-03-19 07:37:43 +00:00
charnier
b4bda38057 .Sh AUTHOR -. .Sh AUTHORS. Use .An/.Aq. 1998-03-19 07:37:22 +00:00
jdp
73958e96ea Enable rtld-elf when building an ELF system on the i386. 1998-03-07 19:43:48 +00:00
jdp
80858b4054 This commit was generated by cvs2svn to compensate for changes in r34192,
which included commits to RCS files with non-trunk default branches.
1998-03-07 19:24:35 +00:00
jdp
d75383fd3d 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
jdp
350f58aa8f 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
danny
c7d0f49ada 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
771117d6ae Make ftpd log IP-addresses in addition to hostnames. 1998-02-24 08:45:57 +00:00
obrien
5999c586e0 MFS. 1998-02-18 10:53:16 +00:00
jdp
a1b356b0ca Implement dladdr. 1998-02-06 16:46:46 +00:00
charnier
a3a257c23c Convert to mdoc. Header -> Id. Typo. 1998-02-03 07:30:22 +00:00
phk
b5cf5f2e84 Remove lfs_cleanerd 1998-01-30 12:36:10 +00:00
phk
ee8d261a8f Disable lfs_cleanerd 1998-01-30 12:35:10 +00:00
bde
e9aff89bee 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
wpaul
7026fff7f5 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
bde
75271c7114 Removed most unused includes of <net/if_var.h> outside the kernel. 1998-01-16 17:38:56 +00:00
charnier
f51e7fa399 Add missing dot. 1998-01-07 07:56:15 +00:00
charnier
9eb833992e 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
charnier
4b24ff256f Remove unused #include. Display if inetd started us in case of failure. 1998-01-07 07:51:00 +00:00
charnier
be2f5ef8c2 Typos. 1998-01-07 07:44:01 +00:00
max
c53a8357d4 Typo fix: bootgw -> bootpgw 1997-12-29 13:59:28 +00:00
imp
c7312ce4b2 style(9) nits
Submitted by:	bde
1997-12-26 23:36:43 +00:00
imp
a10f3f596e sprintf->snprintf paranoia
Obtained from: OpenBSD (?)
1997-12-24 19:39:57 +00:00
imp
2cab4ca6ce 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
imp
04325fa0d2 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
imp
b14c1dcaab Various sprintf -> snprintf fixes.
Minor style fix (strcpy(foo,"") -> *foo = '\0')
Obtained from:	OpenBSD(?)
1997-12-24 19:13:23 +00:00
imp
986d085dae Use snprintf rather than printf out of paranoia
Obtained from:	OpenBSD
1997-12-24 18:56:03 +00:00
charnier
fe0f17e13b Typo. 1997-12-18 07:39:27 +00:00
charnier
d955d50cf0 Cosmetic in usage string. 1997-12-15 07:19:41 +00:00
charnier
0a2811815e Use full path in synopsis. Sort #includes. Use .Tn for NIS. 1997-12-08 07:49:56 +00:00
charnier
15ac08a2b7 Sync with diffs I found in kerberised versions: -Wall, no `;' in macros. 1997-12-08 07:46:53 +00:00
jdp
310123882b 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
charnier
80226f89b8 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
charnier
e07b667488 Sort #includes. Add rcsid. Use full pathname in SYNOPSIS section. 1997-12-04 07:20:45 +00:00
steve
7d0ed7b367 FTP_INTERNAL_LS -> FTPD_INTERNAL_LS
Pointed out by:	Jaye Mathisen <mrcpu@cdsnet.net>
1997-12-04 03:58:02 +00:00
charnier
3f0e1c985b Use full path in synopsis. Syslog will add trailing \n. 1997-12-03 07:19:58 +00:00
charnier
b4c65bae04 Use err(3). Remove progname and trailing \n in syslog strings. 1997-12-03 07:16:08 +00:00
charnier
01b40a7c30 Use err(3). Add protos for -Wall. 1997-12-02 12:33:42 +00:00
charnier
156349cd73 No \n in syslog() strings. Add man page to Xrefs. Change null byte to NUL byte. 1997-12-02 12:30:04 +00:00
charnier
9540025bcc Do not terminate syslog() messages with a dot, as others daemons do. 1997-12-02 12:25:39 +00:00
charnier
854ad15b67 Document -n flag. Use err(3). Add usage.
Add syslog capability.
1997-12-02 12:20:17 +00:00
jdp
472128bc3f 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
charnier
334bd4b269 Use err(3). -Wall cleaning. cosmetics in man page. 1997-11-26 07:36:51 +00:00
charnier
b5211f460a Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page. 1997-11-26 07:34:56 +00:00
charnier
c65ec2723c Cosmetics in man page. Add rcsid and sort #includes. 1997-11-26 07:31:14 +00:00
charnier
fb5bb4fb5d Use err(3). -Wall cleaning. Use Pa for file names and add section in Xrefs. 1997-11-26 07:29:04 +00:00
charnier
567c2006a1 Sort #includes. Add rcsid. Add man page section in .Xrefs. 1997-11-25 07:17:15 +00:00
charnier
beac3ba1b0 Use warn(3). Hardcode progname instead of using argv[0]. Use Pa for file
name.
1997-11-25 07:14:34 +00:00
charnier
70fe45ba10 Add usage(), rcsids. 1997-11-24 07:33:42 +00:00