os.h File Reference

#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)


Detailed Description

Definition in file os.h.


Define Documentation

#define NS_OS_H   1

Definition at line 21 of file os.h.


Function Documentation

void ns_os_init ( const char *  progname  ) 

Definition at line 382 of file os.c.

References setup_syslog().

Referenced by main().

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   ) 

Definition at line 484 of file os.c.

References devnullfd.

Referenced by setup().

void ns_os_closedevnull ( void   ) 

Definition at line 489 of file os.c.

References devnullfd.

Referenced by main().

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   ) 

Definition at line 626 of file os.c.

References ns_os_changeuser().

Referenced by setup().

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 
)

Definition at line 871 of file os.c.

Referenced by load_configuration().

isc_boolean_t ns_os_issingleton ( const char *  filename  ) 

Definition at line 922 of file os.c.

Referenced by check_lockfile().

void ns_os_shutdown ( void   ) 

Definition at line 977 of file os.c.

Referenced by fatal(), and main().

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 
)

Definition at line 1004 of file os.c.

Referenced by ns_control_docommand().

void ns_os_tzset ( void   ) 

Definition at line 1038 of file os.c.

Referenced by setup().

void ns_os_started ( void   ) 

Definition at line 468 of file os.c.

References dfd, and ns_main_earlyfatal().

Referenced by view_loaded().


Generated on Tue Apr 28 17:41:15 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha