summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/ld/ldconfig/ldconfig.876
-rw-r--r--libexec/ld.so/ldconfig/ldconfig.86
2 files changed, 45 insertions, 37 deletions
diff --git a/gnu/usr.bin/ld/ldconfig/ldconfig.8 b/gnu/usr.bin/ld/ldconfig/ldconfig.8
index 685e86aeaee..d9b3e7be03c 100644
--- a/gnu/usr.bin/ld/ldconfig/ldconfig.8
+++ b/gnu/usr.bin/ld/ldconfig/ldconfig.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ldconfig.8,v 1.7 2002/07/26 20:17:21 pjanzen Exp $
+.\" $OpenBSD: ldconfig.8,v 1.8 2003/04/22 05:06:01 david Exp $
.\"
.\" Copyright (c) 1993,1995 Paul Kranenburg
.\" All rights reserved.
@@ -44,21 +44,22 @@
is used to prepare a set of
.Dq hints
for use by the run-time linker
-.Xr ld.so
+.Xr ld.so 1
to facilitate quick lookup of shared libraries available in multiple
-directories. It scans a set of built-in system directories and any
+directories.
+It scans a set of built-in system directories and any
.Ar directories
specified on the command line (in the given order) looking for shared
libraries and stores the results in the file
-.Xr /var/run/ld.so.hints
+.Pa /var/run/ld.so.hints
to forestall the overhead that would otherwise result from the
directory search operations
-.Xr ld.so
+.Xr ld.so 1
would have to perform to load the required shared libraries.
.Pp
The shared libraries so found will be automatically available for loading
-if needed by the program being prepared for execution. This obviates the need
-for storing search paths within the executable.
+if needed by the program being prepared for execution.
+This obviates the need for storing search paths within the executable.
.Pp
The
.Ev LD_LIBRARY_PATH
@@ -69,12 +70,12 @@ directories where shared libraries might be found.
is a
.Sq \:
separated list of directory paths which are searched by
-.Xr ld.so
-when it needs to load a shared library. It can be viewed as the run-time
-equivalent of the
+.Xr ld.so 1
+when it needs to load a shared library.
+It can be viewed as the run-time equivalent of the
.Fl L
switch of
-.Xr ld.
+.Xr ld 1 .
.Pp
.Nm
is typically run as part of the boot sequence.
@@ -82,55 +83,61 @@ is typically run as part of the boot sequence.
The following options are recognized by
.Nm ldconfig :
.Bl -tag -width indent
-.It Fl R
-Rescan the previously configured directories. This opens the hints file
-and fetches the directory list from the header. Any additional pathnames
-on the command line are also processed.
-.It Fl U
-Unconfigure directories specified on the command line or remove inaccessible
-directories from search path if no directories specified. This option cannot
-be used with
-.Fl m .
.It Fl m
Merge the result of the scan of the directories given as arguments into
-the existing hints file. The default action is to build the hints file
-afresh. This option cannot be used with
+the existing hints file.
+The default action is to build the hints file afresh.
+This option cannot be used with
.Fl U .
.It Fl r
List the current contents of
-.Xr ld.so.hints
-on the standard output. The hints file will not be modified.
+.Pa ld.so.hints
+on the standard output.
+The hints file will not be modified.
+.It Fl R
+Rescan the previously configured directories.
+This opens the hints file and fetches the directory list from the header.
+Any additional pathnames on the command line are also processed.
.It Fl s
Do not scan the built-in system directory
.Pq Dq /usr/lib
for shared libraries.
+.It Fl U
+Unconfigure directories specified on the command line or remove inaccessible
+directories from search path if no directories specified.
+This option cannot be used with
+.Fl m .
.It Fl v
Switch on verbose mode.
+.El
.Sh Security
Special care must be taken when loading shared libraries into the address
space of
.Ev set-user-Id
-programs. Whenever such a program is run,
-.Xr ld.so
+programs.
+Whenever such a program is run,
+.Xr ld.so 1
will only load shared libraries from the
-.Ev ld.so.hints
-file. In particular, the
+.Pa ld.so.hints
+file.
+In particular, the
.Ev LD_LIBRARY_PATH
-is not used to search for libraries. Thus, the role of
+is not used to search for libraries.
+Thus, the role of
.Nm
is dual.
In addition to building a set of hints for quick lookup, it also serves to
specify the trusted collection of directories from which shared objects can
-be safely loaded. It is presumed that the set of directories specified to
+be safely loaded.
+It is presumed that the set of directories specified to
.Nm
are under control of the system's administrator.
-.Xr ld.so
+.Xr ld.so 1
further assists set-user-Id programs by erasing the
.Ev LD_LIBRARY_PATH
from the environment.
-
.Sh FILES
-.Xr /var/run/ld.so.hints
+.Pa /var/run/ld.so.hints
.Sh SEE ALSO
.Xr ld 1 ,
.Xr link 5
@@ -138,4 +145,5 @@ from the environment.
A
.Nm
utility first appeared in SunOS 4.0.
-It appeared in its current form in NetBSD 0.9a.
+It appeared in its current form in
+.Nx 0.9 a.
diff --git a/libexec/ld.so/ldconfig/ldconfig.8 b/libexec/ld.so/ldconfig/ldconfig.8
index 74b5e6a0cd4..45d24781a49 100644
--- a/libexec/ld.so/ldconfig/ldconfig.8
+++ b/libexec/ld.so/ldconfig/ldconfig.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ldconfig.8,v 1.11 2002/08/28 14:06:47 mpech Exp $
+.\" $OpenBSD: ldconfig.8,v 1.12 2003/04/22 05:06:01 david Exp $
.\"
.\" Copyright (c) 1993,1995 Paul Kranenburg
.\" All rights reserved.
@@ -144,6 +144,6 @@ from the environment.
.Sh HISTORY
A
.Nm
-utility first appeared in SunOS 4.0, it appeared in its current form
-in
+utility first appeared in SunOS 4.0.
+It appeared in its current form in
.Nx 0.9 a.