Commit Graph

669 Commits

Author SHA1 Message Date
asmodai
dd4a1875d3 We do not support the -B option.
PR:		15925
Submitted by:	Thierry Herbelot
2000-01-12 14:49:38 +00:00
jdp
9fedb59544 Revamp the mechanism for enumerating and calling shared objects'
init and fini functions.  Now the code is very careful to hold no
locks when calling these functions.  Thus the dynamic linker cannot
be re-entered with a lock already held.

Remove the tolerance for recursive locking that I added in revision
1.2 of dllockinit.c.  Recursive locking shouldn't happen any more.

Mozilla and JDK users: I'd appreciate confirmation that things still
work right (or at least the same) with these changes.
2000-01-09 21:13:48 +00:00
phantom
a9d70c7d83 . mdoc(7)'fy
. add Xrs to hosts.equiv(5), auth.conf(5), services(5) to some pages
. sort Xrs in SEE ALSO sections

Patches based on PR:	docs/15680
Submitted by:		Christian Weisgerber <naddy@mips.rhein-neckar.de>
2000-01-07 13:14:32 +00:00
joe
e1558fa7cb Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.
1999-12-30 13:15:15 +00:00
jdp
57c807c1f1 Work around an assert failure in the dynamic linker's default thread
locking functions.  If an application loads a shared object with
dlopen() and the shared object has an init function which requires
lazy binding, then _rtld_bind is called when the thread is already
inside the dynamic linker.  This leads to a recursive acquisition
of the lock, which I was not expecting -- hence the assert failure.

This work-around makes the default locking functions handle recursive
locking.  It is NOT the correct fix -- that should be implemented
at the generic locking level rather than in the default locking
functions.  I will implement the correct fix in a future commit.

Since the dllockinit() interface will likely need to change, warn
about that in both the man page and the header file.
1999-12-28 04:38:17 +00:00
jdp
5cc87d66a8 Add a new function dllockinit() for registering thread locking
functions to be used by the dynamic linker.  This can be called by
threads packages at start-up time.  I will add the call to libc_r
soon.

Also add a default locking method that is used up until dllockinit()
is called.  The default method works by blocking SIGVTALRM, SIGPROF,
and SIGALRM in critical sections.  It is based on the observation
that most user-space threads packages implement thread preemption
with one of these signals (usually SIGVTALRM).

The dynamic linker has never been reentrant, but it became less
reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c".
Starting with that revision, multiple threads each doing lazy
binding could interfere with each other.  The usual symptom was
that a symbol was falsely reported as undefined at start-up time.
It was rare but not unseen.  This commit fixes it.
1999-12-27 04:44:04 +00:00
peter
96af418f42 Revert the libcrypt/libmd stuff back to how it was. This should not have
happened as it was working around problems elsewhere (ie: binutils/ld
not doing the right thing according to the ELF design).  libcrypt has
been adjusted to not need the runtime -lmd.  It's still not quite right
(ld is supposed to work damnit) but at least it doesn't impact all the
users of libcrypt in Marcel's cross-build model.
1999-12-18 13:55:17 +00:00
marcel
3239491159 Add libmd (or move it after libcrypt). We don't want the linker to be
smart because it will definitely get it wrong. This popped up during
cross-linking.
1999-12-16 10:55:45 +00:00
sheldonh
b870a5a3a1 Correct the ttys.5 and init.8 manpages with respect to the incorrect
assumption that only getty processes can be managed.  Describe the
SysV-like ability to keep arbitrary long-running processes alive
using a non-device first field in /etc/ttys.

PR:		12767
Submitted by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
1999-12-06 09:07:14 +00:00
peter
dc7b6163ba Reactivate named-xfer 1999-11-30 06:23:04 +00:00
peter
56b42f4c17 Move named and associated tools into a seperate makefile section and
disable them pending an import and cleanup of bind 8.2.2.p5.
1999-11-30 02:18:13 +00:00
brian
5c589c8862 Add a ``-P pidfile'' option 1999-11-23 00:21:20 +00:00
brian
3908331507 Enable pppoed 1999-11-21 23:39:51 +00:00
brian
a31981f1e9 pppoed(8) - a server to accept PPPoE connections 1999-11-21 23:39:14 +00:00
jdp
89c68d81c1 In revision 1.21 I changed the search order for shared libraries,
but I forgot to make the corresponding fix to the comment.  Rectify
that.

Submitted by:	Tony Finch <fanf@demon.net>
1999-11-19 04:45:07 +00:00
marcel
0e0e4d8e0a Fix bootpd for Alpha.
bptypes.h originally defined int32 to be of type long. This obviously
doesn't work on the Alpha. By defining int32 (and u_int32) in terms of
int32_t (and u_int32_t) it now is what it says it should be.

Two occurrences of 'unsigned int32' have been changed to 'u_int32' for
consistency.

Submitted by: Wilko Bulte <wilko@yedi.iaf.nl>
1999-11-12 10:11:48 +00:00
eivind
0ddfb286de Log username with password failure.
This has proved useful in real life installations.
1999-11-06 20:58:44 +00:00
markm
674950c77d Allow for a telnet in secure/ (SRA telnet). 1999-10-07 20:04:17 +00:00
alfred
e73df8be95 sync with netbsd PR 8534, fix undefined C code.
Pointed out by: David A. Holland
1999-10-07 08:41:55 +00:00
phantom
99934efdb9 .Nm += "rtld"
apropos(1) now knows about rtld(1) manpage.
1999-09-28 05:35:59 +00:00
phantom
34985ba96d Correct spelling : ascii -> ASCII
PR:		docs/13702
Submitted by:	Stephen J. Roznowski <sjr@home.com>
Reviewed by:	mpp
1999-09-20 09:15:23 +00:00
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