Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161879885
D696.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
D696.diff
View Options
Index: sys/kern/imgact_binmisc.c
===================================================================
--- sys/kern/imgact_binmisc.c
+++ sys/kern/imgact_binmisc.c
@@ -600,12 +600,12 @@
}
/* No interpreter nesting allowed. */
- if (imgp->interpreted) {
+ if (imgp->interpreted & IMGACT_BINMISC) {
mtx_unlock(&interp_list_mtx);
return (ENOEXEC);
}
- imgp->interpreted = 1;
+ imgp->interpreted |= IMGACT_BINMISC;
if (imgp->args->fname != NULL) {
fname = imgp->args->fname;
Index: sys/kern/imgact_shell.c
===================================================================
--- sys/kern/imgact_shell.c
+++ sys/kern/imgact_shell.c
@@ -115,10 +115,10 @@
* Don't allow a shell script to be the shell for a shell
* script. :-)
*/
- if (imgp->interpreted)
+ if (imgp->interpreted & IMGACT_SHELL)
return (ENOEXEC);
- imgp->interpreted = 1;
+ imgp->interpreted |= IMGACT_SHELL;
/*
* At this point we have the first page of the file mapped.
Index: sys/sys/imgact.h
===================================================================
--- sys/sys/imgact.h
+++ sys/sys/imgact.h
@@ -61,7 +61,9 @@
unsigned long entry_addr; /* entry address of target executable */
unsigned long reloc_base; /* load address of image */
char vmspace_destroyed; /* flag - we've blown away original vm space */
- char interpreted; /* flag - this executable is interpreted */
+#define IMGACT_SHELL 0x1
+#define IMGACT_BINMISC 0x2
+ unsigned char interpreted; /* mask of interpreters that have run */
char opened; /* flag - we have opened executable vnode */
char *interpreter_name; /* name of the interpreter */
void *auxargs; /* ELF Auxinfo structure pointer */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 8, 4:29 PM (6 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34851664
Default Alt Text
D696.diff (1 KB)
Attached To
Mode
D696: Redesign multiple imgact handlers in do_exec()
Attached
Detach File
Event Timeline
Log In to Comment