c7aee7ccf1
most notably fixes an overflow in the management interface (which is not enabled by default)
31 lines
969 B
Plaintext
31 lines
969 B
Plaintext
$OpenBSD: patch-asterisk_c,v 1.3 2005/08/15 17:36:07 jolan Exp $
|
|
--- asterisk.c.orig Sun May 15 22:04:58 2005
|
|
+++ asterisk.c Sun Aug 14 21:11:29 2005
|
|
@@ -193,7 +193,7 @@ int ast_safe_system(const char *s)
|
|
for (x=STDERR_FILENO + 1; x<4096;x++) {
|
|
close(x);
|
|
}
|
|
- res = execl("/bin/sh", "/bin/sh", "-c", s, NULL);
|
|
+ res = execl("/bin/sh", "/bin/sh", "-c", s, (void *)NULL);
|
|
exit(1);
|
|
} else if (pid > 0) {
|
|
for(;;) {
|
|
@@ -1580,7 +1580,7 @@ int main(int argc, char *argv[])
|
|
sigset_t sigs;
|
|
int num;
|
|
char *buf;
|
|
- char *runuser=NULL, *rungroup=NULL;
|
|
+ char *runuser = "_asterisk", *rungroup = "_asterisk";
|
|
struct pollfd silly_macos[1];
|
|
|
|
/* Remember original args for restart */
|
|
@@ -1693,6 +1693,8 @@ int main(int argc, char *argv[])
|
|
ast_log(LOG_WARNING, "Unable to disable core size resource limit: %s\n", strerror(errno));
|
|
}
|
|
}
|
|
+
|
|
+ chdir("/");
|
|
|
|
if (option_console && !option_verbose)
|
|
ast_verbose("[ Reading Master Configuration ]");
|