summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorskrll <skrll@NetBSD.org>2001-11-02 15:28:36 +0000
committerskrll <skrll@NetBSD.org>2001-11-02 15:28:36 +0000
commitaabfabf3e73dc7a20bb6f8132d870dcf1dc29db2 (patch)
tree99993aa2a158aa5e06fe8d1d768c928c0019b8fa /libexec
parentd1ff85c9aa3f2648b2459c1a921f179a503a9c7d (diff)
Allow both space and colon as a separator in LD_PRELOAD. Document this and
the fact that space may be retired in the future. Closes misc/11961 Reviewed by christos
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ld.elf_so/ld.elf_so.16
-rw-r--r--libexec/ld.elf_so/load.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/libexec/ld.elf_so/ld.elf_so.1 b/libexec/ld.elf_so/ld.elf_so.1
index 1ec261fedb1..a4c85561858 100644
--- a/libexec/ld.elf_so/ld.elf_so.1
+++ b/libexec/ld.elf_so/ld.elf_so.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: ld.elf_so.1,v 1.2 2001/11/01 01:10:59 wiz Exp $
+.\" $NetBSD: ld.elf_so.1,v 1.3 2001/11/02 15:28:36 skrll Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -152,7 +152,9 @@ If the following environment variables exist they will be used by
A colon separated list of directories, overriding the default search path
for shared libraries.
.It Ev LD_PRELOAD
-A colon separated list of shared object filenames to be loaded
+A colon or space separated list of shared object filenames to be loaded.
+Space is allowed as a separator for backwards compatibility only. Support
+may be removed in a future release and should not be relied upon.
.Em after
the main program but
.Em before
diff --git a/libexec/ld.elf_so/load.c b/libexec/ld.elf_so/load.c
index 3cc033218a9..5b10ac1cce4 100644
--- a/libexec/ld.elf_so/load.c
+++ b/libexec/ld.elf_so/load.c
@@ -1,4 +1,4 @@
-/* $NetBSD: load.c,v 1.14 2001/05/27 23:26:47 christos Exp $ */
+/* $NetBSD: load.c,v 1.15 2001/11/02 15:28:36 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -309,7 +309,7 @@ _rtld_preload(preload_path, dodebug)
if (preload_path != NULL) {
cp = buf = xstrdup(preload_path);
- while ((path = strsep(&cp, " ")) != NULL && status == 0) {
+ while ((path = strsep(&cp, " :")) != NULL && status == 0) {
if (_rtld_load_object(xstrdup(path), RTLD_GLOBAL,
dodebug) == NULL)
status = -1;