[Asterisk-code-review] asterisk.c: Non-root users also get the astcanary after core... (asterisk[13])

Walter Doekes asteriskteam at digium.com
Fri Sep 16 10:36:44 CDT 2016


Walter Doekes has uploaded a new change for review.

  https://gerrit.asterisk.org/3922

Change subject: asterisk.c: Non-root users also get the astcanary after core restart.
......................................................................

asterisk.c: Non-root users also get the astcanary after core restart.

Without this change, a 'core restart' would kill the astcanary forever
if you're not running as root. Both with and without this patch, the
scheduling priority was still SCHED_RR after restart.

ASTERISK-26352 #close

Change-Id: Iacb49f26491a0717084ad46ed96b0bea5f627a55
---
M main/asterisk.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/3922/1

diff --git a/main/asterisk.c b/main/asterisk.c
index b8eedfa..0d137ff 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -4353,7 +4353,7 @@
 #endif	/* defined(__AST_DEBUG_MALLOC) */
 
 	/* Spawning of astcanary must happen AFTER the call to daemon(3) */
-	if (isroot && ast_opt_high_priority) {
+	if (ast_opt_high_priority) {
 		snprintf(canary_filename, sizeof(canary_filename), "%s/alt.asterisk.canary.tweet.tweet.tweet", ast_config_AST_RUN_DIR);
 
 		/* Don't let the canary child kill Asterisk, if it dies immediately */

-- 
To view, visit https://gerrit.asterisk.org/3922
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacb49f26491a0717084ad46ed96b0bea5f627a55
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>



More information about the asterisk-code-review mailing list