[asterisk-dev] [Code Review] 3986: config: bug: fix truncation of included config files on permissions error

George Joseph reviewboard at asterisk.org
Wed Sep 10 10:58:52 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3986/
-----------------------------------------------------------

(Updated Sept. 10, 2014, 10:58 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 422900


Repository: Asterisk


Description
-------

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.


Diffs
-----

  branches/1.8/main/config.c 422882 

Diff: https://reviewboard.asterisk.org/r/3986/diff/


Testing
-------

Tested normal access and verified that no files are truncated if any of the can't be written to.


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140910/157b0798/attachment.html>


More information about the asterisk-dev mailing list