FreeBSD Bugzilla – Attachment 180462 Details for
Bug 211837
POLA violation : SVR4(32bit binaries) does not operate.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Prefer brand with exactly matching interpreter.
1.patch (text/plain), 1.17 KB, created by
Konstantin Belousov
on 2017-03-03 13:37:53 UTC
(
hide
)
Description:
Prefer brand with exactly matching interpreter.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2017-03-03 13:37:53 UTC
Size:
1.17 KB
patch
obsolete
>diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c >index 29c1f4939d5..fa29e745dc7 100644 >--- a/sys/kern/imgact_elf.c >+++ b/sys/kern/imgact_elf.c >@@ -309,13 +309,26 @@ __elfN(get_brandinfo)(struct image_params *imgp, const char *interp, > continue; > if (hdr->e_machine == bi->machine && > (hdr->e_ident[EI_OSABI] == bi->brand || >- strncmp((const char *)&hdr->e_ident[OLD_EI_BRAND], >- bi->compat_3_brand, strlen(bi->compat_3_brand)) == 0)) { >+ strcmp((const char *)&hdr->e_ident[OLD_EI_BRAND], >+ bi->compat_3_brand) == 0)) { > /* Looks good, but give brand a chance to veto */ >- if (!bi->header_supported || bi->header_supported(imgp)) >- return (bi); >+ if (!bi->header_supported || >+ bi->header_supported(imgp)) { >+ /* >+ * Again, prefer strictly matching >+ * interpreter path. >+ */ >+ if (strlen(bi->interp_path) + 1 == >+ interp_name_len && strncmp(interp, >+ bi->interp_path, interp_name_len) == 0) >+ return (bi); >+ if (bi_m == NULL) >+ bi_m = bi; >+ } > } > } >+ if (bi_m != NULL) >+ return (bi_m); > > /* No known brand, see if the header is recognized by any brand */ > for (i = 0; i < MAX_BRANDS; i++) {
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 211837
:
180430
| 180462