#include <isc/types.h>Go to the source code of this file.
Defines | |
| #define | NS_OS_H 1 |
Functions | |
| void | ns_os_init (const char *progname) |
| void | ns_os_daemonize (void) |
| void | ns_os_opendevnull (void) |
| void | ns_os_closedevnull (void) |
| void | ns_os_chroot (const char *root) |
| void | ns_os_inituserinfo (const char *username) |
| void | ns_os_changeuser (void) |
| void | ns_os_adjustnofile (void) |
| void | ns_os_minprivs (void) |
| FILE * | ns_os_openfile (const char *filename, mode_t mode, isc_boolean_t switch_user) |
| void | ns_os_writepidfile (const char *filename, isc_boolean_t first_time) |
| isc_boolean_t | ns_os_issingleton (const char *filename) |
| void | ns_os_shutdown (void) |
| isc_result_t | ns_os_gethostname (char *buf, size_t len) |
| void | ns_os_shutdownmsg (char *command, isc_buffer_t *text) |
| void | ns_os_tzset (void) |
| void | ns_os_started (void) |
Definition in file os.h.
| void ns_os_init | ( | const char * | progname | ) |
| void ns_os_daemonize | ( | void | ) |
Definition at line 396 of file os.c.
References devnullfd, dfd, isc__strerror(), ISC_STRERRORSIZE, and ns_main_earlyfatal().
Referenced by setup().
| void ns_os_opendevnull | ( | void | ) |
| void ns_os_closedevnull | ( | void | ) |
| void ns_os_chroot | ( | const char * | root | ) |
Definition at line 511 of file os.c.
References isc__strerror(), ISC_STRERRORSIZE, and ns_main_earlyfatal().
Referenced by setup().
| void ns_os_inituserinfo | ( | const char * | username | ) |
Definition at line 537 of file os.c.
References all_digits(), isc__strerror(), ISC_STRERRORSIZE, ns_main_earlyfatal(), and runas_pw.
Referenced by setup().
| void ns_os_changeuser | ( | void | ) |
Definition at line 561 of file os.c.
References done_setuid, isc__strerror(), ISC_STRERRORSIZE, ISC_TRUE, ns_main_earlyfatal(), ns_main_earlywarning(), and runas_pw.
Referenced by load_configuration(), and ns_os_minprivs().
| void ns_os_adjustnofile | ( | void | ) |
Definition at line 608 of file os.c.
References ISC_R_SUCCESS, isc_resource_openfiles, isc_resource_setlimit(), ISC_RESOURCE_UNLIMITED, and ns_main_earlywarning().
Referenced by setup().
| void ns_os_minprivs | ( | void | ) |
| FILE* ns_os_openfile | ( | const char * | filename, | |
| mode_t | mode, | |||
| isc_boolean_t | switch_user | |||
| ) |
Definition at line 793 of file os.c.
References free(), isc__strerror(), ISC_FALSE, ISC_STRERRORSIZE, mkdirpath(), ns_main_earlywarning(), runas_pw, safe_open(), setperms(), and strdup().
Referenced by generate_session_key().
| void ns_os_writepidfile | ( | const char * | filename, | |
| isc_boolean_t | first_time | |||
| ) |
| isc_boolean_t ns_os_issingleton | ( | const char * | filename | ) |
| void ns_os_shutdown | ( | void | ) |
| isc_result_t ns_os_gethostname | ( | char * | buf, | |
| size_t | len | |||
| ) |
Definition at line 984 of file os.c.
Referenced by do_hostname_lookup(), do_id_lookup(), and ns_client_addopt().
| void ns_os_shutdownmsg | ( | char * | command, | |
| isc_buffer_t * | text | |||
| ) |
| void ns_os_started | ( | void | ) |
Definition at line 468 of file os.c.
References dfd, and ns_main_earlyfatal().
Referenced by view_loaded().