[Asterisk-bugs] [Asterisk 0009231]: [Patch] voicemail permissions fixes

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jul 3 16:27:46 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9231 
====================================================================== 
Reported By:                ltd
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   9231
Category:                   Applications/app_voicemail
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             03-07-2007 22:04 CST
Last Modified:              07-03-2007 16:27 CDT
====================================================================== 
Summary:                    [Patch] voicemail permissions fixes
Description: 
I recently put a voicemail service into production here utilising realtime
config lookups from LDAP and SMDI.   In doing so I discovered a few things
were needed to make it all work properly.  I've included a patch that you
may or may not want to integrate into head.  The patch is against 1.4.0 but
mostly applies to 1.4.1 too.

I also had some naggy problems with voicemail file permissions. 
ast_play_and_record_full records the message for leave_voicemail, then the
files are renamed into the correct folders. The problem here is that 
ast_play_and_record doesn't honor VOICEMAIL_FILE_MODE so no matter what I
set my umask to, the most I could ever get was the hard coded 0700
permissions used in that function.  

To fix this I changed __ast_play_and_record to accept a file mode
parameter.  I also changed ast_play_and_record_full to accept a file mode
and made play_record_review pass VOICEMAIL_FILE_MODE to this the mode for
this function, hence fixing the problem.   All other wrapper functions that
called __ast_play_and_record I changed to pass a new definition called
DEFAULT_FILE_MODE.

The other issue is the .txt file saved with voicemail.  It's created using
mkstemp() which only creates files with 0600 permissions.  I added a
chmod() in there to fix this but I doubt that's the best solution.  It
works, anyway.


====================================================================== 

---------------------------------------------------------------------- 
 qwell - 07-03-07 16:27  
---------------------------------------------------------------------- 
Most of this is already fixed in svn trunk.  The chmod part has not yet
been added, and I'll be adding that in a moment. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-03-07 16:27  qwell          Note Added: 0066473                          
======================================================================




More information about the Asterisk-bugs mailing list