[Home]

Summary:ASTERISK-15857: [patch] [regression] fix for #16802 forces change of astrundir ownership, breaking socket perms
Reporter:Stuart Henderson (stuarth)Labels:
Date Opened:2010-03-22 18:55:21Date Closed:2010-07-06 15:07:49
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100324__issue17076.diff.txt
Description:The patch for ASTERISK-15603 changes ownership of astrundir, even if it already existed at startup. As a result this means that some settings of astctlowner/astctlgroup can't be honoured.

****** STEPS TO REPRODUCE ******

[options]
runuser = _asterisk
rungroup = _asterisk

[files]
astctlpermissions = 0660
astctlowner = _asterisk
astctlgroup = wheel
astctl = asterisk.ctl

mkdir /var/run/asterisk
chown _asterisk:wheel /var/run/asterisk
asterisk

observe that /var/run/asterisk ownership is changed to _asterisk:_asterisk, and asterisk.ctl is owned by _asterisk:_asterisk.
Comments:By: Tilghman Lesher (tilghman) 2010-03-22 19:24:27

Could you give an example, please, of something you'd like that isn't possible in the current code?

By: Stuart Henderson (stuarth) 2010-03-22 21:32:14

I'd like to be able to set the socket to be accessible by members of some group (for example wheel) other than the one asterisk runs as. Just skipping the chown() if the mkdir() fails with EEXIST should do the trick.

By: Stuart Henderson (stuarth) 2010-03-25 07:05:57

Yes, that works, thanks.

By: Digium Subversion (svnbot) 2010-06-28 16:49:59

Repository: asterisk
Revision: 272925

U   branches/1.4/main/asterisk.c

------------------------------------------------------------------------
r272925 | tilghman | 2010-06-28 16:49:58 -0500 (Mon, 28 Jun 2010) | 8 lines

Don't change ownership/group/permissions on run directory, if it already exists.

(closes issue ASTERISK-15857)
Reported by: stuarth
Patches:
      20100324__issue17076.diff.txt uploaded by tilghman (license 14)
Tested by: stuarth

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=272925

By: Digium Subversion (svnbot) 2010-06-28 16:50:54

Repository: asterisk
Revision: 272926

_U  trunk/
U   trunk/main/asterisk.c

------------------------------------------------------------------------
r272926 | tilghman | 2010-06-28 16:50:53 -0500 (Mon, 28 Jun 2010) | 15 lines

Merged revisions 272925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r272925 | tilghman | 2010-06-28 16:50:02 -0500 (Mon, 28 Jun 2010) | 8 lines
 
 Don't change ownership/group/permissions on run directory, if it already exists.
 
 (closes issue ASTERISK-15857)
  Reported by: stuarth
  Patches:
        20100324__issue17076.diff.txt uploaded by tilghman (license 14)
  Tested by: stuarth
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=272926

By: Digium Subversion (svnbot) 2010-06-28 16:51:49

Repository: asterisk
Revision: 272927

_U  branches/1.6.2/
U   branches/1.6.2/main/asterisk.c

------------------------------------------------------------------------
r272927 | tilghman | 2010-06-28 16:51:49 -0500 (Mon, 28 Jun 2010) | 22 lines

Merged revisions 272926 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r272926 | tilghman | 2010-06-28 16:50:57 -0500 (Mon, 28 Jun 2010) | 15 lines
 
 Merged revisions 272925 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r272925 | tilghman | 2010-06-28 16:50:02 -0500 (Mon, 28 Jun 2010) | 8 lines
   
   Don't change ownership/group/permissions on run directory, if it already exists.
   
   (closes issue ASTERISK-15857)
    Reported by: stuarth
    Patches:
          20100324__issue17076.diff.txt uploaded by tilghman (license 14)
    Tested by: stuarth
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=272927