Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162207813
D58063.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58063.diff
View Options
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -823,8 +823,8 @@
imgp->td = td;
imgp->proc = td->td_proc;
imgp->attr = attr;
- imgp->interpreted = IMGACT_INTERP_IGNORE; /* ignored by do_execve */
-
+ imgp->interpreted = IMGACT_INTERP_ELF; /* ignored by do_execve */
+
NDINIT(nd, LOOKUP, ISOPEN | FOLLOW | LOCKSHARED | LOCKLEAF,
UIO_SYSSPACE, file);
if ((error = namei(nd)) != 0) {
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -750,8 +750,7 @@
* Special interpreter operation, cleanup and loop up to try to
* activate the interpreter.
*/
- if (imgp->interpreted != 0 &&
- imgp->interpreted != IMGACT_INTERP_IGNORE) {
+ if ((imgp->interpreted & ~IMGACT_INTERP_ELF) != 0) {
exec_unmap_first_page(imgp);
/*
* The text reference needs to be removed for scripts.
diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h
--- a/sys/sys/imgact.h
+++ b/sys/sys/imgact.h
@@ -86,7 +86,7 @@
struct ucred *newcred; /* new credentials if changing */
#define IMGACT_SHELL 0x1
#define IMGACT_BINMISC 0x2
-#define IMGACT_INTERP_IGNORE 0x3
+#define IMGACT_INTERP_ELF 0x4 /* only used within the ELF activator */
unsigned char interpreted; /* mask of interpreters that have run */
bool credential_setid; /* true if becoming setid */
bool vmspace_destroyed; /* we've blown away original vm space */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 10:03 PM (7 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34972477
Default Alt Text
D58063.diff (1 KB)
Attached To
Mode
D58063: kern: imgact: fix imgp->interpreted
Attached
Detach File
Event Timeline
Log In to Comment