summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>2000-01-22 22:20:05 +0000
committerjdp <jdp@FreeBSD.org>2000-01-22 22:20:05 +0000
commit6e995a0582c762367fdfccd97ccde229c1db06e6 (patch)
tree2821c92330885cac697a21a1ca4c887ae2cc5575 /libexec/rtld-elf
parentd085826f218f5e9d824f9c7d2bdc0d638abaf88d (diff)
downloadFreeBSD-src-6e995a0582c762367fdfccd97ccde229c1db06e6.zip
FreeBSD-src-6e995a0582c762367fdfccd97ccde229c1db06e6.tar.gz
Allow files in LD_PRELOAD to be separated by white space, like Solaris
and Linux.
Diffstat (limited to 'libexec/rtld-elf')
-rw-r--r--libexec/rtld-elf/rtld.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index b5bba08..652d0c8 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1034,13 +1034,14 @@ static int
load_preload_objects(void)
{
char *p = ld_preload;
+ static const char delim[] = " \t:;";
if (p == NULL)
return NULL;
- p += strspn(p, ":;");
+ p += strspn(p, delim);
while (*p != '\0') {
- size_t len = strcspn(p, ":;");
+ size_t len = strcspn(p, delim);
char *path;
char savech;
@@ -1052,7 +1053,7 @@ load_preload_objects(void)
return -1; /* XXX - cleanup */
p[len] = savech;
p += len;
- p += strspn(p, ":;");
+ p += strspn(p, delim);
}
return 0;
}
OpenPOWER on IntegriCloud