]> git.ipfire.org Git - thirdparty/asterisk.git/commit
config: bug: fix truncation of included config files on permissions error
authorGeorge Joseph <george.joseph@fairview5.com>
Wed, 10 Sep 2014 16:04:23 +0000 (16:04 +0000)
committerGeorge Joseph <george.joseph@fairview5.com>
Wed, 10 Sep 2014 16:04:23 +0000 (16:04 +0000)
commit43c4529f15c9d09865a9a9d05c99f7f7a2f14a10
treea5ad3e144e6cc006139ba83d9ee0688145921d56
parent8f15395e096170fa6c63b91b221cf953c00a7b04
config: bug: fix truncation of included config files on permissions error

ast_config_text_file_save() currently truncates include files as they
are processed.  If a subsequent include file or the main config file has
a permissions error that prevents writing, earlier include files are left
truncated resulting in a frantic search for backups.

This patch causes ast_config_text_file_save to check for write access
on all files before it truncates any of them.

Will be applied 1.8 > trunk.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3986/
........

Merged revisions 422900 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 422903 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 422904 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@422905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/config.c