Building and Securing Daemons: A Comprehensive Guide
1. Configuration File Handling
Some daemons take security precautions by refusing to run if they can’t open and load a configuration file. Since the configuration file is often specified on the command line, your program may need to make two passes through it. First, to get the configuration file, and then to parse the command line again after the configuration file has been loaded. Command - line parameters are commonly used during debugging and usually override values in the configuration file.
It’s crucial to perform a sanity check on the configuration to ensure its consistency. If any problems are found, the program should report errors or exit.
2. Going into the Background
超级会员免费看
订阅专栏 解锁全文
1552

被折叠的 条评论
为什么被折叠?



