From: Todd C. Miller Date: Tue, 7 Sep 2010 20:45:19 +0000 (-0400) Subject: Make local includes consistent; use double quotes for local includes X-Git-Tag: SUDO_1_8_0~261 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10c3bb62c441f690ba840323b5544b68a19770fe;p=sudo Make local includes consistent; use double quotes for local includes except for generated ones where we use angle brackets. Also g/c unused compat.h. --- diff --git a/common/alloc.c b/common/alloc.c index ef11c1794..01b241cff 100644 --- a/common/alloc.c +++ b/common/alloc.c @@ -45,9 +45,9 @@ # include #endif -#include -#include -#include +#include "missing.h" +#include "alloc.h" +#include "error.h" /* * If there is no SIZE_MAX or SIZE_T_MAX we have to assume that size_t diff --git a/common/atobool.c b/common/atobool.c index b056489af..f22aae8a0 100644 --- a/common/atobool.c +++ b/common/atobool.c @@ -38,7 +38,7 @@ # include #endif /* HAVE_STRINGS_H */ -#include +#include "missing.h" int atobool(const char *str) diff --git a/common/fileops.c b/common/fileops.c index fe319ebea..0779a1f80 100644 --- a/common/fileops.c +++ b/common/fileops.c @@ -44,11 +44,11 @@ # include #endif #ifndef HAVE_TIMESPEC -# include +# include "compat/timespec.h" #endif -#include -#include +#include "missing.h" +#include "fileops.h" #ifndef LINE_MAX # define LINE_MAX 2048 diff --git a/common/fmt_string.c b/common/fmt_string.c index 5ece309f1..f2b301dc7 100644 --- a/common/fmt_string.c +++ b/common/fmt_string.c @@ -38,7 +38,7 @@ # include #endif /* HAVE_STRINGS_H */ -#include +#include "missing.h" /* * Allocate storage for a name=value string and return it. diff --git a/common/lbuf.c b/common/lbuf.c index 96bc978fb..690bb227f 100644 --- a/common/lbuf.c +++ b/common/lbuf.c @@ -42,10 +42,10 @@ #include #include -#include -#include -#include -#include +#include "missing.h" +#include "alloc.h" +#include "error.h" +#include "lbuf.h" void lbuf_init(struct lbuf *lbuf, int (*output)(const char *), diff --git a/common/list.c b/common/list.c index 88f8bdd91..d4d060eaa 100644 --- a/common/list.c +++ b/common/list.c @@ -29,10 +29,10 @@ # endif #endif /* STDC_HEADERS */ -#include -#include +#include "missing.h" +#include "list.h" #ifdef DEBUG -# include +# include "error.h" #endif struct list_proto { diff --git a/common/term.c b/common/term.c index 26069d2c1..02b1c45d2 100644 --- a/common/term.c +++ b/common/term.c @@ -38,7 +38,7 @@ #endif /* HAVE_STRINGS_H */ #include -#include +#include "missing.h" #ifndef TCSASOFT # define TCSASOFT 0 diff --git a/common/zero_bytes.c b/common/zero_bytes.c index 21041673f..f6f22bc4d 100644 --- a/common/zero_bytes.c +++ b/common/zero_bytes.c @@ -15,10 +15,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #include -#include -#include +#include "missing.h" /* * Like bzero(3) but with a volatile pointer. The hope is that diff --git a/compat/closefrom.c b/compat/closefrom.c index a91e4578b..71777e7b2 100644 --- a/compat/closefrom.c +++ b/compat/closefrom.c @@ -47,7 +47,7 @@ # endif #endif -#include +#include "missing.h" #ifndef HAVE_FCNTL_CLOSEM # ifndef HAVE_DIRFD diff --git a/compat/fnmatch.c b/compat/fnmatch.c index 421b16fec..5fdb0a434 100644 --- a/compat/fnmatch.c +++ b/compat/fnmatch.c @@ -49,9 +49,9 @@ # include #endif /* HAVE_STRINGS_H */ -#include -#include "fnmatch.h" #include "charclass.h" +#include "fnmatch.h" +#include "missing.h" #undef EOS #define EOS '\0' diff --git a/compat/getcwd.c b/compat/getcwd.c index d70c6af2b..dd443bde2 100644 --- a/compat/getcwd.c +++ b/compat/getcwd.c @@ -71,7 +71,7 @@ # endif #endif -#include +#include "missing.h" #define ISDOT(dp) \ (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \ diff --git a/compat/getgrouplist.c b/compat/getgrouplist.c index 165878913..69064894d 100644 --- a/compat/getgrouplist.c +++ b/compat/getgrouplist.c @@ -34,7 +34,7 @@ #endif /* HAVE_STRINGS_H */ #include -#include +#include "missing.h" /* * BSD-compatible getgrouplist(3) using getgrent(3) diff --git a/compat/getline.c b/compat/getline.c index 93f4952e7..606fd0e76 100644 --- a/compat/getline.c +++ b/compat/getline.c @@ -35,7 +35,7 @@ #endif /* HAVE_STRINGS_H */ #include -#include +#include "missing.h" #ifndef LINE_MAX # define LINE_MAX 2048 diff --git a/compat/getprogname.c b/compat/getprogname.c index 88c7433a7..34673f5f6 100644 --- a/compat/getprogname.c +++ b/compat/getprogname.c @@ -21,7 +21,7 @@ #include #include -#include +#include "missing.h" static const char *progname = "sudo"; diff --git a/compat/glob.c b/compat/glob.c index b09cfe5f5..5f53f5e18 100644 --- a/compat/glob.c +++ b/compat/glob.c @@ -95,7 +95,7 @@ #include #include -#include +#include "missing.h" #include "glob.h" #include "charclass.h" diff --git a/compat/isblank.c b/compat/isblank.c index cd41950a4..dc138874a 100644 --- a/compat/isblank.c +++ b/compat/isblank.c @@ -18,7 +18,7 @@ #include -#include +#include "missing.h" #undef isblank int diff --git a/compat/memrchr.c b/compat/memrchr.c index 9b5cc9c8e..fa7479a75 100644 --- a/compat/memrchr.c +++ b/compat/memrchr.c @@ -14,9 +14,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include -#include + +#include + +#include "missing.h" /* * Reverse memchr() diff --git a/compat/mksiglist.c b/compat/mksiglist.c index 21c0c71a3..d77ce4523 100644 --- a/compat/mksiglist.c +++ b/compat/mksiglist.c @@ -30,7 +30,7 @@ #endif /* STDC_HEADERS */ #include -#include +#include "missing.h" int main(int argc, char *argv[]) diff --git a/compat/mkstemps.c b/compat/mkstemps.c index 3026ce0b6..04898937e 100644 --- a/compat/mkstemps.c +++ b/compat/mkstemps.c @@ -36,7 +36,7 @@ # include #endif -#include +#include "missing.h" static unsigned int get_random(void); static void seed_random(void); diff --git a/compat/nanosleep.c b/compat/nanosleep.c index 63620cd27..d390defc8 100644 --- a/compat/nanosleep.c +++ b/compat/nanosleep.c @@ -29,7 +29,7 @@ #endif #include -#include +#include "missing.h" int nanosleep(const struct timespec *ts, struct timespec *rts) diff --git a/compat/setenv.c b/compat/setenv.c index ae9576c76..cff0c2615 100644 --- a/compat/setenv.c +++ b/compat/setenv.c @@ -38,7 +38,7 @@ #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #include -#include +#include "missing.h" int setenv(const char *var, const char *val, int overwrite) diff --git a/compat/snprintf.c b/compat/snprintf.c index 7de9145bd..184db1014 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -71,7 +71,7 @@ #include #include -#include +#include "missing.h" static int xxxprintf(char **, size_t, int, const char *, va_list); diff --git a/compat/strlcat.c b/compat/strlcat.c index a24ef49e6..91313e6f9 100644 --- a/compat/strlcat.c +++ b/compat/strlcat.c @@ -17,11 +17,12 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #include #include -#include -#include +#include "missing.h" /* * Appends src to string dst of size siz (unlike strncat, siz is the diff --git a/compat/strlcpy.c b/compat/strlcpy.c index 9432e9304..df29dd2de 100644 --- a/compat/strlcpy.c +++ b/compat/strlcpy.c @@ -17,10 +17,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #include -#include -#include +#include "missing.h" /* * Copy src to string dst of size siz. At most siz-1 characters diff --git a/compat/strsignal.c b/compat/strsignal.c index ec5030edc..f68fb9dfe 100644 --- a/compat/strsignal.c +++ b/compat/strsignal.c @@ -21,7 +21,7 @@ #include #include -#include +#include "missing.h" #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1 # define my_sys_siglist sys_siglist diff --git a/compat/unsetenv.c b/compat/unsetenv.c index 6304d38fd..f7cfaa76b 100644 --- a/compat/unsetenv.c +++ b/compat/unsetenv.c @@ -35,7 +35,7 @@ #endif /* HAVE_STRINGS_H */ #include -#include +#include "missing.h" extern char **environ; /* global environment */ diff --git a/compat/utimes.c b/compat/utimes.c index f4aa2d4e5..626f725e9 100644 --- a/compat/utimes.c +++ b/compat/utimes.c @@ -30,7 +30,7 @@ # include "utime.h" #endif -#include +#include "missing.h" #ifndef HAVE_UTIMES /* diff --git a/include/compat.h b/include/compat.h deleted file mode 100644 index 2ca605c5e..000000000 --- a/include/compat.h +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) 1996, 1998-2005, 2008, 2009-2010 - * Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Sponsored in part by the Defense Advanced Research Projects - * Agency (DARPA) and Air Force Research Laboratory, Air Force - * Materiel Command, USAF, under agreement number F39502-99-1-0512. - */ - -#ifndef _SUDO_MISSING_H -#define _SUDO_MISSING_H - -/* - * Macros and functions that may be missing on some operating systems. - */ - -/* Define away __attribute__ for non-gcc or old gcc */ -#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5 -# define __attribute__(x) -#endif - -/* For silencing gcc warnings about rcsids */ -#ifndef __unused -# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 7) -# define __unused __attribute__((__unused__)) -# else -# define __unused -# endif -#endif - -/* For catching format string mismatches */ -#ifndef __printflike -# if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define __printflike(f, v) __attribute__((__format__ (__printf__, f, v))) -# else -# define __printflike(f, v) -# endif -#endif - -/* - * Some systems lack full limit definitions. - */ -#ifndef OPEN_MAX -# define OPEN_MAX 256 -#endif - -#ifndef INT_MAX -# define INT_MAX 0x7fffffff -#endif - -#ifndef PATH_MAX -# ifdef MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# else -# ifdef _POSIX_PATH_MAX -# define PATH_MAX _POSIX_PATH_MAX -# else -# define PATH_MAX 1024 -# endif -# endif -#endif - -#ifndef MAXHOSTNAMELEN -# define MAXHOSTNAMELEN 64 -#endif - -/* - * Posix versions for those without... - */ -#ifndef _S_IFMT -# define _S_IFMT S_IFMT -#endif /* _S_IFMT */ -#ifndef _S_IFREG -# define _S_IFREG S_IFREG -#endif /* _S_IFREG */ -#ifndef _S_IFDIR -# define _S_IFDIR S_IFDIR -#endif /* _S_IFDIR */ -#ifndef _S_IFLNK -# define _S_IFLNK S_IFLNK -#endif /* _S_IFLNK */ -#ifndef S_ISREG -# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) -#endif /* S_ISREG */ -#ifndef S_ISDIR -# define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) -#endif /* S_ISDIR */ - -/* - * Some OS's may not have this. - */ -#ifndef S_IRWXU -# define S_IRWXU 0000700 /* rwx for owner */ -#endif /* S_IRWXU */ - -/* - * These should be defined in but not everyone has them. - */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - -/* - * BSD defines these in but others may not. - */ -#ifndef MIN -# define MIN(a,b) (((a)<(b))?(a):(b)) -#endif -#ifndef MAX -# define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -/* - * Simple isblank() macro and function for systems without it. - */ -#ifndef HAVE_ISBLANK -int isblank(int); -# define isblank(_x) ((_x) == ' ' || (_x) == '\t') -#endif - -/* - * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason. - */ -#ifdef HAVE__INNETGR -# define innetgr(n, h, u, d) (_innetgr(n, h, u, d)) -# define HAVE_INNETGR 1 -#endif /* HAVE__INNETGR */ - -/* - * On POSIX systems, O_NOCTTY is the default so some OS's may lack this define. - */ -#ifndef O_NOCTTY -# define O_NOCTTY 0 -#endif /* O_NOCTTY */ - -/* - * Add IRIX-like sigaction_t for those without it. - * SA_RESTART is not required by POSIX; SunOS has SA_INTERRUPT instead. - */ -#ifndef HAVE_SIGACTION_T -typedef struct sigaction sigaction_t; -#endif -#ifndef SA_INTERRUPT -# define SA_INTERRUPT 0 -#endif -#ifndef SA_RESTART -# define SA_RESTART 0 -#endif - -/* - * If dirfd() does not exists, hopefully dd_fd does. - */ -#if !defined(HAVE_DIRFD) && defined(HAVE_DD_FD) -# define dirfd(_d) ((_d)->dd_fd) -# define HAVE_DIRFD -#endif - -/* - * Define futimes() in terms of futimesat() if needed. - */ -#if !defined(HAVE_FUTIMES) && defined(HAVE_FUTIMESAT) -# define futimes(_f, _tv) futimesat(_f, NULL, _tv) -# define HAVE_FUTIMES -#endif - -#if !defined(HAVE_KILLPG) && !defined(killpg) -# define killpg(s) kill(-(s)) -#endif - -/* - * If we lack getprogname(), emulate with __progname if possible. - * Otherwise, add a prototype for use with our own getprogname.c. - */ -#ifndef HAVE_GETPROGNAME -# ifdef HAVE___PROGNAME -extern const char *__progname; -# define getprogname() (__progname) -# else -const char *getprogname(void); -void setprogname(const char *); -#endif /* HAVE___PROGNAME */ -#endif /* !HAVE_GETPROGNAME */ - -#ifndef timevalclear -# define timevalclear(tv) ((tv)->tv_sec = (tv)->tv_usec = 0) -#endif -#ifndef timevalisset -# define timevalisset(tv) ((tv)->tv_sec || (tv)->tv_usec) -#endif -#ifndef timevalcmp -# define timevalcmp(tv1, tv2, op) \ - (((tv1)->tv_sec == (tv2)->tv_sec) ? \ - ((tv1)->tv_usec op (tv2)->tv_usec) : \ - ((tv1)->tv_sec op (tv2)->tv_sec)) -#endif -#ifndef timevaladd -# define timevaladd(tv1, tv2) \ - do { \ - (tv1)->tv_sec += (tv2)->tv_sec; \ - (tv1)->tv_usec += (tv2)->tv_usec; \ - if ((tv1)->tv_usec >= 1000000) { \ - (tv1)->tv_sec++; \ - (tv1)->tv_usec -= 1000000; \ - } \ - } while (0) -#endif -#ifndef timevalsub -# define timevalsub(tv1, tv2) \ - do { \ - (tv1)->tv_sec -= (tv2)->tv_sec; \ - (tv1)->tv_usec -= (tv2)->tv_usec; \ - if ((tv1)->tv_usec < 0) { \ - (tv1)->tv_sec--; \ - (tv1)->tv_usec += 1000000; \ - } \ - } while (0) -#endif - -/* Not all systems define NSIG in signal.h */ -#if !defined(NSIG) -# if defined(_NSIG) -# define NSIG _NSIG -# elif defined(__NSIG) -# define NSIG __NSIG -# else -# define NSIG 64 -# endif -#endif - -#ifndef WCOREDUMP -# define WCOREDUMP(x) ((x) & 0x80) -#endif - -#ifndef HAVE_SETEUID -# if defined(HAVE_SETRESUID) -# define seteuid(u) setresuid(-1, (u), -1) -# define setegid(g) setresgid(-1, (g), -1) -# define HAVE_SETEUID 1 -# elif defined(HAVE_SETREUID) -# define seteuid(u) setreuid(-1, (u)) -# define setegid(g) setregid(-1, (g)) -# define HAVE_SETEUID 1 -# endif -#endif /* HAVE_SETEUID */ - -#include -#include - -/* Functions "missing" from libc. */ - -struct timeval; -struct timespec; - -#ifndef HAVE_CLOSEFROM -void closefrom(int); -#endif -#ifndef HAVE_GETCWD -char *getcwd(char *, size_t size); -#endif -#ifndef HAVE_GETLINE -ssize_t getline(char **, size_t *, FILE *); -#endif -#ifndef HAVE_UTIMES -int utimes(const char *, const struct timeval *); -#endif -#ifdef HAVE_FUTIME -int futimes(int, const struct timeval *); -#endif -#ifndef HAVE_SNPRINTF -int snprintf(char *, size_t, const char *, ...) __printflike(3, 4); -#endif -#ifndef HAVE_VSNPRINTF -int vsnprintf(char *, size_t, const char *, va_list) __printflike(3, 0); -#endif -#ifndef HAVE_ASPRINTF -int asprintf(char **, const char *, ...) __printflike(2, 3); -#endif -#ifndef HAVE_VASPRINTF -int vasprintf(char **, const char *, va_list) __printflike(2, 0); -#endif -#ifndef HAVE_STRLCAT -size_t strlcat(char *, const char *, size_t); -#endif -#ifndef HAVE_STRLCPY -size_t strlcpy(char *, const char *, size_t); -#endif -#ifndef HAVE_MEMRCHR -void *memrchr(const void *, int, size_t); -#endif -#ifndef HAVE_MKSTEMPS -int mkstemps(char *, int); -#endif -#ifndef HAVE_NANOSLEEP -int nanosleep(const struct timespec *, struct timespec *); -#endif -#ifndef HAVE_SETENV -int setenv(const char *, const char *, int); -#endif -#ifndef HAVE_UNSETENV -int unsetenv(const char *); -#endif -#ifndef HAVE_STRSIGNAL -char *strsignal(int); -#endif - -#endif /* _SUDO_MISSING_H */ diff --git a/plugins/sample/sample_plugin.c b/plugins/sample/sample_plugin.c index a8a08c037..a7f13a50f 100644 --- a/plugins/sample/sample_plugin.c +++ b/plugins/sample/sample_plugin.c @@ -49,9 +49,9 @@ #include #include -#include -#include #include +#include "sudo_plugin.h" +#include "missing.h" /* * Sample plugin module that allows any user who knows the password diff --git a/plugins/sample_group/getgrent.c b/plugins/sample_group/getgrent.c index 4c4225bb8..714bd6fa3 100644 --- a/plugins/sample_group/getgrent.c +++ b/plugins/sample_group/getgrent.c @@ -45,7 +45,7 @@ #include #include -#include +#include "missing.h" #ifndef LINE_MAX # define LINE_MAX 2048 diff --git a/plugins/sample_group/plugin_test.c b/plugins/sample_group/plugin_test.c index 5ffb697c0..69396f6bb 100644 --- a/plugins/sample_group/plugin_test.c +++ b/plugins/sample_group/plugin_test.c @@ -29,7 +29,7 @@ #include #include -#include +#include "sudo_plugin.h" /* * Simple driver to test sudoer group plugins. diff --git a/plugins/sample_group/sample_group.c b/plugins/sample_group/sample_group.c index d44179559..dbd1c2709 100644 --- a/plugins/sample_group/sample_group.c +++ b/plugins/sample_group/sample_group.c @@ -48,8 +48,8 @@ #include #include -#include -#include +#include "sudo_plugin.h" +#include "missing.h" /* * Sample sudoers group plugin that uses an extra group file with the diff --git a/plugins/sudoers/audit.c b/plugins/sudoers/audit.c index edb1dae0a..2cb113083 100644 --- a/plugins/sudoers/audit.c +++ b/plugins/sudoers/audit.c @@ -28,7 +28,7 @@ #endif /* STDC_HEADERS */ #include -#include +#include "missing.h" #include "logging.h" #ifdef HAVE_BSM_AUDIT diff --git a/plugins/sudoers/auth/afs.c b/plugins/sudoers/auth/afs.c index ef5451148..57d99f3e8 100644 --- a/plugins/sudoers/auth/afs.c +++ b/plugins/sudoers/auth/afs.c @@ -43,12 +43,12 @@ #endif /* HAVE_UNISTD_H */ #include -#include "sudoers.h" -#include "sudo_auth.h" - #include #include +#include "sudoers.h" +#include "sudo_auth.h" + int afs_verify(struct passwd *pw, char *pass, sudo_auth *auth) { diff --git a/plugins/sudoers/boottime.c b/plugins/sudoers/boottime.c index c4787b2b9..19634a664 100644 --- a/plugins/sudoers/boottime.c +++ b/plugins/sudoers/boottime.c @@ -47,7 +47,7 @@ # include #endif -#include +#include "missing.h" /* * Fill in a struct timeval with the time the system booted. diff --git a/plugins/sudoers/getdate.c b/plugins/sudoers/getdate.c index c9dee68b0..07091af36 100644 --- a/plugins/sudoers/getdate.c +++ b/plugins/sudoers/getdate.c @@ -50,7 +50,7 @@ #endif #include -#include +#include "missing.h" #define EPOCH 1970 diff --git a/plugins/sudoers/getdate.y b/plugins/sudoers/getdate.y index 23ab34c0b..13483ff31 100644 --- a/plugins/sudoers/getdate.y +++ b/plugins/sudoers/getdate.y @@ -39,7 +39,7 @@ #endif #include -#include +#include "missing.h" #define EPOCH 1970 diff --git a/plugins/sudoers/linux_audit.c b/plugins/sudoers/linux_audit.c index a623307e6..b7a94bb22 100644 --- a/plugins/sudoers/linux_audit.c +++ b/plugins/sudoers/linux_audit.c @@ -31,10 +31,10 @@ #include #include -#include -#include -#include -#include +#include "missing.h" +#include "error.h" +#include "alloc.h" +#include "linux_audit.h" /* * Open audit connection if possible. diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index 2076f1ee5..acdabd825 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -83,10 +83,10 @@ #include #ifndef HAVE_FNMATCH -# include +# include "compat/fnmatch.h" #endif /* HAVE_FNMATCH */ #ifndef HAVE_EXTENDED_GLOB -# include +# include "compat/glob.h" #endif /* HAVE_EXTENDED_GLOB */ static struct member_list empty; diff --git a/plugins/sudoers/plugin_error.c b/plugins/sudoers/plugin_error.c index 4eec45256..2513d018b 100644 --- a/plugins/sudoers/plugin_error.c +++ b/plugins/sudoers/plugin_error.c @@ -24,10 +24,10 @@ #include #include -#include -#include -#include -#include +#include "missing.h" +#include "alloc.h" +#include "error.h" +#include "sudo_plugin.h" static void _warning(int, const char *, va_list); void cleanup(int); diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index 33df8c252..3f1266966 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -85,9 +85,9 @@ #include -#include -#include -#include +#include "alloc.h" +#include "error.h" +#include "missing.h" #ifndef LINE_MAX # define LINE_MAX 2048 diff --git a/plugins/sudoers/timestr.c b/plugins/sudoers/timestr.c index bdcf00935..97309c092 100644 --- a/plugins/sudoers/timestr.c +++ b/plugins/sudoers/timestr.c @@ -28,7 +28,7 @@ #endif /* STDC_HEADERS */ #include -#include +#include "missing.h" char *get_timestr(time_t, int); diff --git a/src/error.c b/src/error.c index 222804768..8e2678998 100644 --- a/src/error.c +++ b/src/error.c @@ -23,7 +23,7 @@ #include #include -#include +#include "missing.h" #include "error.h" static void _warning(int, const char *, va_list); diff --git a/src/sesh.c b/src/sesh.c index e85d80bd0..e0aef78f8 100644 --- a/src/sesh.c +++ b/src/sesh.c @@ -27,7 +27,7 @@ #include #include -#include +#include "missing.h" int main (int argc, char *argv[]) diff --git a/src/sudo.h b/src/sudo.h index d83174c9d..36c994c8b 100644 --- a/src/sudo.h +++ b/src/sudo.h @@ -24,14 +24,14 @@ #ifndef _SUDO_SUDO_H #define _SUDO_SUDO_H -#include #include -#include -#include -#include -#include -#include +#include +#include "missing.h" +#include "alloc.h" +#include "error.h" +#include "fileops.h" +#include "list.h" #ifdef __TANDEM # define ROOT_UID 65535 diff --git a/src/sudo_noexec.c b/src/sudo_noexec.c index 9ff35dba6..d0c6047c7 100644 --- a/src/sudo_noexec.c +++ b/src/sudo_noexec.c @@ -24,7 +24,7 @@ #endif #include -#include +#include "missing.h" /* * Dummy versions of the execve() family of syscalls. We don't need diff --git a/src/ttysize.c b/src/ttysize.c index 3553dbbc7..b84efb0ca 100644 --- a/src/ttysize.c +++ b/src/ttysize.c @@ -34,7 +34,7 @@ #endif /* HAVE_UNISTD_H */ #include -#include +#include "missing.h" #if !defined(TIOCGSIZE) && defined(TIOCGWINSZ) # define TIOCGSIZE TIOCGWINSZ