OpenDNSSEC-enforcer  1.4.9
Functions
daemon_util.h File Reference
#include "daemon.h"
#include <stdio.h>
Include dependency graph for daemon_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void cmdlParse (DAEMONCONFIG *, int *, char **)
 
void log_init (int facility, const char *program_name)
 
void log_switch (int facility, const char *facility_name, const char *program_name, int verbose)
 
void log_msg (DAEMONCONFIG *config, int priority, const char *format,...)
 
void ksm_log_msg (const char *format)
 
void log_xml_error (void *ignore, const char *format,...)
 
void log_xml_warn (void *ignore, const char *format,...)
 
int getPermsForDrop (DAEMONCONFIG *config)
 
int writepid (DAEMONCONFIG *config)
 
int createPidDir (DAEMONCONFIG *config)
 
int make_directory (DAEMONCONFIG *config, const char *path)
 
int ReadConfig (DAEMONCONFIG *config, int verbose)
 
int get_lite_lock (char *lock_filename, FILE *lock_fd)
 
int release_lite_lock (FILE *lock_fd)
 
int get_log_user (const char *username, int *usernumber)
 

Function Documentation

void cmdlParse ( DAEMONCONFIG ,
int *  ,
char **   
)

Use _r() functions on platforms that have. They are thread safe versions of the normal syslog functions. Platforms without _r() usually have thread safe normal functions.

Definition at line 624 of file daemon_util.c.

References DAEMONCONFIG::configfile, DAEMONCONFIG::debug, DAEMONCONFIG::fork, DAEMONCONFIG::gid, log_msg(), DAEMONCONFIG::once, optarg, DAEMONCONFIG::pidfile, DAEMONCONFIG::pidfile_set, DAEMONCONFIG::policy, DAEMONCONFIG::program, DAEMONCONFIG::uid, and DAEMONCONFIG::username.

Referenced by main().

int createPidDir ( DAEMONCONFIG config)

Definition at line 537 of file daemon_util.c.

References log_msg(), make_directory(), DAEMONCONFIG::pidfile, StrAppend(), StrFree, and StrStrdup().

Referenced by main().

int get_lite_lock ( char *  lock_filename,
FILE *  lock_fd 
)

Definition at line 1169 of file daemon_util.c.

int get_log_user ( const char *  username,
int *  usernumber 
)

Definition at line 1223 of file daemon_util.c.

References DEFAULT_LOG_FACILITY, StrFree, StrStrdup(), and StrToUpper().

Referenced by ReadConfig().

int getPermsForDrop ( DAEMONCONFIG config)

Use _r() functions on platforms that have. They are thread safe versions of the normal syslog functions. Platforms without _r() usually have thread safe normal functions.

Definition at line 91 of file daemon_util.c.

References DAEMONCONFIG::configfile, DAEMONCONFIG::gid, DAEMONCONFIG::groupname, log_msg(), log_xml_error(), log_xml_warn(), StrAppend(), StrFree, StrStrdup(), DAEMONCONFIG::uid, and DAEMONCONFIG::username.

Referenced by main().

void ksm_log_msg ( const char *  format)

Definition at line 313 of file daemon_util.c.

void log_init ( int  facility,
const char *  program_name 
)

Definition at line 265 of file daemon_util.c.

void log_msg ( DAEMONCONFIG config,
int  priority,
const char *  format,
  ... 
)
void log_switch ( int  facility,
const char *  facility_name,
const char *  program_name,
int  verbose 
)

Definition at line 275 of file daemon_util.c.

References log_msg().

Referenced by ReadConfig().

void log_xml_error ( void *  ignore,
const char *  format,
  ... 
)

Definition at line 354 of file daemon_util.c.

Referenced by getPermsForDrop(), and ReadConfig().

void log_xml_warn ( void *  ignore,
const char *  format,
  ... 
)

Definition at line 372 of file daemon_util.c.

References AUTHOR_NAME, and COPYRIGHT_STR.

Referenced by getPermsForDrop(), and ReadConfig().

int make_directory ( DAEMONCONFIG config,
const char *  path 
)
int ReadConfig ( DAEMONCONFIG config,
int  verbose 
)
int release_lite_lock ( FILE *  lock_fd)

Definition at line 1203 of file daemon_util.c.

int writepid ( DAEMONCONFIG config)