What is good practice for writing web applications that control daemons (and their config files)
Posted
by
Jones R
on Stack Overflow
See other posts from Stack Overflow
or by Jones R
Published on 2011-01-01T07:34:55Z
Indexed on
2011/01/01
7:54 UTC
Read the original article
Hit count: 271
Can someone suggest some basic advice on dealing with web applications that interact with configuration files like httpd.conf, bind zone files, etc.
I understand that it's bad practice, in fact very dangerous to allow arbitrary execution of code without fully validating it and so on. But say you are tasked to write a small app that allows one to add vhosts to an apache configuration.
Do you have your code execute with full privileges, do you write future variables into a database and have a cron job (with full privileges) execute a script that pulls the vars from the database and throws them into a template config file, etc.
Some thoughts & contributions on this issue would be appreciated.
tl;dr - how can you securely write a web app to update/create entries in a config file like apache's httpd.conf, etc.
© Stack Overflow or respective owner