mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 23:05:17 +00:00
Use #include <foo.h> instead of #include "foo.h" in most cases.
We rely on the include path to find many of these headers. It especially doesn't make sense to use #include "foo.h" for headers in the top-level include directory.
This commit is contained in:
@@ -22,10 +22,10 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
|
|
||||||
/* Flags for sudo_conf_read() */
|
/* Flags for sudo_conf_read() */
|
||||||
#define SUDO_CONF_DEBUG 0x01
|
#define SUDO_CONF_DEBUG 0x01
|
||||||
|
@@ -24,9 +24,9 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List of debug files and flags for use in registration.
|
* List of debug files and flags for use in registration.
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <time.h> /* for struct timespec */
|
#include <time.h> /* for struct timespec */
|
||||||
#include <signal.h> /* for sigatomic_t and NSIG */
|
#include <signal.h> /* for sigatomic_t and NSIG */
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
|
|
||||||
struct timeval; /* for deprecated APIs */
|
struct timeval; /* for deprecated APIs */
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
/* Supported event types. */
|
/* Supported event types. */
|
||||||
|
@@ -23,10 +23,10 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
#include "sudo_plugin.h" /* for conversation function */
|
#include <sudo_plugin.h> /* for conversation function */
|
||||||
|
|
||||||
/* No output to debug files when fuzzing. */
|
/* No output to debug files when fuzzing. */
|
||||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
#ifdef __TANDEM
|
#ifdef __TANDEM
|
||||||
|
@@ -47,16 +47,16 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "pathnames.h"
|
#include <pathnames.h>
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_lbuf.h"
|
#include <sudo_lbuf.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_json.h"
|
#include <sudo_json.h>
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#define IS_SESSID(s) ( \
|
#define IS_SESSID(s) ( \
|
||||||
isalnum((unsigned char)(s)[0]) && isalnum((unsigned char)(s)[1]) && \
|
isalnum((unsigned char)(s)[0]) && isalnum((unsigned char)(s)[1]) && \
|
||||||
|
@@ -47,15 +47,15 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "pathnames.h"
|
#include <pathnames.h>
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_json.h"
|
#include <sudo_json.h>
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
static FILE *eventlog_stub_open_log(int type, const char *logfile);
|
static FILE *eventlog_stub_open_log(int type, const char *logfile);
|
||||||
static void eventlog_stub_close_log(int type, FILE *fp);
|
static void eventlog_stub_close_log(int type, FILE *fp);
|
||||||
|
@@ -30,10 +30,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free the strings in a struct eventlog.
|
* Free the strings in a struct eventlog.
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
eventlog_writeln(FILE * restrict fp, char * restrict line, size_t linelen, size_t maxlen)
|
eventlog_writeln(FILE * restrict fp, char * restrict line, size_t linelen, size_t maxlen)
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -37,14 +37,14 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#include "parse_json.h"
|
#include <parse_json.h>
|
||||||
|
|
||||||
struct json_stack {
|
struct json_stack {
|
||||||
unsigned int depth;
|
unsigned int depth;
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
#ifndef PARSE_JSON_H
|
#ifndef PARSE_JSON_H
|
||||||
#define PARSE_JSON_H
|
#define PARSE_JSON_H
|
||||||
|
|
||||||
#include "sudo_json.h"
|
#include <sudo_json.h>
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
|
|
||||||
TAILQ_HEAD(json_item_list, json_item);
|
TAILQ_HEAD(json_item_list, json_item);
|
||||||
|
|
||||||
|
@@ -26,12 +26,12 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#include "parse_json.h"
|
#include <parse_json.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_lbuf.h"
|
#include <sudo_lbuf.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_plugin.h"
|
#include <sudo_plugin.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -26,12 +26,12 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#include "parse_json.h"
|
#include <parse_json.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -39,8 +39,8 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
||||||
|
|
||||||
|
@@ -26,17 +26,17 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse a string in the form host[:port] where host can also be
|
* Parse a string in the form host[:port] where host can also be
|
||||||
|
@@ -35,10 +35,10 @@
|
|||||||
|
|
||||||
# define NEED_INET_NTOP /* to expose sudo_inet_ntop in sudo_compat.h */
|
# define NEED_INET_NTOP /* to expose sudo_inet_ntop in sudo_compat.h */
|
||||||
|
|
||||||
# include "sudo_compat.h"
|
# include <sudo_compat.h>
|
||||||
# include "sudo_debug.h"
|
# include <sudo_debug.h>
|
||||||
# include "sudo_util.h"
|
# include <sudo_util.h>
|
||||||
# include "hostcheck.h"
|
# include <hostcheck.h>
|
||||||
|
|
||||||
#ifndef INET_ADDRSTRLEN
|
#ifndef INET_ADDRSTRLEN
|
||||||
# define INET_ADDRSTRLEN 16
|
# define INET_ADDRSTRLEN 16
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
iolog_clearerr(struct iolog_file *iol)
|
iolog_clearerr(struct iolog_file *iol)
|
||||||
|
@@ -28,15 +28,15 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close an I/O log.
|
* Close an I/O log.
|
||||||
|
@@ -30,14 +30,14 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pathnames.h"
|
#include <pathnames.h>
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
static unsigned int sessid_max = SESSID_MAX;
|
static unsigned int sessid_max = SESSID_MAX;
|
||||||
static mode_t iolog_filemode = S_IRUSR|S_IWUSR;
|
static mode_t iolog_filemode = S_IRUSR|S_IWUSR;
|
||||||
|
@@ -27,13 +27,13 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns true if at end of I/O log file, else false.
|
* Returns true if at end of I/O log file, else false.
|
||||||
|
@@ -29,19 +29,19 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
struct pwfilt_regex {
|
struct pwfilt_regex {
|
||||||
TAILQ_ENTRY(pwfilt_regex) entries;
|
TAILQ_ENTRY(pwfilt_regex) entries;
|
||||||
|
@@ -28,9 +28,9 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O log wrapper for fflush/gzflush.
|
* I/O log wrapper for fflush/gzflush.
|
||||||
|
@@ -28,16 +28,16 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Like fgets() but for struct iolog_file.
|
* Like fgets() but for struct iolog_file.
|
||||||
|
@@ -28,13 +28,13 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
bool
|
bool
|
||||||
iolog_parse_loginfo_json(FILE *fp, const char *iolog_dir, struct eventlog *evlog)
|
iolog_parse_loginfo_json(FILE *fp, const char *iolog_dir, struct eventlog *evlog)
|
||||||
|
@@ -28,20 +28,20 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
bool
|
bool
|
||||||
iolog_parse_loginfo_legacy(FILE *fp, const char *iolog_dir,
|
iolog_parse_loginfo_legacy(FILE *fp, const char *iolog_dir,
|
||||||
|
@@ -28,20 +28,20 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_json.h"
|
#include <sudo_json.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
struct eventlog *
|
struct eventlog *
|
||||||
iolog_parse_loginfo(int dfd, const char *iolog_dir)
|
iolog_parse_loginfo(int dfd, const char *iolog_dir)
|
||||||
|
@@ -29,18 +29,18 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create directory and any parent directories as needed.
|
* Create directory and any parent directories as needed.
|
||||||
|
@@ -30,17 +30,17 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create temporary directory and any parent directories as needed.
|
* Create temporary directory and any parent directories as needed.
|
||||||
|
@@ -29,13 +29,13 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create path and any intermediate directories.
|
* Create path and any intermediate directories.
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -37,12 +37,12 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the on-disk sequence number, set sessid to the next
|
* Read the on-disk sequence number, set sessid to the next
|
||||||
|
@@ -28,17 +28,17 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
static unsigned char const gzip_magic[2] = {0x1f, 0x8b};
|
static unsigned char const gzip_magic[2] = {0x1f, 0x8b};
|
||||||
|
|
||||||
|
@@ -29,18 +29,18 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrapper for openat(2) that sets umask and retries as iolog_uid/iolog_gid
|
* Wrapper for openat(2) that sets umask and retries as iolog_uid/iolog_gid
|
||||||
|
@@ -28,19 +28,19 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand any escape sequences in inpath, returning the expanded path.
|
* Expand any escape sequences in inpath, returning the expanded path.
|
||||||
|
@@ -27,16 +27,16 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read from a (possibly compressed) I/O log file.
|
* Read from a (possibly compressed) I/O log file.
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O log wrapper for fseek/gzseek.
|
* I/O log wrapper for fseek/gzseek.
|
||||||
|
@@ -28,16 +28,16 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set effective user and group-IDs to iolog_uid and iolog_gid.
|
* Set effective user and group-IDs to iolog_uid and iolog_gid.
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -39,13 +39,13 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
static int timing_event_adj;
|
static int timing_event_adj;
|
||||||
|
|
||||||
|
@@ -28,13 +28,13 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Map IOFD_* -> name.
|
* Map IOFD_* -> name.
|
||||||
|
@@ -27,16 +27,16 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write to an I/O log, optionally compressing.
|
* Write to an I/O log, optionally compressing.
|
||||||
|
@@ -26,13 +26,13 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_plugin.h"
|
#include <sudo_plugin.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
||||||
|
|
||||||
|
@@ -26,13 +26,13 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_plugin.h"
|
#include <sudo_plugin.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
||||||
|
|
||||||
|
@@ -30,16 +30,16 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_eventlog.h"
|
#include <sudo_eventlog.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_plugin.h"
|
#include <sudo_plugin.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
|
||||||
|
|
||||||
|
@@ -24,15 +24,15 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -26,11 +26,11 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
|
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
static struct iolog_escape_data {
|
static struct iolog_escape_data {
|
||||||
char sessid[7];
|
char sessid[7];
|
||||||
|
@@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_iolog.h"
|
#include <sudo_iolog.h>
|
||||||
|
|
||||||
sudo_dso_public int main(int argc, char *argv[]);
|
sudo_dso_public int main(int argc, char *argv[]);
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
#define PROTOBUF_C__NO_DEPRECATED
|
#define PROTOBUF_C__NO_DEPRECATED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "log_server.pb-c.h"
|
#include <log_server.pb-c.h>
|
||||||
void client_message__init
|
void client_message__init
|
||||||
(ClientMessage *message)
|
(ClientMessage *message)
|
||||||
{
|
{
|
||||||
|
@@ -56,10 +56,10 @@
|
|||||||
#elif defined(HAVE_MACHINE_ENDIAN_H)
|
#elif defined(HAVE_MACHINE_ENDIAN_H)
|
||||||
# include <machine/endian.h>
|
# include <machine/endian.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/endian.h"
|
# include <compat/endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "protobuf-c/protobuf-c.h"
|
#include <protobuf-c/protobuf-c.h>
|
||||||
|
|
||||||
#if BYTE_ORDER == BIG_ENDIAN
|
#if BYTE_ORDER == BIG_ENDIAN
|
||||||
# define WORDS_BIGENDIAN
|
# define WORDS_BIGENDIAN
|
||||||
|
@@ -31,8 +31,8 @@
|
|||||||
# endif
|
# endif
|
||||||
# include <openssl/ssl.h>
|
# include <openssl/ssl.h>
|
||||||
|
|
||||||
# include "sudo_compat.h"
|
# include <sudo_compat.h>
|
||||||
# include "sudo_ssl_compat.h"
|
# include <sudo_ssl_compat.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Emulate SSL_read_ex() using SSL_read().
|
* Emulate SSL_read_ex() using SSL_read().
|
||||||
|
@@ -31,11 +31,11 @@
|
|||||||
#include <usersec.h>
|
#include <usersec.h>
|
||||||
#include <uinfo.h>
|
#include <uinfo.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#ifdef HAVE_GETUSERATTR
|
#ifdef HAVE_GETUSERATTR
|
||||||
|
|
||||||
|
@@ -50,9 +50,9 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_rand.h"
|
#include <sudo_rand.h>
|
||||||
|
|
||||||
#define KEYSTREAM_ONLY
|
#define KEYSTREAM_ONLY
|
||||||
#include "chacha_private.h"
|
#include "chacha_private.h"
|
||||||
|
@@ -32,8 +32,8 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_rand.h"
|
#include <sudo_rand.h>
|
||||||
|
|
||||||
#define minimum(a, b) ((a) < (b) ? (a) : (b))
|
#define minimum(a, b) ((a) < (b) ? (a) : (b))
|
||||||
|
|
||||||
|
@@ -34,8 +34,8 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_rand.h"
|
#include <sudo_rand.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate a uniformly distributed random number less than upper_bound
|
* Calculate a uniformly distributed random number less than upper_bound
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GNU-compatible basename(3)
|
* GNU-compatible basename(3)
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
/* Non-standard termios input flags */
|
/* Non-standard termios input flags */
|
||||||
#ifndef IUCLC
|
#ifndef IUCLC
|
||||||
|
@@ -43,9 +43,9 @@
|
|||||||
# include <linux/close_range.h>
|
# include <linux/close_range.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "pathnames.h"
|
#include <pathnames.h>
|
||||||
|
|
||||||
#ifndef OPEN_MAX
|
#ifndef OPEN_MAX
|
||||||
# define OPEN_MAX 256
|
# define OPEN_MAX 256
|
||||||
|
@@ -32,14 +32,14 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_digest.h"
|
#include <sudo_digest.h>
|
||||||
|
|
||||||
#ifdef HAVE_SHA224UPDATE
|
#ifdef HAVE_SHA224UPDATE
|
||||||
# include <sha2.h>
|
# include <sha2.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/sha2.h"
|
# include <compat/sha2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct digest_function {
|
static struct digest_function {
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -34,9 +34,9 @@
|
|||||||
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_digest.h"
|
#include <sudo_digest.h>
|
||||||
|
|
||||||
#define SUDO_LIBGCRYPT_VERSION_MIN "1.3.0"
|
#define SUDO_LIBGCRYPT_VERSION_MIN "1.3.0"
|
||||||
|
|
||||||
|
@@ -31,9 +31,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_digest.h"
|
#include <sudo_digest.h>
|
||||||
|
|
||||||
struct sudo_digest {
|
struct sudo_digest {
|
||||||
EVP_MD_CTX *ctx;
|
EVP_MD_CTX *ctx;
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
sudo_dup3(int oldd, int newd, int flags)
|
sudo_dup3(int oldd, int newd, int flags)
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_event.h"
|
#include <sudo_event.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
static void sudo_ev_init(struct sudo_event *ev, int fd, int events,
|
static void sudo_ev_init(struct sudo_event *ev, int fd, int events,
|
||||||
sudo_ev_callback_t callback, void *closure);
|
sudo_ev_callback_t callback, void *closure);
|
||||||
|
@@ -30,11 +30,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_event.h"
|
#include <sudo_event.h>
|
||||||
|
|
||||||
#if defined(OPEN_MAX) && OPEN_MAX > 256
|
#if defined(OPEN_MAX) && OPEN_MAX > 256
|
||||||
# define SUDO_OPEN_MAX OPEN_MAX
|
# define SUDO_OPEN_MAX OPEN_MAX
|
||||||
|
@@ -35,11 +35,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_event.h"
|
#include <sudo_event.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
sudo_ev_base_alloc_impl(struct sudo_event_base *base)
|
sudo_ev_base_alloc_impl(struct sudo_event_base *base)
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif /* HAVE_STRINGS_H */
|
#endif /* HAVE_STRINGS_H */
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef HAVE_EXPLICIT_BZERO
|
#ifndef HAVE_EXPLICIT_BZERO
|
||||||
|
|
||||||
|
@@ -32,19 +32,19 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifndef HAVE_GETADDRINFO
|
#ifndef HAVE_GETADDRINFO
|
||||||
# include "compat/getaddrinfo.h"
|
# include <compat/getaddrinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_queue.h"
|
#include <sudo_queue.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_plugin.h"
|
#include <sudo_plugin.h>
|
||||||
|
|
||||||
struct sudo_fatal_callback {
|
struct sudo_fatal_callback {
|
||||||
SLIST_ENTRY(sudo_fatal_callback) entries;
|
SLIST_ENTRY(sudo_fatal_callback) entries;
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef HAVE_FCHMODAT
|
#ifndef HAVE_FCHMODAT
|
||||||
int
|
int
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef HAVE_FCHOWNAT
|
#ifndef HAVE_FCHOWNAT
|
||||||
int
|
int
|
||||||
|
@@ -102,9 +102,9 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "compat/charclass.h"
|
#include <compat/charclass.h>
|
||||||
#include "compat/fnmatch.h"
|
#include <compat/fnmatch.h>
|
||||||
|
|
||||||
#define RANGE_MATCH 1
|
#define RANGE_MATCH 1
|
||||||
#define RANGE_NOMATCH 0
|
#define RANGE_NOMATCH 0
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef HAVE_FREEZERO
|
#ifndef HAVE_FREEZERO
|
||||||
void
|
void
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef HAVE_FSTATAT
|
#ifndef HAVE_FSTATAT
|
||||||
int
|
int
|
||||||
|
@@ -50,8 +50,8 @@
|
|||||||
# include <resolv.h>
|
# include <resolv.h>
|
||||||
#endif /* NEED_RESOLV_H */
|
#endif /* NEED_RESOLV_H */
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "compat/getaddrinfo.h"
|
#include <compat/getaddrinfo.h>
|
||||||
|
|
||||||
/* We need access to h_errno to map errors from gethostbyname. */
|
/* We need access to h_errno to map errors from gethostbyname. */
|
||||||
#ifndef HAVE_DECL_H_ERRNO
|
#ifndef HAVE_DECL_H_ERRNO
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
sudo_getdelim(char **buf, size_t *bufsize, int delim, FILE *fp)
|
sudo_getdelim(char **buf, size_t *bufsize, int delim, FILE *fp)
|
||||||
|
@@ -76,9 +76,9 @@
|
|||||||
# include <openssl/rand.h>
|
# include <openssl/rand.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_digest.h"
|
#include <sudo_digest.h>
|
||||||
#include "sudo_rand.h"
|
#include <sudo_rand.h>
|
||||||
|
|
||||||
#if !defined(MAP_ANON) && defined(MAP_ANONYMOUS)
|
#if !defined(MAP_ANON) && defined(MAP_ANONYMOUS)
|
||||||
# define MAP_ANON MAP_ANONYMOUS
|
# define MAP_ANON MAP_ANONYMOUS
|
||||||
|
@@ -36,13 +36,13 @@
|
|||||||
# ifdef HAVE_NSS_DBDEFS_H
|
# ifdef HAVE_NSS_DBDEFS_H
|
||||||
# include <nss_dbdefs.h>
|
# include <nss_dbdefs.h>
|
||||||
# else
|
# else
|
||||||
# include "compat/nss_dbdefs.h"
|
# include <compat/nss_dbdefs.h>
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#ifndef HAVE_GETGROUPLIST
|
#ifndef HAVE_GETGROUPLIST
|
||||||
int
|
int
|
||||||
|
@@ -26,8 +26,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a malloc()ed copy of the system hostname, or NULL if
|
* Return a malloc()ed copy of the system hostname, or NULL if
|
||||||
|
@@ -64,9 +64,9 @@
|
|||||||
|
|
||||||
#define SUDO_ERROR_WRAP 0
|
#define SUDO_ERROR_WRAP 0
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "compat/getopt.h"
|
#include <compat/getopt.h>
|
||||||
|
|
||||||
#define GNU_COMPATIBLE /* Be more compatible with GNU getopt. */
|
#define GNU_COMPATIBLE /* Be more compatible with GNU getopt. */
|
||||||
|
|
||||||
|
@@ -32,9 +32,9 @@
|
|||||||
# include <mach/clock.h>
|
# include <mach/clock.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On Linux and FreeBSD, CLOCK_MONOTONIC does not run while sleeping.
|
* On Linux and FreeBSD, CLOCK_MONOTONIC does not run while sleeping.
|
||||||
|
@@ -27,12 +27,12 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#ifdef TESTSUDOERS
|
#ifdef TESTSUDOERS
|
||||||
# include "tsgetgrpw.h"
|
# include <tsgetgrpw.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *shellfile = "/etc/shell";
|
static const char *shellfile = "/etc/shell";
|
||||||
|
@@ -26,11 +26,11 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse a comma-separated list of gids into an allocated array of GETGROUPS_T.
|
* Parse a comma-separated list of gids into an allocated array of GETGROUPS_T.
|
||||||
|
@@ -73,9 +73,9 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "compat/glob.h"
|
#include <compat/glob.h>
|
||||||
#include "compat/charclass.h"
|
#include <compat/charclass.h>
|
||||||
|
|
||||||
#define DOLLAR '$'
|
#define DOLLAR '$'
|
||||||
#define DOT '.'
|
#define DOT '.'
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fake gmtime_r() that just stores the result.
|
* Fake gmtime_r() that just stores the result.
|
||||||
|
@@ -23,9 +23,9 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Converts a two-byte hex string to decimal.
|
* Converts a two-byte hex string to decimal.
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef EAFNOSUPPORT
|
#ifndef EAFNOSUPPORT
|
||||||
# define EAFNOSUPPORT EINVAL
|
# define EAFNOSUPPORT EINVAL
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef EAFNOSUPPORT
|
#ifndef EAFNOSUPPORT
|
||||||
# define EAFNOSUPPORT EINVAL
|
# define EAFNOSUPPORT EINVAL
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#ifndef HAVE_ISBLANK
|
#ifndef HAVE_ISBLANK
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#undef isblank
|
#undef isblank
|
||||||
int
|
int
|
||||||
|
@@ -29,16 +29,16 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_json.h"
|
#include <sudo_json.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Double the size of the json buffer.
|
* Double the size of the json buffer.
|
||||||
|
@@ -26,9 +26,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a new key=value pair and return it.
|
* Create a new key=value pair and return it.
|
||||||
|
@@ -29,10 +29,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_lbuf.h"
|
#include <sudo_lbuf.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
sudo_lbuf_init_v1(struct sudo_lbuf *lbuf, sudo_lbuf_output_t output,
|
sudo_lbuf_init_v1(struct sudo_lbuf *lbuf, sudo_lbuf_output_t output,
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fake localtime_r() that just stores the result.
|
* Fake localtime_r() that just stores the result.
|
||||||
|
@@ -33,15 +33,15 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
|
|
||||||
bool
|
bool
|
||||||
sudo_lock_file_v1(int fd, int type)
|
sudo_lock_file_v1(int fd, int type)
|
||||||
|
@@ -31,9 +31,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For converting between syslog numbers and strings.
|
* For converting between syslog numbers and strings.
|
||||||
|
@@ -31,9 +31,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For converting between syslog numbers and strings.
|
* For converting between syslog numbers and strings.
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reverse memchr()
|
* Reverse memchr()
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#ifdef HAVE_STDBOOL_H
|
#ifdef HAVE_STDBOOL_H
|
||||||
# include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#else
|
#else
|
||||||
# include "compat/stdbool.h"
|
# include <compat/stdbool.h>
|
||||||
#endif /* HAVE_STDBOOL_H */
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
#include "sudo_fatal.h"
|
#include <sudo_fatal.h>
|
||||||
#include "sudo_gettext.h"
|
#include <sudo_gettext.h>
|
||||||
#include "sudo_debug.h"
|
#include <sudo_debug.h>
|
||||||
#include "sudo_util.h"
|
#include <sudo_util.h>
|
||||||
|
|
||||||
#ifndef O_NOFOLLOW
|
#ifndef O_NOFOLLOW
|
||||||
# define O_NOFOLLOW 0
|
# define O_NOFOLLOW 0
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "sudo_compat.h"
|
#include <sudo_compat.h>
|
||||||
|
|
||||||
#ifndef HAVE_MKDIRAT
|
#ifndef HAVE_MKDIRAT
|
||||||
int
|
int
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user