2
0
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:
Todd C. Miller
2023-09-25 10:13:28 -06:00
parent 884b025962
commit e343e07543
373 changed files with 1253 additions and 1253 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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 */

View File

@@ -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. */

View File

@@ -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

View File

@@ -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
/* /*

View File

@@ -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

View File

@@ -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]) && \

View File

@@ -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);

View File

@@ -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.

View File

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

View File

@@ -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;

View File

@@ -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);

View File

@@ -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[]);

View File

@@ -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[]);

View File

@@ -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[]);

View File

@@ -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[]);

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View 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>
void void
iolog_clearerr(struct iolog_file *iol) iolog_clearerr(struct iolog_file *iol)

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.

View File

@@ -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.

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

View File

@@ -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,

View File

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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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};

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View 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.

View File

@@ -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.

View File

@@ -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;

View 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 #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.

View File

@@ -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.

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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[]);

View File

@@ -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[]);

View File

@@ -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[]);

View File

@@ -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];

View File

@@ -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[]);

View File

@@ -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)
{ {

View File

@@ -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

View File

@@ -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().

View File

@@ -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

View File

@@ -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"

View File

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

View File

@@ -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

View File

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

View File

@@ -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

View File

@@ -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

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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;

View File

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

View File

@@ -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);

View File

@@ -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

View File

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

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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. */

View File

@@ -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.

View File

@@ -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";

View File

@@ -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.

View File

@@ -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 '.'

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -26,7 +26,7 @@
#ifndef HAVE_ISBLANK #ifndef HAVE_ISBLANK
#include "sudo_compat.h" #include <sudo_compat.h>
#undef isblank #undef isblank
int int

View File

@@ -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.

View File

@@ -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.

View File

@@ -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,

View File

@@ -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.

View File

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

View File

@@ -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.

View File

@@ -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.

View File

@@ -28,7 +28,7 @@
#include <sys/types.h> #include <sys/types.h>
#include "sudo_compat.h" #include <sudo_compat.h>
/* /*
* Reverse memchr() * Reverse memchr()

View File

@@ -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

View File

@@ -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