FreeBSD Bugzilla – Attachment 231812 Details for
Bug 261550
ports-mgmt/pkg: Missing libraries not flagged
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
experimental patch for ports-mgmt/pkg
patch-pkg_1.diff (text/plain), 1.73 KB, created by
Tatsuki Makino
on 2022-02-14 09:13:40 UTC
(
hide
)
Description:
experimental patch for ports-mgmt/pkg
Filename:
MIME Type:
Creator:
Tatsuki Makino
Created:
2022-02-14 09:13:40 UTC
Size:
1.73 KB
patch
obsolete
>diff --git a/ports-mgmt/pkg/files/patch-libpkg_pkg__elf.c b/ports-mgmt/pkg/files/patch-libpkg_pkg__elf.c >new file mode 100644 >index 0000000000..dd701e0922 >--- /dev/null >+++ b/ports-mgmt/pkg/files/patch-libpkg_pkg__elf.c >@@ -0,0 +1,49 @@ >+--- libpkg/pkg_elf.c.orig 2021-11-12 08:57:25 UTC >++++ libpkg/pkg_elf.c >+@@ -53,6 +53,7 @@ >+ #endif >+ #include <paths.h> >+ #include <stdbool.h> >++#include <stdlib.h> >+ #include <string.h> >+ #include <unistd.h> >+ #ifdef HAVE_LIBELF >+@@ -86,7 +87,8 @@ static int elf_string_to_corres(const struct _elf_corr >+ static int >+ filter_system_shlibs(const char *name, char *path, size_t pathlen) >+ { >+- const char *shlib_path; >++ const char *shlib_path, *check_path; >++ char resolved_path[PATH_MAX+1]; >+ >+ shlib_path = shlib_list_find_by_name(name); >+ if (shlib_path == NULL) { >+@@ -94,13 +96,25 @@ filter_system_shlibs(const char *name, char *path, siz >+ return (EPKG_FATAL); >+ } >+ >++ check_path = shlib_path; >++ >++ if (*check_path != '/' || >++ strstr(check_path, "/../") != NULL || >++ strstr(check_path, "/./") != NULL || >++ strstr(check_path, "//") != NULL) { >++ memset(resolved_path, 0, sizeof(resolved_path)); >++ if (realpath(check_path, resolved_path) != NULL) { >++ check_path = (const char *)resolved_path; >++ } >++ } >++ >+ if (pkg_object_bool(pkg_config_get("ALLOW_BASE_SHLIBS"))) { >+- if (strstr(shlib_path, "/lib32/") != NULL) >++ if (strstr(check_path, "/lib32/") != NULL) >+ return (EPKG_END); >+ } else { >+ /* match /lib, /lib32, /usr/lib and /usr/lib32 */ >+- if (strncmp(shlib_path, "/lib", 4) == 0 || >+- strncmp(shlib_path, "/usr/lib", 8) == 0) >++ if (strncmp(check_path, "/lib", 4) == 0 || >++ strncmp(check_path, "/usr/lib", 8) == 0) >+ return (EPKG_END); /* ignore libs from base */ >+ } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261550
:
231811
| 231812