[Asterisk-Users] Safely editing voicemail.conf

John Goerzen jgoerzen at complete.org
Thu Feb 16 15:44:50 MST 2006


We have a problem with Asterisk not locking voicemail.conf for update.

It appears to not protect the file even against itself.  It certainly
doesn't use flock() to protect it against others.

This is a problem for several reasons.  First, of course, people can be
hand-editing the file to add or remove users.  Secondly, automated
programs may be appending data to it for the same purpose.

We've noticed corruption in our file that appears to occur when someone
is changing their passwords at the same time that the file is being
appended to.  From looking at app_voicemail.c, Asterisk does nothing
whatsoever to lock the file before modifying it.  That sounds bad to me.

Has anyone else seen this problem?  What do you do to work around it?

We're running Asterisk 1.2.1.

-- John




More information about the asterisk-users mailing list