mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-28 00:10:25 -07:00
mkstemp doesn't specify a file mode, so we should chmod it to VOICEMAIL_FILE_MODE
Taken from a larger patch by ltd - the rest of which is no longer necessary in trunk. Closes issue #9231 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3321,6 +3321,11 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
|
||||
ast_filerename(tmptxtfile, fn, NULL);
|
||||
rename(tmptxtfile, txtfile);
|
||||
|
||||
/* Properly set permissions on voicemail text descriptor file.
|
||||
Unfortunately mkstemp() makes this file 0600 on most unix systems. */
|
||||
if (chmod(txtfile, VOICEMAIL_FILE_MODE) < 0)
|
||||
ast_log(LOG_ERROR, "Couldn't set permissions on voicemail text file %s: %s", txtfile, strerror(errno));
|
||||
|
||||
ast_unlock_path(dir);
|
||||
if (ast_check_realtime("voicemail_data")) {
|
||||
snprintf(tmpid, sizeof(tmpid), "%d", rtmsgid);
|
||||
|
||||
Reference in New Issue
Block a user