Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160164001
D55648.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
581 B
Referenced Files
None
Subscribers
None
D55648.diff
View Options
diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c
--- a/lib/libc/stdlib/system.c
+++ b/lib/libc/stdlib/system.c
@@ -60,6 +60,8 @@
static struct sigaction ointact, oquitact;
struct sigaction ign;
sigset_t sigblock, osigblock;
+ char *argv[] = { "sh", "-c", __DECONST(char *, command), NULL };
+ extern char **environ;
int pstat = -1, serrno = 0;
pid_t pid;
@@ -101,7 +103,7 @@
/*
* Exec the command.
*/
- execl(_PATH_BSHELL, "sh", "-c", command, NULL);
+ _execve(_PATH_BSHELL, argv, environ);
_exit(127);
} else { /* parent */
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 22, 8:35 PM (11 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34210743
Default Alt Text
D55648.diff (581 B)
Attached To
Mode
D55648: system(3): Unwrap execve()
Attached
Detach File
Event Timeline
Log In to Comment