|
version 1.1.1.2, 2012/05/29 12:26:49
|
version 1.1.1.4, 2013/07/22 10:46:12
|
|
Line 1
|
Line 1
|
| /* |
/* |
| * Copyright (c) 1999-2005, 2009-2010 | * Copyright (c) 1999-2005, 2009-2013 |
| * Todd C. Miller <Todd.Miller@courtesan.com> |
* Todd C. Miller <Todd.Miller@courtesan.com> |
| * |
* |
| * Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
|
Line 15
|
Line 15
|
| * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| */ |
*/ |
| |
|
| #ifndef _LOGGING_H | #ifndef _SUDOERS_LOGGING_H |
| #define _LOGGING_H | #define _SUDOERS_LOGGING_H |
| |
|
| #include <syslog.h> |
#include <syslog.h> |
| #ifdef __STDC__ |
#ifdef __STDC__ |
|
Line 30
|
Line 30
|
| #define SLOG_FILE 0x02 |
#define SLOG_FILE 0x02 |
| #define SLOG_BOTH 0x03 |
#define SLOG_BOTH 0x03 |
| |
|
| /* Flags for log_error()/log_fatal() */ | /* |
| | * Values for sudoers_setlocale() |
| | */ |
| | #define SUDOERS_LOCALE_USER 0 |
| | #define SUDOERS_LOCALE_SUDOERS 1 |
| | |
| | /* Flags for log_warning()/log_fatal() */ |
| #define MSG_ONLY 0x01 |
#define MSG_ONLY 0x01 |
| #define USE_ERRNO 0x02 |
#define USE_ERRNO 0x02 |
| #define NO_MAIL 0x04 |
#define NO_MAIL 0x04 |
| #define NO_STDERR 0x08 |
#define NO_STDERR 0x08 |
| |
#define NO_LOG 0x10 |
| |
|
| /* |
/* |
| * Maximum number of characters to log per entry. The syslogger |
* Maximum number of characters to log per entry. The syslogger |
|
Line 51
|
Line 58
|
| */ |
*/ |
| #define LOG_INDENT " " |
#define LOG_INDENT " " |
| |
|
| void audit_success(char *[]); | bool sudoers_setlocale(int newlocale, int *prevlocale); |
| void audit_failure(char *[], char const * const, ...); | int sudoers_getlocale(void); |
| void log_allowed(int); | void audit_success(char *exec_args[]); |
| void log_denial(int, int); | void audit_failure(char *exec_args[], char const *const fmt, ...); |
| void log_error(int flags, const char *fmt, ...) __printflike(2, 3); | void log_allowed(int status); |
| | void log_auth_failure(int status, int tries); |
| | void log_denial(int status, bool inform_user); |
| | void log_failure(int status, int flags); |
| | void log_warning(int flags, const char *fmt, ...) __printflike(2, 3); |
| void log_fatal(int flags, const char *fmt, ...) __printflike(2, 3) __attribute__((__noreturn__)); |
void log_fatal(int flags, const char *fmt, ...) __printflike(2, 3) __attribute__((__noreturn__)); |
| void reapchild(int); | void sudoers_initlocale(const char *ulocale, const char *slocale); |
| void writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen); |
void writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen); |
| |
|
| #endif /* _LOGGING_H */ | #endif /* _SUDOERS_LOGGING_H */ |