[Home]

Summary:ASTERISK-03480: make /var/run/asterisk.ctl configurable
Reporter:Edwin Groothuis (mavetju)Labels:
Date Opened:2005-02-10 22:14:55.000-0600Date Closed:2005-02-12 11:25:00.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch-asterisk.c
( 1) patch-asterisk.c-1.0.5
( 2) patch-Makefile
Description:/var/run/asterisk.ctl is the socket to which asterisk -x writes to. This socket is created at every (re)start.

This patch adds several configuration features to asterisk.conf:

 [files]
 astctlpermissions = 0660
 astctlowner = root
 astctlgroup = apache
 astctl => asterisk.ctl

First it defines the socket name, which is at this moment hardcoded.
It defines the owner and group of the socket, to which the socket is chown(2)ed.
And it changes the permissions on the socket, so that other processes which are not run as root can use the socket.
Comments:By: Edwin Groothuis (mavetju) 2005-02-10 22:16:33.000-0600

The patch-Makefile adds the (commented out) configuration lines to /etc/asterisk/asterisk.conf with a warning above.

The patch-asterisk.c adds the features to the reading of the configuration and creation of the socket.

By: Edwin Groothuis (mavetju) 2005-02-10 22:25:57.000-0600

patch-asterisk.c-1.0.5 is for the 1.0.5 version of the asterisk distribution.

By: Mark Spencer (markster) 2005-02-11 01:02:49.000-0600

But asterisk already supports changing /var/run.  Is it really worthwhile to change the name of the file itself as opposed to just putting them in subdirectories?

By: Edwin Groothuis (mavetju) 2005-02-11 01:35:12.000-0600

It is not only the name of the file, but also the ownership and the permissions.
The possibility to change the name of the file is just to make the picture complete.

By: Olle Johansson (oej) 2005-02-11 02:41:54.000-0600

Is this patch disclaimed?

I think the ownership and permissions are important additions.

By: Edwin Groothuis (mavetju) 2005-02-11 02:47:56.000-0600

oej: disclaimer has been sent earlier in 2004 (can't recall the date). Thanks for your support :-)

By: Mark Spencer (markster) 2005-02-11 17:12:18.000-0600

Added to CVS, thanks!

By: Russell Bryant (russell) 2005-02-12 11:25:00.000-0600

not included in 1.0 since it is a new feature

Thanks!