DropPrivilegesExt

Config extension to drop privileges files.

User and group must be specified in the configfile under the PERMISSION section. If root starts the program, it will drop privileges after reading the config. If it is started with the configured user, nothing happens. If it is started as a different user, it will exit with an error.

Config example:

[PERMISSIONS]
user = john
group = john

Members

Classes

Config
class Config
Undocumented in source.

Functions

filterConfigFiles
istring[] filterConfigFiles(IApplication app, ConfigParser config, istring[] files)

Function to filter the list of configuration files to parse. Only present to satisfy the interface

order
int order()

Extension order. This extension uses -5_000 because it should be called pretty early, but after the ConfigExt extension.

preParseConfig
void preParseConfig(IApplication app, ConfigParser config)

Function executed before the configuration files are parsed. Only present to satisfy the interface

processConfig
void processConfig(IApplication app, ConfigParser config)

Function executed before the program runs.

Inherited Members

From IConfigExtExtension

preParseConfig
void preParseConfig(IApplication app, ConfigParser config)

Function executed before the configuration files are parsed.

filterConfigFiles
istring[] filterConfigFiles(IApplication app, ConfigParser config, istring[] files)

Function to filter the list of configuration files to parse.

processConfig
void processConfig(IApplication app, ConfigParser config)

Function executed after the configuration files are parsed.

Meta