Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160303365
D33898.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
793 B
Referenced Files
None
Subscribers
None
D33898.diff
View Options
diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c
--- a/sbin/ldconfig/elfhints.c
+++ b/sbin/ldconfig/elfhints.c
@@ -62,6 +62,8 @@
{
struct stat stbuf;
int i;
+ int insert_at;
+ char *is_compat;
/* Do some security checks */
if (!trusted && !insecure) {
@@ -83,12 +85,22 @@
}
}
- for (i = 0; i < ndirs; i++)
+ is_compat = strstr(name, "/lib/compat");
+ insert_at = ndirs;
+ for (i = 0; i < ndirs; i++) {
if (strcmp(dirs[i], name) == 0)
return;
+ if (!is_compat && strstr(dirs[i], "/lib/compat"))
+ insert_at--;
+ }
if (ndirs >= MAXDIRS)
errx(1, "\"%s\": Too many directories in path", hintsfile);
- dirs[ndirs++] = name;
+
+ for (i = ndirs; i > insert_at; i--)
+ dirs[i] = dirs[i - 1];
+
+ dirs[insert_at] = name;
+ ndirs++;
}
void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 2:16 AM (16 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34269253
Default Alt Text
D33898.diff (793 B)
Attached To
Mode
D33898: Make ldconfig put */lib/compat* at the end of the search list
Attached
Detach File
Event Timeline
Log In to Comment