comparison src/logerr.h @ 5526:b1a3d9055662 draft

privsep: Allow logfile reopening in a chroot Now that only the privileged actioneer does the actual logging we can safely reopen the file we are logging to. This also closes and re-opens the syslog connection.
author Roy Marples <roy@marples.name>
date Fri, 30 Oct 2020 14:19:16 +0000
parents 26b5d9bc2985
children 071a9ea18363
comparison
equal deleted inserted replaced
5525:26b5d9bc2985 5526:b1a3d9055662
74 #define logwarn(...) log_warn(__VA_ARGS__) 74 #define logwarn(...) log_warn(__VA_ARGS__)
75 #define logwarnx(...) log_warnx(__VA_ARGS__) 75 #define logwarnx(...) log_warnx(__VA_ARGS__)
76 #define logerr(...) log_err(__VA_ARGS__) 76 #define logerr(...) log_err(__VA_ARGS__)
77 #define logerrx(...) log_errx(__VA_ARGS__) 77 #define logerrx(...) log_errx(__VA_ARGS__)
78 78
79 /* For syslog in a chroot */ 79 /* For logging in a chroot */
80 int loggetsyslogfd(void); 80 int loggetfd(void);
81 void logsetsyslogfd(int); 81 void logsetfd(int);
82 int loghandlesyslogfd(int); 82 int logreadfd(int);
83 83
84 unsigned int loggetopts(void); 84 unsigned int loggetopts(void);
85 void logsetopts(unsigned int); 85 void logsetopts(unsigned int);
86 #define LOGERR_DEBUG (1U << 6) 86 #define LOGERR_DEBUG (1U << 6)
87 #define LOGERR_QUIET (1U << 7) 87 #define LOGERR_QUIET (1U << 7)