Bug#330132: voicemail files not group-readable

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Sep 26 08:24:25 UTC 2005


Package: asterisk
Version: 1.0.9.dfsg.1-3.1

The following was only tested on my packages, but should generally
affect other Debian systems:

Asterisk's voicemail creates files with permissions 0600. Thus they are
only readable by the user asterisk and not by anybody else in the group
asterisk.

A trivial, hard-wired fix is attached, though is probably not optimized

-- 
Tzafrir Cohen     icq#16849755  +972-50-7952406
tzafrir.cohen at xorcom.com  http://www.xorcom.com
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## voicemail_0660.dpatch by Tzafrir Cohen <tzafrir.cohen at xorcom.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Sets the default permissions to voicemail files to group-accessible

@DPATCH@
diff -urNad asterisk-1.0.9.dfsg.1/apps/app_voicemail.c /tmp/dpep.fP0Bpu/asterisk-1.0.9.dfsg.1/apps/app_voicemail.c
--- asterisk-1.0.9.dfsg.1/apps/app_voicemail.c	2005-09-26 11:17:14.804663504 +0300
+++ /tmp/dpep.fP0Bpu/asterisk-1.0.9.dfsg.1/apps/app_voicemail.c	2005-09-26 11:17:37.630193496 +0300
@@ -1199,7 +1199,7 @@
 			ast_log(LOG_WARNING, "Unable to open %s in read-only mode\n", infile);
 			return -1;
 		}
-		if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, 0600)) < 0) {
+		if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, 0660)) < 0) {
 			ast_log(LOG_WARNING, "Unable to open %s in write-only mode\n", outfile);
 			close(ifd);
 			return -1;


More information about the Pkg-voip-maintainers mailing list