PERFORCE change 157245 for review
Robert Watson
rwatson at FreeBSD.org
Thu Feb 5 15:36:37 PST 2009
http://perforce.freebsd.org/chv.cgi?CH=157245
Change 157245 by rwatson at rwatson_freebsd_capabilities on 2009/02/05 23:36:22
In a sandbox, access to the hints file is neither possible nor
useful, that will be done by the proxy service.
Affected files ...
.. //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#10 edit
Differences ...
==== //depot/projects/trustedbsd/capabilities/src/libexec/rtld-elf/rtld.c#10 (text+ko) ====
@@ -93,7 +93,9 @@
static char *errmsg_save(void);
static void *fill_search_info(const char *, size_t, void *);
static char *find_library(const char *, const Obj_Entry *);
+#ifndef IN_RTLD_CAP
static const char *gethints(void);
+#endif
static void init_dag(Obj_Entry *);
static void init_dag1(Obj_Entry *, Obj_Entry *, DoneList *);
static void init_rtld(caddr_t);
@@ -1045,7 +1047,9 @@
if ((pathname = search_library_path(name, ld_library_path)) != NULL ||
(refobj != NULL &&
(pathname = search_library_path(name, refobj->rpath)) != NULL) ||
+#ifndef IN_RTLD_CAP
(pathname = search_library_path(name, gethints())) != NULL ||
+#endif
(pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)
return pathname;
@@ -1134,6 +1138,7 @@
return def;
}
+#ifndef IN_RTLD_CAP
/*
* Return the search path from the ldconfig hints file, reading it if
* necessary. Returns NULL if there are problems with the hints file,
@@ -1172,6 +1177,7 @@
}
return hints[0] != '\0' ? hints : NULL;
}
+#endif
static void
init_dag(Obj_Entry *root)
@@ -2258,7 +2264,9 @@
path_enumerate(ld_library_path, fill_search_info, &args);
path_enumerate(obj->rpath, fill_search_info, &args);
+#ifndef IN_RTLD_CAP
path_enumerate(gethints(), fill_search_info, &args);
+#endif
path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &args);
@@ -2286,9 +2294,11 @@
if (path_enumerate(obj->rpath, fill_search_info, &args) != NULL)
return (-1);
+#ifndef IN_RTLD_CAP
args.flags = LA_SER_CONFIG;
if (path_enumerate(gethints(), fill_search_info, &args) != NULL)
return (-1);
+#endif
args.flags = LA_SER_DEFAULT;
if (path_enumerate(STANDARD_LIBRARY_PATH, fill_search_info, &args) != NULL)
More information about the p4-projects
mailing list