From dd88460800fb76c37b089026eac92e60c5172c3e Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 18 May 2020 06:47:04 -0600 Subject: [PATCH] We no longer need to include headers we don't use for sudo*.h files. Previously we needed to include headers required by the various sudo*h files. Now those files are more self-sufficient and we should only include headers needed by code in the various .c files. --- lib/iolog/host_port.c | 4 - lib/iolog/iolog_fileio.c | 3 - lib/iolog/iolog_json.c | 2 - lib/iolog/iolog_path.c | 3 - lib/iolog/iolog_util.c | 1 - lib/iolog/regress/host_port/host_port_test.c | 1 - .../regress/iolog_json/check_iolog_json.c | 1 - .../regress/iolog_path/check_iolog_path.c | 1 - .../regress/iolog_util/check_iolog_util.c | 1 - lib/util/aix.c | 1 - lib/util/arc4random.c | 2 - lib/util/arc4random_buf.c | 1 - lib/util/arc4random_uniform.c | 1 - lib/util/cfmakeraw.c | 1 - lib/util/closefrom.c | 6 +- lib/util/digest.c | 10 - lib/util/digest_gcrypt.c | 5 - lib/util/digest_openssl.c | 11 - lib/util/dup3.c | 2 - lib/util/event_poll.c | 18 +- lib/util/event_select.c | 8 - lib/util/fatal.c | 2 - lib/util/fchmodat.c | 2 - lib/util/fnmatch.c | 3 - lib/util/fstatat.c | 2 - lib/util/getaddrinfo.c | 1 - lib/util/getcwd.c | 11 +- lib/util/getdelim.c | 2 - lib/util/getgrouplist.c | 2 - lib/util/gethostname.c | 2 - lib/util/getopt_long.c | 2 - lib/util/gettime.c | 5 - lib/util/getusershell.c | 4 - lib/util/gidlist.c | 3 - lib/util/glob.c | 1 - lib/util/isblank.c | 2 - lib/util/json.c | 5 - lib/util/key_val.c | 3 - lib/util/lbuf.c | 3 - lib/util/locking.c | 2 - lib/util/logfac.c | 3 - lib/util/logpri.c | 3 - lib/util/memset_s.c | 1 - lib/util/mkdir_parents.c | 3 - lib/util/mksiglist.c | 3 - lib/util/mksigname.c | 3 - lib/util/mktemp.c | 3 - lib/util/openat.c | 2 - lib/util/parseln.c | 3 - lib/util/pipe2.c | 2 - lib/util/progname.c | 2 - lib/util/pw_dup.c | 3 - lib/util/reallocarray.c | 1 - lib/util/regress/fnmatch/fnm_test.c | 1 - .../regress/getgrouplist/getgrouplist_test.c | 1 - lib/util/regress/glob/globtest.c | 1 - lib/util/regress/mktemp/mktemp_test.c | 3 - lib/util/regress/parse_gids/parse_gids_test.c | 6 - lib/util/regress/progname/progname_test.c | 6 - lib/util/regress/strsig/strsig_test.c | 6 - lib/util/regress/strsplit/strsplit_test.c | 6 - lib/util/regress/strtofoo/strtobool_test.c | 1 - lib/util/regress/strtofoo/strtoid_test.c | 1 - lib/util/regress/strtofoo/strtomode_test.c | 1 - lib/util/regress/strtofoo/strtonum_test.c | 1 - lib/util/regress/sudo_conf/conf_test.c | 6 - lib/util/regress/sudo_parseln/parseln_test.c | 6 - lib/util/regress/tailq/hltq_test.c | 6 - lib/util/regress/vsyslog/vsyslog_test.c | 6 - lib/util/roundup.c | 2 - lib/util/secure_path.c | 4 - lib/util/setgroups.c | 2 - lib/util/sha2.c | 3 - lib/util/sig2str.c | 4 - lib/util/snprintf.c | 1 - lib/util/str2sig.c | 4 - lib/util/strlcat.c | 1 - lib/util/strlcpy.c | 2 +- lib/util/strndup.c | 2 - lib/util/strsignal.c | 3 - lib/util/strsplit.c | 7 - lib/util/strtobool.c | 4 - lib/util/strtoid.c | 9 +- lib/util/strtomode.c | 2 - lib/util/strtonum.c | 11 - lib/util/sudo_conf.c | 1 - lib/util/sudo_debug.c | 1 - lib/util/sudo_dso.c | 2 - lib/util/term.c | 1 - lib/util/ttysize.c | 2 - lib/util/unlinkat.c | 2 - lib/util/utimens.c | 2 - lib/util/uuid.c | 1 - plugins/audit_json/audit_json.c | 3 - plugins/group_file/getgrent.c | 2 - plugins/group_file/group_file.c | 4 - plugins/group_file/plugin_test.c | 3 - plugins/python/regress/testhelpers.h | 2 - plugins/python/sudo_python_debug.h | 1 - plugins/sample/sample_plugin.c | 4 +- plugins/sample_approval/sample_approval.c | 3 - plugins/sudoers/alias.c | 2 - plugins/sudoers/audit.c | 3 +- plugins/sudoers/base64.c | 10 - plugins/sudoers/boottime.c | 7 +- plugins/sudoers/bsm_audit.c | 4 +- plugins/sudoers/check.c | 3 +- plugins/sudoers/cvtsudoers.c | 2 - plugins/sudoers/cvtsudoers_json.c | 2 - plugins/sudoers/cvtsudoers_ldif.c | 1 - plugins/sudoers/cvtsudoers_pwutil.c | 1 - plugins/sudoers/defaults.c | 2 - plugins/sudoers/digestname.c | 3 - plugins/sudoers/editor.c | 1 - plugins/sudoers/env.c | 2 - plugins/sudoers/env_pattern.c | 1 - plugins/sudoers/file.c | 12 - plugins/sudoers/filedigest.c | 7 - plugins/sudoers/find_path.c | 1 - plugins/sudoers/fmtsudoers.c | 1 - plugins/sudoers/gc.c | 3 - plugins/sudoers/gentime.c | 1 - plugins/sudoers/getdate.c | 85 ++++--- plugins/sudoers/getdate.y | 1 - plugins/sudoers/getspwuid.c | 3 - plugins/sudoers/gmtoff.c | 2 - plugins/sudoers/goodpath.c | 2 - plugins/sudoers/gram.c | 214 +++++++++--------- plugins/sudoers/gram.y | 6 - plugins/sudoers/group_plugin.c | 3 - plugins/sudoers/hexchar.c | 3 - plugins/sudoers/interfaces.c | 1 - plugins/sudoers/iolog_client.c | 5 - plugins/sudoers/iolog_path_escapes.c | 3 - plugins/sudoers/ldap_conf.c | 3 - plugins/sudoers/linux_audit.c | 1 - plugins/sudoers/locale.c | 1 - plugins/sudoers/logging.c | 3 - plugins/sudoers/logwrap.c | 1 - plugins/sudoers/match.c | 1 - plugins/sudoers/match_command.c | 1 - plugins/sudoers/match_digest.c | 2 - plugins/sudoers/parse.c | 3 - plugins/sudoers/parse_ldif.c | 1 - plugins/sudoers/prompt.c | 2 - plugins/sudoers/pwutil.c | 3 - plugins/sudoers/pwutil_impl.c | 1 - plugins/sudoers/rcstr.c | 8 - plugins/sudoers/redblack.c | 2 - .../regress/check_symbols/check_symbols.c | 1 - .../regress/env_match/check_env_pattern.c | 3 - .../regress/iolog_plugin/check_iolog_plugin.c | 2 - plugins/sudoers/regress/logging/check_wrap.c | 1 - plugins/sudoers/regress/parser/check_addr.c | 3 - plugins/sudoers/regress/parser/check_base64.c | 6 - plugins/sudoers/regress/parser/check_digest.c | 12 - plugins/sudoers/regress/parser/check_fill.c | 3 - .../sudoers/regress/parser/check_gentime.c | 1 - .../sudoers/regress/parser/check_hexchar.c | 6 - .../regress/starttime/check_starttime.c | 1 - plugins/sudoers/set_perms.c | 1 - plugins/sudoers/solaris_audit.c | 4 +- plugins/sudoers/sssd.c | 10 +- plugins/sudoers/strlist.c | 2 - plugins/sudoers/stubs.c | 2 - plugins/sudoers/sudo_nss.c | 6 - plugins/sudoers/sudo_printf.c | 2 - plugins/sudoers/sudoers.c | 2 - plugins/sudoers/sudoers_debug.c | 8 - plugins/sudoers/sudoreplay.c | 2 +- plugins/sudoers/testsudoers.c | 10 +- plugins/sudoers/timeout.c | 2 - plugins/sudoers/timestamp.c | 2 - plugins/sudoers/timestr.c | 3 - plugins/sudoers/toke_util.c | 3 - plugins/sudoers/tsdump.c | 2 - plugins/sudoers/tsgetgrpw.c | 2 - plugins/sudoers/visudo.c | 1 - plugins/system_group/system_group.c | 9 - src/conversation.c | 1 - src/copy_file.c | 3 - src/env_hooks.c | 3 - src/exec.c | 2 - src/exec_common.c | 3 - src/exec_nopty.c | 1 - src/get_pty.c | 3 - src/hooks.c | 3 - src/limits.c | 3 - src/load_plugins.c | 2 - src/openbsd.c | 11 - src/parse_args.c | 5 - src/preload.c | 1 - src/preserve_fds.c | 3 - src/selinux.c | 1 - src/sesh.c | 1 - src/signal.c | 5 - src/solaris.c | 15 +- src/sudo_edit.c | 1 - src/tcsetpgrp_nobg.c | 3 - src/tgetpass.c | 2 - src/utmp.c | 3 - 201 files changed, 171 insertions(+), 771 deletions(-) diff --git a/lib/iolog/host_port.c b/lib/iolog/host_port.c index 882f174f8..c334f8b32 100644 --- a/lib/iolog/host_port.c +++ b/lib/iolog/host_port.c @@ -18,17 +18,13 @@ #include "config.h" -#include - #ifdef HAVE_STDBOOL_H # include #else # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ #include -#include #include -#include #include "sudo_gettext.h" /* must be included before sudo_compat.h */ #include "sudo_compat.h" diff --git a/lib/iolog/iolog_fileio.c b/lib/iolog/iolog_fileio.c index 420dd3ac3..8c4058163 100644 --- a/lib/iolog/iolog_fileio.c +++ b/lib/iolog/iolog_fileio.c @@ -23,7 +23,6 @@ #include -#include #include #include #include @@ -42,8 +41,6 @@ #include #include #include -#include -#include #include "sudo_gettext.h" /* must be included before sudo_compat.h */ #include "sudo_compat.h" diff --git a/lib/iolog/iolog_json.c b/lib/iolog/iolog_json.c index 18f898f59..11bf7c719 100644 --- a/lib/iolog/iolog_json.c +++ b/lib/iolog/iolog_json.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H @@ -39,7 +38,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include #include #include diff --git a/lib/iolog/iolog_path.c b/lib/iolog/iolog_path.c index e571646de..7ec198d8c 100644 --- a/lib/iolog/iolog_path.c +++ b/lib/iolog/iolog_path.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H @@ -37,8 +36,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #include #include #include diff --git a/lib/iolog/iolog_util.c b/lib/iolog/iolog_util.c index 85cdcf006..ec65b79bb 100644 --- a/lib/iolog/iolog_util.c +++ b/lib/iolog/iolog_util.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H diff --git a/lib/iolog/regress/host_port/host_port_test.c b/lib/iolog/regress/host_port/host_port_test.c index fdf4f00a0..fd67b5a80 100644 --- a/lib/iolog/regress/host_port/host_port_test.c +++ b/lib/iolog/regress/host_port/host_port_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/iolog/regress/iolog_json/check_iolog_json.c b/lib/iolog/regress/iolog_json/check_iolog_json.c index b7673ecbb..e6f28aae9 100644 --- a/lib/iolog/regress/iolog_json/check_iolog_json.c +++ b/lib/iolog/regress/iolog_json/check_iolog_json.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/iolog/regress/iolog_path/check_iolog_path.c b/lib/iolog/regress/iolog_path/check_iolog_path.c index 4e5dc683c..b25cb2be4 100644 --- a/lib/iolog/regress/iolog_path/check_iolog_path.c +++ b/lib/iolog/regress/iolog_path/check_iolog_path.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/iolog/regress/iolog_util/check_iolog_util.c b/lib/iolog/regress/iolog_util/check_iolog_util.c index f72657f5e..09ca79411 100644 --- a/lib/iolog/regress/iolog_util/check_iolog_util.c +++ b/lib/iolog/regress/iolog_util/check_iolog_util.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/aix.c b/lib/util/aix.c index cfc793b32..e14fb7c38 100644 --- a/lib/util/aix.c +++ b/lib/util/aix.c @@ -23,7 +23,6 @@ #include -#include #include #include diff --git a/lib/util/arc4random.c b/lib/util/arc4random.c index 15fc9a0b3..4e5994951 100644 --- a/lib/util/arc4random.c +++ b/lib/util/arc4random.c @@ -34,8 +34,6 @@ #ifndef HAVE_ARC4RANDOM -#include -#include #ifdef HAVE_SYS_RANDOM_H # include #endif diff --git a/lib/util/arc4random_buf.c b/lib/util/arc4random_buf.c index 41ddc1d29..ee4c608ef 100644 --- a/lib/util/arc4random_buf.c +++ b/lib/util/arc4random_buf.c @@ -25,7 +25,6 @@ #ifndef HAVE_ARC4RANDOM_BUF -#include #include #if defined(HAVE_STDINT_H) # include diff --git a/lib/util/arc4random_uniform.c b/lib/util/arc4random_uniform.c index bef2ae87c..3299a14da 100644 --- a/lib/util/arc4random_uniform.c +++ b/lib/util/arc4random_uniform.c @@ -27,7 +27,6 @@ #ifndef HAVE_ARC4RANDOM_UNIFORM -#include #include #if defined(HAVE_STDINT_H) # include diff --git a/lib/util/cfmakeraw.c b/lib/util/cfmakeraw.c index 1985131f2..7ad4e549f 100644 --- a/lib/util/cfmakeraw.c +++ b/lib/util/cfmakeraw.c @@ -23,7 +23,6 @@ #include -#include #include #include "sudo_compat.h" diff --git a/lib/util/closefrom.c b/lib/util/closefrom.c index fa390177f..56b31296a 100644 --- a/lib/util/closefrom.c +++ b/lib/util/closefrom.c @@ -26,12 +26,10 @@ #ifndef HAVE_CLOSEFROM -#include -#include -#include -#include +#include #include #include +#include #ifdef HAVE_PSTAT_GETPROC # include #else diff --git a/lib/util/digest.c b/lib/util/digest.c index 6a9ccf658..b48bc48e8 100644 --- a/lib/util/digest.c +++ b/lib/util/digest.c @@ -23,23 +23,13 @@ #include -#include - -#include #include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ #if defined(HAVE_STDINT_H) # include #elif defined(HAVE_INTTYPES_H) # include #endif #include -#include #include #include "sudo_compat.h" diff --git a/lib/util/digest_gcrypt.c b/lib/util/digest_gcrypt.c index 2c06721de..b89f33a11 100644 --- a/lib/util/digest_gcrypt.c +++ b/lib/util/digest_gcrypt.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #ifdef HAVE_STRING_H # include @@ -33,8 +30,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #include #include diff --git a/lib/util/digest_openssl.c b/lib/util/digest_openssl.c index 0663d37b3..aed796a9e 100644 --- a/lib/util/digest_openssl.c +++ b/lib/util/digest_openssl.c @@ -23,18 +23,7 @@ #include -#include - -#include #include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ -#include -#include #include #include diff --git a/lib/util/dup3.c b/lib/util/dup3.c index 2c44ca040..68d6ebf79 100644 --- a/lib/util/dup3.c +++ b/lib/util/dup3.c @@ -25,8 +25,6 @@ #ifndef HAVE_DUP3 -#include - #include #include #include diff --git a/lib/util/event_poll.c b/lib/util/event_poll.c index 890f74eae..271719a9f 100644 --- a/lib/util/event_poll.c +++ b/lib/util/event_poll.c @@ -23,25 +23,11 @@ #include -#include #include -#include + #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif /* HAVE_STDBOOL_H */ -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ -#include -#include -#include #include +#include #include "sudo_compat.h" #include "sudo_util.h" diff --git a/lib/util/event_select.c b/lib/util/event_select.c index 1ca0339a2..7bb95d3c9 100644 --- a/lib/util/event_select.c +++ b/lib/util/event_select.c @@ -31,13 +31,7 @@ #ifdef HAVE_SYS_SELECT_H # include #endif /* HAVE_SYS_SELECT_H */ -#include #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif /* HAVE_STDBOOL_H */ #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ @@ -45,8 +39,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include -#include #include "sudo_compat.h" #include "sudo_util.h" diff --git a/lib/util/fatal.c b/lib/util/fatal.c index b8ddd53fc..8c0664878 100644 --- a/lib/util/fatal.c +++ b/lib/util/fatal.c @@ -24,8 +24,6 @@ #include -#include - #include #include #include diff --git a/lib/util/fchmodat.c b/lib/util/fchmodat.c index 8b4c44e29..73b1de1ad 100644 --- a/lib/util/fchmodat.c +++ b/lib/util/fchmodat.c @@ -25,8 +25,6 @@ #include -#include -#include #include #include #include diff --git a/lib/util/fnmatch.c b/lib/util/fnmatch.c index d37123306..9f8ebdef9 100644 --- a/lib/util/fnmatch.c +++ b/lib/util/fnmatch.c @@ -99,9 +99,6 @@ #ifndef HAVE_FNMATCH -#include - -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/fstatat.c b/lib/util/fstatat.c index 36e02b625..8d5dcc16f 100644 --- a/lib/util/fstatat.c +++ b/lib/util/fstatat.c @@ -25,8 +25,6 @@ #include -#include -#include #include #include diff --git a/lib/util/getaddrinfo.c b/lib/util/getaddrinfo.c index 99ff370c4..3338c3ba7 100644 --- a/lib/util/getaddrinfo.c +++ b/lib/util/getaddrinfo.c @@ -37,7 +37,6 @@ #include #include -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/getcwd.c b/lib/util/getcwd.c index 7c0eaa703..93a419ef1 100644 --- a/lib/util/getcwd.c +++ b/lib/util/getcwd.c @@ -37,7 +37,6 @@ #include #include -#include #include #ifdef HAVE_STRING_H # include @@ -45,8 +44,8 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include +#include #include "sudo_compat.h" @@ -133,7 +132,7 @@ sudo_getcwd(char *pt, size_t size) * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ - bcopy(bpt, pt, ept - bpt); + memcpy(pt, bpt, ept - bpt); free(up); return pt; } @@ -183,7 +182,7 @@ sudo_getcwd(char *pt, size_t size) goto notfound; if (ISDOT(dp)) continue; - bcopy(dp->d_name, bup, NAMLEN(dp) + 1); + memcpy(bup, dp->d_name, NAMLEN(dp) + 1); /* Save the first error for later. */ if (lstat(up, &s)) { @@ -216,13 +215,13 @@ sudo_getcwd(char *pt, size_t size) pt = npt; bpt = pt + off; ept = pt + ptsize; - bcopy(bpt, ept - len, len); + memcpy(ept - len, bpt, len); bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= NAMLEN(dp); - bcopy(dp->d_name, bpt, NAMLEN(dp)); + memcpy(bpt, dp->d_name, NAMLEN(dp)); (void)closedir(dir); /* Truncate any file name. */ diff --git a/lib/util/getdelim.c b/lib/util/getdelim.c index e92a082e0..9dd4958fa 100644 --- a/lib/util/getdelim.c +++ b/lib/util/getdelim.c @@ -25,8 +25,6 @@ #ifndef HAVE_GETDELIM -#include - #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/getgrouplist.c b/lib/util/getgrouplist.c index bd53eeefc..7fa8b792c 100644 --- a/lib/util/getgrouplist.c +++ b/lib/util/getgrouplist.c @@ -24,8 +24,6 @@ #include -#include -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/gethostname.c b/lib/util/gethostname.c index 358941519..894aefa3d 100644 --- a/lib/util/gethostname.c +++ b/lib/util/gethostname.c @@ -23,8 +23,6 @@ #include -#include -#include #include #include diff --git a/lib/util/getopt_long.c b/lib/util/getopt_long.c index ff4ce32e3..15f19141d 100644 --- a/lib/util/getopt_long.c +++ b/lib/util/getopt_long.c @@ -59,8 +59,6 @@ #include -#include -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/gettime.c b/lib/util/gettime.c index f25805892..e7161b507 100644 --- a/lib/util/gettime.c +++ b/lib/util/gettime.c @@ -23,13 +23,8 @@ #include -#include #include -#include -#include -#include #include -#include #if defined(__MACH__) && !defined(HAVE_CLOCK_GETTIME) # include diff --git a/lib/util/getusershell.c b/lib/util/getusershell.c index a0c964771..ae37c5012 100644 --- a/lib/util/getusershell.c +++ b/lib/util/getusershell.c @@ -23,13 +23,9 @@ #include -#include - #include #include #include -#include -#include #define DEFAULT_TEXT_DOMAIN "sudo" #include "sudo_gettext.h" /* must be included before sudo_compat.h */ diff --git a/lib/util/gidlist.c b/lib/util/gidlist.c index fa29d7795..f1c7c8c82 100644 --- a/lib/util/gidlist.c +++ b/lib/util/gidlist.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #include diff --git a/lib/util/glob.c b/lib/util/glob.c index 8d0e2894d..7d7c5ccb5 100644 --- a/lib/util/glob.c +++ b/lib/util/glob.c @@ -56,7 +56,6 @@ #ifndef HAVE_GLOB -#include #include #include diff --git a/lib/util/isblank.c b/lib/util/isblank.c index 4e297c859..753e0307c 100644 --- a/lib/util/isblank.c +++ b/lib/util/isblank.c @@ -26,8 +26,6 @@ #ifndef HAVE_ISBLANK -#include - #include "sudo_compat.h" #undef isblank diff --git a/lib/util/json.c b/lib/util/json.c index 34deb828d..204d1d023 100644 --- a/lib/util/json.c +++ b/lib/util/json.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H @@ -37,10 +36,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include -#include -#include #define DEFAULT_TEXT_DOMAIN "sudo" #include "sudo_gettext.h" /* must be included before sudo_compat.h */ diff --git a/lib/util/key_val.c b/lib/util/key_val.c index 5b5eb52d5..a71de4fc5 100644 --- a/lib/util/key_val.c +++ b/lib/util/key_val.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/lbuf.c b/lib/util/lbuf.c index 9eaefd7c9..13e2646b6 100644 --- a/lib/util/lbuf.c +++ b/lib/util/lbuf.c @@ -23,8 +23,6 @@ #include -#include -#include #include #ifdef HAVE_STRING_H # include @@ -32,7 +30,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include #include "sudo_compat.h" diff --git a/lib/util/locking.c b/lib/util/locking.c index cd9b967f5..a8dd6dd62 100644 --- a/lib/util/locking.c +++ b/lib/util/locking.c @@ -28,7 +28,6 @@ #include -#include #include #ifdef HAVE_STRING_H # include @@ -41,7 +40,6 @@ #else # include "compat/stdbool.h" #endif -#include #include #include #include diff --git a/lib/util/logfac.c b/lib/util/logfac.c index 616fb07f8..97a80d965 100644 --- a/lib/util/logfac.c +++ b/lib/util/logfac.c @@ -28,9 +28,6 @@ #include -#include -#include -#include #include #include diff --git a/lib/util/logpri.c b/lib/util/logpri.c index 7e2ab0c0c..34d060295 100644 --- a/lib/util/logpri.c +++ b/lib/util/logpri.c @@ -28,9 +28,6 @@ #include -#include -#include -#include #include #include diff --git a/lib/util/memset_s.c b/lib/util/memset_s.c index f36c457f5..f6a04fa69 100644 --- a/lib/util/memset_s.c +++ b/lib/util/memset_s.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/lib/util/mkdir_parents.c b/lib/util/mkdir_parents.c index 4ec898746..19d40df52 100644 --- a/lib/util/mkdir_parents.c +++ b/lib/util/mkdir_parents.c @@ -23,7 +23,6 @@ #include -#include #include #include #include @@ -41,8 +40,6 @@ #include #include #include -#include -#include #define DEFAULT_TEXT_DOMAIN "sudo" #include "sudo_gettext.h" /* must be included before sudo_compat.h */ diff --git a/lib/util/mksiglist.c b/lib/util/mksiglist.c index 122200cbd..c0b78599d 100644 --- a/lib/util/mksiglist.c +++ b/lib/util/mksiglist.c @@ -24,9 +24,6 @@ #include -#include - -#include #include #include diff --git a/lib/util/mksigname.c b/lib/util/mksigname.c index 8693fe882..0784e623a 100644 --- a/lib/util/mksigname.c +++ b/lib/util/mksigname.c @@ -24,9 +24,6 @@ #include -#include - -#include #include #include diff --git a/lib/util/mktemp.c b/lib/util/mktemp.c index f4da57981..94607e86a 100644 --- a/lib/util/mktemp.c +++ b/lib/util/mktemp.c @@ -26,8 +26,6 @@ #if !defined(HAVE_MKSTEMPS) || !defined(HAVE_MKDTEMP) -#include -#include #include #include @@ -50,7 +48,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include "sudo_compat.h" #include "sudo_rand.h" diff --git a/lib/util/openat.c b/lib/util/openat.c index a8709fc84..09622d092 100644 --- a/lib/util/openat.c +++ b/lib/util/openat.c @@ -23,8 +23,6 @@ #include -#include -#include #include #include diff --git a/lib/util/parseln.c b/lib/util/parseln.c index 1ea71f456..a23b0ca09 100644 --- a/lib/util/parseln.c +++ b/lib/util/parseln.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -33,8 +32,6 @@ # include #endif /* HAVE_STRING_H */ #include -#include -#include #ifdef HAVE_STDBOOL_H # include #else diff --git a/lib/util/pipe2.c b/lib/util/pipe2.c index 0be122dfe..d4c39c933 100644 --- a/lib/util/pipe2.c +++ b/lib/util/pipe2.c @@ -25,8 +25,6 @@ #ifndef HAVE_PIPE2 -#include - #include #include diff --git a/lib/util/progname.c b/lib/util/progname.c index dbbcb7969..d009e8c8a 100644 --- a/lib/util/progname.c +++ b/lib/util/progname.c @@ -23,8 +23,6 @@ #include -#include -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/pw_dup.c b/lib/util/pw_dup.c index 6811f1a1d..930cfde55 100644 --- a/lib/util/pw_dup.c +++ b/lib/util/pw_dup.c @@ -30,9 +30,6 @@ #ifndef HAVE_PW_DUP -#include - -#include #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/reallocarray.c b/lib/util/reallocarray.c index 482afb258..56283e712 100644 --- a/lib/util/reallocarray.c +++ b/lib/util/reallocarray.c @@ -26,7 +26,6 @@ #ifndef HAVE_REALLOCARRAY -#include #include #if defined(HAVE_STDINT_H) # include diff --git a/lib/util/regress/fnmatch/fnm_test.c b/lib/util/regress/fnmatch/fnm_test.c index 85589d1c5..5e5076fad 100644 --- a/lib/util/regress/fnmatch/fnm_test.c +++ b/lib/util/regress/fnmatch/fnm_test.c @@ -6,7 +6,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/regress/getgrouplist/getgrouplist_test.c b/lib/util/regress/getgrouplist/getgrouplist_test.c index 9dff3dc8f..f30a07cc9 100644 --- a/lib/util/regress/getgrouplist/getgrouplist_test.c +++ b/lib/util/regress/getgrouplist/getgrouplist_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/regress/glob/globtest.c b/lib/util/regress/glob/globtest.c index 707af613a..700c3868e 100644 --- a/lib/util/regress/glob/globtest.c +++ b/lib/util/regress/glob/globtest.c @@ -6,7 +6,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/regress/mktemp/mktemp_test.c b/lib/util/regress/mktemp/mktemp_test.c index c8b9cebb6..c849203b7 100644 --- a/lib/util/regress/mktemp/mktemp_test.c +++ b/lib/util/regress/mktemp/mktemp_test.c @@ -10,14 +10,11 @@ #include -#include #include #include #include #include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/lib/util/regress/parse_gids/parse_gids_test.c b/lib/util/regress/parse_gids/parse_gids_test.c index 9c16bbfdd..bd5f85c75 100644 --- a/lib/util/regress/parse_gids/parse_gids_test.c +++ b/lib/util/regress/parse_gids/parse_gids_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_fatal.h" diff --git a/lib/util/regress/progname/progname_test.c b/lib/util/regress/progname/progname_test.c index 34cb3c95d..746af27a6 100644 --- a/lib/util/regress/progname/progname_test.c +++ b/lib/util/regress/progname/progname_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_util.h" diff --git a/lib/util/regress/strsig/strsig_test.c b/lib/util/regress/strsig/strsig_test.c index bfbe68037..5fe20e2cb 100644 --- a/lib/util/regress/strsig/strsig_test.c +++ b/lib/util/regress/strsig/strsig_test.c @@ -18,16 +18,10 @@ #include -#include #include #include #include #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_util.h" diff --git a/lib/util/regress/strsplit/strsplit_test.c b/lib/util/regress/strsplit/strsplit_test.c index 91532dad6..99f9e18d4 100644 --- a/lib/util/regress/strsplit/strsplit_test.c +++ b/lib/util/regress/strsplit/strsplit_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_fatal.h" diff --git a/lib/util/regress/strtofoo/strtobool_test.c b/lib/util/regress/strtofoo/strtobool_test.c index f786b8607..5edb8065b 100644 --- a/lib/util/regress/strtofoo/strtobool_test.c +++ b/lib/util/regress/strtofoo/strtobool_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H diff --git a/lib/util/regress/strtofoo/strtoid_test.c b/lib/util/regress/strtofoo/strtoid_test.c index c97f98c1c..225c6a0c1 100644 --- a/lib/util/regress/strtofoo/strtoid_test.c +++ b/lib/util/regress/strtofoo/strtoid_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #include diff --git a/lib/util/regress/strtofoo/strtomode_test.c b/lib/util/regress/strtofoo/strtomode_test.c index 9c33940f9..f5cf94d80 100644 --- a/lib/util/regress/strtofoo/strtomode_test.c +++ b/lib/util/regress/strtofoo/strtomode_test.c @@ -18,7 +18,6 @@ #include -#include #include #include diff --git a/lib/util/regress/strtofoo/strtonum_test.c b/lib/util/regress/strtofoo/strtonum_test.c index 96c1f582e..d383d84e9 100644 --- a/lib/util/regress/strtofoo/strtonum_test.c +++ b/lib/util/regress/strtofoo/strtonum_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #include diff --git a/lib/util/regress/sudo_conf/conf_test.c b/lib/util/regress/sudo_conf/conf_test.c index 93ca67150..ef6434490 100644 --- a/lib/util/regress/sudo_conf/conf_test.c +++ b/lib/util/regress/sudo_conf/conf_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_conf.h" diff --git a/lib/util/regress/sudo_parseln/parseln_test.c b/lib/util/regress/sudo_parseln/parseln_test.c index ecf9d3d9c..ae1fe56fe 100644 --- a/lib/util/regress/sudo_parseln/parseln_test.c +++ b/lib/util/regress/sudo_parseln/parseln_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_util.h" diff --git a/lib/util/regress/tailq/hltq_test.c b/lib/util/regress/tailq/hltq_test.c index 3a89f3f37..d61b28177 100644 --- a/lib/util/regress/tailq/hltq_test.c +++ b/lib/util/regress/tailq/hltq_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #include @@ -28,11 +27,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include "sudo_compat.h" #include "sudo_fatal.h" diff --git a/lib/util/regress/vsyslog/vsyslog_test.c b/lib/util/regress/vsyslog/vsyslog_test.c index e3a7d5a8b..ceee5a367 100644 --- a/lib/util/regress/vsyslog/vsyslog_test.c +++ b/lib/util/regress/vsyslog/vsyslog_test.c @@ -18,7 +18,6 @@ #include -#include #include #include #include @@ -28,11 +27,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #include #include "sudo_compat.h" diff --git a/lib/util/roundup.c b/lib/util/roundup.c index 3f5fd463c..782ea45e9 100644 --- a/lib/util/roundup.c +++ b/lib/util/roundup.c @@ -18,8 +18,6 @@ #include "config.h" -#include - #include "sudo_compat.h" #include "sudo_debug.h" #include "sudo_util.h" diff --git a/lib/util/secure_path.c b/lib/util/secure_path.c index 581432017..0432cf92f 100644 --- a/lib/util/secure_path.c +++ b/lib/util/secure_path.c @@ -23,17 +23,13 @@ #include -#include #include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #include "sudo_compat.h" #include "sudo_util.h" diff --git a/lib/util/setgroups.c b/lib/util/setgroups.c index dac41a29d..f424ddb88 100644 --- a/lib/util/setgroups.c +++ b/lib/util/setgroups.c @@ -24,8 +24,6 @@ #include #include -#include -#include #include #include #include diff --git a/lib/util/sha2.c b/lib/util/sha2.c index 0a070185e..9359ee9b7 100644 --- a/lib/util/sha2.c +++ b/lib/util/sha2.c @@ -32,9 +32,6 @@ #include -#include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/lib/util/sig2str.c b/lib/util/sig2str.c index 4b1b81264..5cc6036c2 100644 --- a/lib/util/sig2str.c +++ b/lib/util/sig2str.c @@ -25,11 +25,7 @@ #ifndef HAVE_SIG2STR -#include - #include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/lib/util/snprintf.c b/lib/util/snprintf.c index c2c032079..52f73fbd4 100644 --- a/lib/util/snprintf.c +++ b/lib/util/snprintf.c @@ -47,7 +47,6 @@ !defined(HAVE_VASPRINTF) || !defined(HAVE_ASPRINTF) || \ defined(PREFER_PORTABLE_SNPRINTF) -#include #include #include diff --git a/lib/util/str2sig.c b/lib/util/str2sig.c index cc1044f53..c6430af50 100644 --- a/lib/util/str2sig.c +++ b/lib/util/str2sig.c @@ -25,11 +25,7 @@ #ifndef HAVE_STR2SIG -#include - #include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/lib/util/strlcat.c b/lib/util/strlcat.c index 0648d2932..fa1934a47 100644 --- a/lib/util/strlcat.c +++ b/lib/util/strlcat.c @@ -28,7 +28,6 @@ #ifndef HAVE_STRLCAT -#include #include #include "sudo_compat.h" diff --git a/lib/util/strlcpy.c b/lib/util/strlcpy.c index 981fb8ba9..f9e5244fc 100644 --- a/lib/util/strlcpy.c +++ b/lib/util/strlcpy.c @@ -28,7 +28,7 @@ #ifndef HAVE_STRLCPY -#include +#include #include "sudo_compat.h" diff --git a/lib/util/strndup.c b/lib/util/strndup.c index 228df9321..ee219f0c7 100644 --- a/lib/util/strndup.c +++ b/lib/util/strndup.c @@ -27,8 +27,6 @@ #ifndef HAVE_STRNDUP -#include - #include #ifdef HAVE_STRING_H # include diff --git a/lib/util/strsignal.c b/lib/util/strsignal.c index 327f98dd7..a03c76b74 100644 --- a/lib/util/strsignal.c +++ b/lib/util/strsignal.c @@ -25,9 +25,6 @@ #ifndef HAVE_STRSIGNAL -#include - -#include #include #define DEFAULT_TEXT_DOMAIN "sudo" diff --git a/lib/util/strsplit.c b/lib/util/strsplit.c index 9a6491ef8..76634600c 100644 --- a/lib/util/strsplit.c +++ b/lib/util/strsplit.c @@ -23,13 +23,6 @@ #include -#include - -#include -#include -#include -#include - #include "sudo_compat.h" #include "sudo_debug.h" #include "sudo_util.h" diff --git a/lib/util/strtobool.c b/lib/util/strtobool.c index 095d9f629..7ec010212 100644 --- a/lib/util/strtobool.c +++ b/lib/util/strtobool.c @@ -23,10 +23,6 @@ #include -#include - -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/lib/util/strtoid.c b/lib/util/strtoid.c index 781fb7fe9..92d5a0bcc 100644 --- a/lib/util/strtoid.c +++ b/lib/util/strtoid.c @@ -23,15 +23,8 @@ #include -#include +#include /* for id_t */ -#include -#include -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif #ifdef HAVE_STDBOOL_H # include #else diff --git a/lib/util/strtomode.c b/lib/util/strtomode.c index 136a36eec..9a8623902 100644 --- a/lib/util/strtomode.c +++ b/lib/util/strtomode.c @@ -23,10 +23,8 @@ #include -#include #include -#include #include #include diff --git a/lib/util/strtonum.c b/lib/util/strtonum.c index ad8b87060..75c353056 100644 --- a/lib/util/strtonum.c +++ b/lib/util/strtonum.c @@ -23,19 +23,8 @@ #include -#include - #include #include -#include -#include -#include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ #define DEFAULT_TEXT_DOMAIN "sudo" #include "sudo_gettext.h" /* must be included before sudo_compat.h */ diff --git a/lib/util/sudo_conf.c b/lib/util/sudo_conf.c index e3bf7eaf6..94981c7fb 100644 --- a/lib/util/sudo_conf.c +++ b/lib/util/sudo_conf.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/lib/util/sudo_debug.c b/lib/util/sudo_debug.c index 6c96b7f43..911973ece 100644 --- a/lib/util/sudo_debug.c +++ b/lib/util/sudo_debug.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/lib/util/sudo_dso.c b/lib/util/sudo_dso.c index 9e4fd4d4a..3dcf3cebe 100644 --- a/lib/util/sudo_dso.c +++ b/lib/util/sudo_dso.c @@ -23,8 +23,6 @@ #include -#include - #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/term.c b/lib/util/term.c index 7fe3333de..8b414bab8 100644 --- a/lib/util/term.c +++ b/lib/util/term.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/lib/util/ttysize.c b/lib/util/ttysize.c index f98a5928a..221ea92b5 100644 --- a/lib/util/ttysize.c +++ b/lib/util/ttysize.c @@ -23,9 +23,7 @@ #include -#include #include -#include #include #include #include /* for struct winsize on HP-UX */ diff --git a/lib/util/unlinkat.c b/lib/util/unlinkat.c index a86e145dd..bb5fdbeee 100644 --- a/lib/util/unlinkat.c +++ b/lib/util/unlinkat.c @@ -23,8 +23,6 @@ #include -#include -#include #include #include diff --git a/lib/util/utimens.c b/lib/util/utimens.c index fc1fb8478..c6b8ee230 100644 --- a/lib/util/utimens.c +++ b/lib/util/utimens.c @@ -25,10 +25,8 @@ #if !defined(HAVE_FUTIMENS) || !defined(HAVE_UTIMENSAT) -#include #include #include -#include #include #include #if !defined(HAVE_UTIMES) || defined(HAVE_FUTIME) diff --git a/lib/util/uuid.c b/lib/util/uuid.c index 6ec537bd7..cb6726e2e 100644 --- a/lib/util/uuid.c +++ b/lib/util/uuid.c @@ -23,7 +23,6 @@ #include -#include #include #if defined(HAVE_STDINT_H) # include diff --git a/plugins/audit_json/audit_json.c b/plugins/audit_json/audit_json.c index 1aaef8096..303922fbe 100644 --- a/plugins/audit_json/audit_json.c +++ b/plugins/audit_json/audit_json.c @@ -23,7 +23,6 @@ #include -#include #include #include @@ -42,8 +41,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include -#include #include #include #include diff --git a/plugins/group_file/getgrent.c b/plugins/group_file/getgrent.c index 59bf3adff..5ca4b4c2e 100644 --- a/plugins/group_file/getgrent.c +++ b/plugins/group_file/getgrent.c @@ -27,7 +27,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -38,7 +37,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include #include "sudo_compat.h" diff --git a/plugins/group_file/group_file.c b/plugins/group_file/group_file.c index 20957b2e7..d73568d70 100644 --- a/plugins/group_file/group_file.c +++ b/plugins/group_file/group_file.c @@ -23,7 +23,6 @@ #include -#include #include #include @@ -40,12 +39,9 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include -#include #include -#include #include "sudo_plugin.h" #include "sudo_compat.h" diff --git a/plugins/group_file/plugin_test.c b/plugins/group_file/plugin_test.c index dba784c23..72ca179ff 100644 --- a/plugins/group_file/plugin_test.c +++ b/plugins/group_file/plugin_test.c @@ -21,8 +21,6 @@ * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com */ -#include - #include #include #include @@ -32,7 +30,6 @@ #include #include #include -#include #include "sudo_plugin.h" diff --git a/plugins/python/regress/testhelpers.h b/plugins/python/regress/testhelpers.h index 136f6a34b..5bd65c10b 100644 --- a/plugins/python/regress/testhelpers.h +++ b/plugins/python/regress/testhelpers.h @@ -19,8 +19,6 @@ #ifndef PYTHON_TESTHELPERS #define PYTHON_TESTHELPERS -#include - #include "iohelpers.h" #include "../pyhelpers.h" diff --git a/plugins/python/sudo_python_debug.h b/plugins/python/sudo_python_debug.h index 7a4022660..02a715a7e 100644 --- a/plugins/python/sudo_python_debug.h +++ b/plugins/python/sudo_python_debug.h @@ -19,7 +19,6 @@ #ifndef SUDO_PYTHON_DEBUG_H #define SUDO_PYTHON_DEBUG_H -#include #include "sudo_debug.h" /* diff --git a/plugins/sample/sample_plugin.c b/plugins/sample/sample_plugin.c index bbf2098de..ac3dcb3d7 100644 --- a/plugins/sample/sample_plugin.c +++ b/plugins/sample/sample_plugin.c @@ -23,10 +23,10 @@ #include -#include #include #include +#include #include #include #ifdef HAVE_STDBOOL_H @@ -41,12 +41,10 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include #include #include -#include #include #include "sudo_compat.h" diff --git a/plugins/sample_approval/sample_approval.c b/plugins/sample_approval/sample_approval.c index c64e97bef..2bb710f72 100644 --- a/plugins/sample_approval/sample_approval.c +++ b/plugins/sample_approval/sample_approval.c @@ -23,8 +23,6 @@ #include -#include - #include #include #ifdef HAVE_STDBOOL_H @@ -39,7 +37,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include "sudo_gettext.h" /* must be included before sudo_compat.h */ diff --git a/plugins/sudoers/alias.c b/plugins/sudoers/alias.c index b8a4958c6..6fc41b5dd 100644 --- a/plugins/sudoers/alias.c +++ b/plugins/sudoers/alias.c @@ -29,7 +29,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -38,7 +37,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRING_H */ -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/audit.c b/plugins/sudoers/audit.c index 8cd15c525..18f98d6cb 100644 --- a/plugins/sudoers/audit.c +++ b/plugins/sudoers/audit.c @@ -23,10 +23,9 @@ #include -#include +#include #include #include -#include #include "sudoers.h" diff --git a/plugins/sudoers/base64.c b/plugins/sudoers/base64.c index 1418681d3..7691aba7b 100644 --- a/plugins/sudoers/base64.c +++ b/plugins/sudoers/base64.c @@ -23,16 +23,6 @@ #include -#include -#include -#include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ - #include "sudoers.h" /* diff --git a/plugins/sudoers/boottime.c b/plugins/sudoers/boottime.c index 9e67911d3..8aec51e7f 100644 --- a/plugins/sudoers/boottime.c +++ b/plugins/sudoers/boottime.c @@ -23,16 +23,11 @@ #include -#include +#include /* for size_t, ssize_t */ #include #include #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif /* HAVE_STDBOOL_H */ #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/plugins/sudoers/bsm_audit.c b/plugins/sudoers/bsm_audit.c index 3c09250dc..41af0d554 100644 --- a/plugins/sudoers/bsm_audit.c +++ b/plugins/sudoers/bsm_audit.c @@ -26,16 +26,14 @@ #ifdef HAVE_BSM_AUDIT -#include +#include /* for pid_t */ #include #include #include #include -#include #include -#include #include #include diff --git a/plugins/sudoers/check.c b/plugins/sudoers/check.c index 53faecc16..7c5a1da30 100644 --- a/plugins/sudoers/check.c +++ b/plugins/sudoers/check.c @@ -28,7 +28,7 @@ #include -#include +#include /* for ssize_t */ #include #include #ifdef HAVE_STRING_H @@ -40,7 +40,6 @@ #include #include #include -#include #include #include diff --git a/plugins/sudoers/cvtsudoers.c b/plugins/sudoers/cvtsudoers.c index d8164abd5..964b07359 100644 --- a/plugins/sudoers/cvtsudoers.c +++ b/plugins/sudoers/cvtsudoers.c @@ -27,7 +27,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -38,7 +37,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include #include diff --git a/plugins/sudoers/cvtsudoers_json.c b/plugins/sudoers/cvtsudoers_json.c index f765947cf..96fb3768b 100644 --- a/plugins/sudoers/cvtsudoers_json.c +++ b/plugins/sudoers/cvtsudoers_json.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -34,7 +33,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/cvtsudoers_ldif.c b/plugins/sudoers/cvtsudoers_ldif.c index f9eb92285..ce09fc51e 100644 --- a/plugins/sudoers/cvtsudoers_ldif.c +++ b/plugins/sudoers/cvtsudoers_ldif.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/cvtsudoers_pwutil.c b/plugins/sudoers/cvtsudoers_pwutil.c index 8308f28a9..9b0a648d1 100644 --- a/plugins/sudoers/cvtsudoers_pwutil.c +++ b/plugins/sudoers/cvtsudoers_pwutil.c @@ -28,7 +28,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/defaults.c b/plugins/sudoers/defaults.c index afc78d9c7..8b1e1c710 100644 --- a/plugins/sudoers/defaults.c +++ b/plugins/sudoers/defaults.c @@ -28,7 +28,6 @@ #include -#include #include #include #include @@ -39,7 +38,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include diff --git a/plugins/sudoers/digestname.c b/plugins/sudoers/digestname.c index a34505507..e501de474 100644 --- a/plugins/sudoers/digestname.c +++ b/plugins/sudoers/digestname.c @@ -23,9 +23,6 @@ #include -#include -#include - #include "sudo_compat.h" #include "sudo_digest.h" #include "sudoers_debug.h" diff --git a/plugins/sudoers/editor.c b/plugins/sudoers/editor.c index 391bb4968..9da61db45 100644 --- a/plugins/sudoers/editor.c +++ b/plugins/sudoers/editor.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/env.c b/plugins/sudoers/env.c index 17a8b6457..3f755dc83 100644 --- a/plugins/sudoers/env.c +++ b/plugins/sudoers/env.c @@ -28,8 +28,6 @@ #include -#include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/env_pattern.c b/plugins/sudoers/env_pattern.c index 691b5acaf..ecc78e1a0 100644 --- a/plugins/sudoers/env_pattern.c +++ b/plugins/sudoers/env_pattern.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/file.c b/plugins/sudoers/file.c index b9c3d26f0..2fcd3938c 100644 --- a/plugins/sudoers/file.c +++ b/plugins/sudoers/file.c @@ -23,20 +23,8 @@ #include -#include #include #include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ -#include -#include -#include -#include -#include #include "sudoers.h" #include "parse.h" diff --git a/plugins/sudoers/filedigest.c b/plugins/sudoers/filedigest.c index 3b6087cd9..44957e0d2 100644 --- a/plugins/sudoers/filedigest.c +++ b/plugins/sudoers/filedigest.c @@ -23,8 +23,6 @@ #include -#include - #include #include #ifdef HAVE_STRING_H @@ -33,11 +31,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif #include #include #include diff --git a/plugins/sudoers/find_path.c b/plugins/sudoers/find_path.c index 2cfe03f03..9dfb99520 100644 --- a/plugins/sudoers/find_path.c +++ b/plugins/sudoers/find_path.c @@ -28,7 +28,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/fmtsudoers.c b/plugins/sudoers/fmtsudoers.c index 0906e157b..d478ff336 100644 --- a/plugins/sudoers/fmtsudoers.c +++ b/plugins/sudoers/fmtsudoers.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/gc.c b/plugins/sudoers/gc.c index 73a812339..9061b924e 100644 --- a/plugins/sudoers/gc.c +++ b/plugins/sudoers/gc.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/gentime.c b/plugins/sudoers/gentime.c index 25f554894..f074791b7 100644 --- a/plugins/sudoers/gentime.c +++ b/plugins/sudoers/gentime.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H diff --git a/plugins/sudoers/getdate.c b/plugins/sudoers/getdate.c index a625d046c..f2704f829 100644 --- a/plugins/sudoers/getdate.c +++ b/plugins/sudoers/getdate.c @@ -31,7 +31,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -112,7 +111,7 @@ static int yyerror(const char *s); static int yylex(void); int yyparse(void); -#line 100 "getdate.y" +#line 99 "getdate.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { @@ -120,7 +119,7 @@ typedef union { enum _MERIDIAN Meridian; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ -#line 118 "getdate.c" +#line 117 "getdate.c" #define tAGO 257 #define tDAY 258 #define tDAYZONE 259 @@ -389,7 +388,7 @@ short *yysslim; YYSTYPE *yyvs; unsigned int yystacksize; int yyparse(void); -#line 319 "getdate.y" +#line 318 "getdate.y" /* Month and day table. */ static TABLE const MonthDayTable[] = { @@ -1011,7 +1010,7 @@ main(int argc, char *argv[]) /* NOTREACHED */ } #endif /* TEST */ -#line 957 "getdate.c" +#line 956 "getdate.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) @@ -1220,37 +1219,37 @@ yyreduce: switch (yyn) { case 3: -#line 118 "getdate.y" +#line 117 "getdate.y" { yyHaveTime++; } break; case 4: -#line 121 "getdate.y" +#line 120 "getdate.y" { yyHaveZone++; } break; case 5: -#line 124 "getdate.y" +#line 123 "getdate.y" { yyHaveDate++; } break; case 6: -#line 127 "getdate.y" +#line 126 "getdate.y" { yyHaveDay++; } break; case 7: -#line 130 "getdate.y" +#line 129 "getdate.y" { yyHaveRel++; } break; case 9: -#line 136 "getdate.y" +#line 135 "getdate.y" { yyHour = yyvsp[-1].Number; yyMinutes = 0; @@ -1259,7 +1258,7 @@ case 9: } break; case 10: -#line 142 "getdate.y" +#line 141 "getdate.y" { yyHour = yyvsp[-3].Number; yyMinutes = yyvsp[-1].Number; @@ -1268,7 +1267,7 @@ case 10: } break; case 11: -#line 148 "getdate.y" +#line 147 "getdate.y" { yyHour = yyvsp[-3].Number; yyMinutes = yyvsp[-1].Number; @@ -1278,7 +1277,7 @@ case 11: } break; case 12: -#line 155 "getdate.y" +#line 154 "getdate.y" { yyHour = yyvsp[-5].Number; yyMinutes = yyvsp[-3].Number; @@ -1287,7 +1286,7 @@ case 12: } break; case 13: -#line 161 "getdate.y" +#line 160 "getdate.y" { yyHour = yyvsp[-5].Number; yyMinutes = yyvsp[-3].Number; @@ -1298,56 +1297,56 @@ case 13: } break; case 14: -#line 171 "getdate.y" +#line 170 "getdate.y" { yyTimezone = yyvsp[0].Number; yyDSTmode = DSToff; } break; case 15: -#line 175 "getdate.y" +#line 174 "getdate.y" { yyTimezone = yyvsp[0].Number; yyDSTmode = DSTon; } break; case 16: -#line 180 "getdate.y" +#line 179 "getdate.y" { yyTimezone = yyvsp[-1].Number; yyDSTmode = DSTon; } break; case 17: -#line 186 "getdate.y" +#line 185 "getdate.y" { yyDayOrdinal = 1; yyDayNumber = yyvsp[0].Number; } break; case 18: -#line 190 "getdate.y" +#line 189 "getdate.y" { yyDayOrdinal = 1; yyDayNumber = yyvsp[-1].Number; } break; case 19: -#line 194 "getdate.y" +#line 193 "getdate.y" { yyDayOrdinal = yyvsp[-1].Number; yyDayNumber = yyvsp[0].Number; } break; case 20: -#line 200 "getdate.y" +#line 199 "getdate.y" { yyMonth = yyvsp[-2].Number; yyDay = yyvsp[0].Number; } break; case 21: -#line 204 "getdate.y" +#line 203 "getdate.y" { if (yyvsp[-4].Number >= 100) { yyYear = yyvsp[-4].Number; @@ -1361,7 +1360,7 @@ case 21: } break; case 22: -#line 215 "getdate.y" +#line 214 "getdate.y" { /* ISO 8601 format. yyyy-mm-dd. */ yyYear = yyvsp[-2].Number; @@ -1370,7 +1369,7 @@ case 22: } break; case 23: -#line 221 "getdate.y" +#line 220 "getdate.y" { /* e.g. 17-JUN-1992. */ yyDay = yyvsp[-2].Number; @@ -1379,14 +1378,14 @@ case 23: } break; case 24: -#line 227 "getdate.y" +#line 226 "getdate.y" { yyMonth = yyvsp[-1].Number; yyDay = yyvsp[0].Number; } break; case 25: -#line 231 "getdate.y" +#line 230 "getdate.y" { yyMonth = yyvsp[-3].Number; yyDay = yyvsp[-2].Number; @@ -1394,14 +1393,14 @@ case 25: } break; case 26: -#line 236 "getdate.y" +#line 235 "getdate.y" { yyMonth = yyvsp[0].Number; yyDay = yyvsp[-1].Number; } break; case 27: -#line 240 "getdate.y" +#line 239 "getdate.y" { yyMonth = yyvsp[-1].Number; yyDay = yyvsp[-2].Number; @@ -1409,68 +1408,68 @@ case 27: } break; case 28: -#line 247 "getdate.y" +#line 246 "getdate.y" { yyRelSeconds = -yyRelSeconds; yyRelMonth = -yyRelMonth; } break; case 30: -#line 254 "getdate.y" +#line 253 "getdate.y" { yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L; } break; case 31: -#line 257 "getdate.y" +#line 256 "getdate.y" { yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L; } break; case 32: -#line 260 "getdate.y" +#line 259 "getdate.y" { yyRelSeconds += yyvsp[0].Number * 60L; } break; case 33: -#line 263 "getdate.y" +#line 262 "getdate.y" { yyRelSeconds += yyvsp[-1].Number; } break; case 34: -#line 266 "getdate.y" +#line 265 "getdate.y" { yyRelSeconds += yyvsp[-1].Number; } break; case 35: -#line 269 "getdate.y" +#line 268 "getdate.y" { yyRelSeconds++; } break; case 36: -#line 272 "getdate.y" +#line 271 "getdate.y" { yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number; } break; case 37: -#line 275 "getdate.y" +#line 274 "getdate.y" { yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number; } break; case 38: -#line 278 "getdate.y" +#line 277 "getdate.y" { yyRelMonth += yyvsp[0].Number; } break; case 39: -#line 283 "getdate.y" +#line 282 "getdate.y" { if (yyHaveTime && yyHaveDate && !yyHaveRel) yyYear = yyvsp[0].Number; @@ -1498,18 +1497,18 @@ case 39: } break; case 40: -#line 310 "getdate.y" +#line 309 "getdate.y" { yyval.Meridian = MER24; } break; case 41: -#line 313 "getdate.y" +#line 312 "getdate.y" { yyval.Meridian = yyvsp[0].Meridian; } break; -#line 1455 "getdate.c" +#line 1454 "getdate.c" } yyssp -= yym; yystate = *yyssp; diff --git a/plugins/sudoers/getdate.y b/plugins/sudoers/getdate.y index e23ef8d0c..1629ee183 100644 --- a/plugins/sudoers/getdate.y +++ b/plugins/sudoers/getdate.y @@ -14,7 +14,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/getspwuid.c b/plugins/sudoers/getspwuid.c index 46014534a..2238a6bc7 100644 --- a/plugins/sudoers/getspwuid.c +++ b/plugins/sudoers/getspwuid.c @@ -28,8 +28,6 @@ #include -#include -#include #include #include #ifdef HAVE_STRING_H @@ -40,7 +38,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #ifdef HAVE_GETSPNAM # include #endif /* HAVE_GETSPNAM */ diff --git a/plugins/sudoers/gmtoff.c b/plugins/sudoers/gmtoff.c index 452181937..6e99b0e31 100644 --- a/plugins/sudoers/gmtoff.c +++ b/plugins/sudoers/gmtoff.c @@ -23,9 +23,7 @@ #include -#include #include -#include #include #include "sudo_compat.h" diff --git a/plugins/sudoers/goodpath.c b/plugins/sudoers/goodpath.c index db3c755c8..0bed6d329 100644 --- a/plugins/sudoers/goodpath.c +++ b/plugins/sudoers/goodpath.c @@ -28,7 +28,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -37,7 +36,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/gram.c b/plugins/sudoers/gram.c index 9f17da2c9..931bfaf49 100644 --- a/plugins/sudoers/gram.c +++ b/plugins/sudoers/gram.c @@ -67,7 +67,6 @@ #include -#include #include #include #include @@ -78,11 +77,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__) # include #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */ @@ -121,7 +115,7 @@ static bool add_userspec(struct member *, struct privilege *); static struct defaults *new_default(char *, char *, short); static struct member *new_member(char *, int); static struct command_digest *new_digest(int, char *); -#line 83 "gram.y" +#line 77 "gram.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { @@ -138,7 +132,7 @@ typedef union { int tok; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ -#line 136 "gram.c" +#line 130 "gram.c" #define COMMAND 257 #define ALIAS 258 #define DEFVAR 259 @@ -680,7 +674,7 @@ short *yysslim; YYSTYPE *yyvs; unsigned int yystacksize; int yyparse(void); -#line 928 "gram.y" +#line 922 "gram.y" void sudoerserror(const char *s) { @@ -1130,7 +1124,7 @@ init_options(struct command_options *opts) opts->limitprivs = NULL; #endif } -#line 1076 "gram.c" +#line 1070 "gram.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) @@ -1339,23 +1333,23 @@ yyreduce: switch (yyn) { case 1: -#line 182 "gram.y" +#line 176 "gram.y" { ; } break; case 5: -#line 190 "gram.y" +#line 184 "gram.y" { ; } break; case 6: -#line 193 "gram.y" +#line 187 "gram.y" { yyerrok; } break; case 7: -#line 196 "gram.y" +#line 190 "gram.y" { if (!add_userspec(yyvsp[-1].member, yyvsp[0].privilege)) { sudoerserror(N_("unable to allocate memory")); @@ -1364,73 +1358,73 @@ case 7: } break; case 8: -#line 202 "gram.y" +#line 196 "gram.y" { ; } break; case 9: -#line 205 "gram.y" +#line 199 "gram.y" { ; } break; case 10: -#line 208 "gram.y" +#line 202 "gram.y" { ; } break; case 11: -#line 211 "gram.y" +#line 205 "gram.y" { ; } break; case 12: -#line 214 "gram.y" +#line 208 "gram.y" { if (!add_defaults(DEFAULTS, NULL, yyvsp[0].defaults)) YYERROR; } break; case 13: -#line 218 "gram.y" +#line 212 "gram.y" { if (!add_defaults(DEFAULTS_USER, yyvsp[-1].member, yyvsp[0].defaults)) YYERROR; } break; case 14: -#line 222 "gram.y" +#line 216 "gram.y" { if (!add_defaults(DEFAULTS_RUNAS, yyvsp[-1].member, yyvsp[0].defaults)) YYERROR; } break; case 15: -#line 226 "gram.y" +#line 220 "gram.y" { if (!add_defaults(DEFAULTS_HOST, yyvsp[-1].member, yyvsp[0].defaults)) YYERROR; } break; case 16: -#line 230 "gram.y" +#line 224 "gram.y" { if (!add_defaults(DEFAULTS_CMND, yyvsp[-1].member, yyvsp[0].defaults)) YYERROR; } break; case 18: -#line 237 "gram.y" +#line 231 "gram.y" { HLTQ_CONCAT(yyvsp[-2].defaults, yyvsp[0].defaults, entries); yyval.defaults = yyvsp[-2].defaults; } break; case 19: -#line 243 "gram.y" +#line 237 "gram.y" { yyval.defaults = new_default(yyvsp[0].string, NULL, true); if (yyval.defaults == NULL) { @@ -1440,7 +1434,7 @@ case 19: } break; case 20: -#line 250 "gram.y" +#line 244 "gram.y" { yyval.defaults = new_default(yyvsp[0].string, NULL, false); if (yyval.defaults == NULL) { @@ -1450,7 +1444,7 @@ case 20: } break; case 21: -#line 257 "gram.y" +#line 251 "gram.y" { yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, true); if (yyval.defaults == NULL) { @@ -1460,7 +1454,7 @@ case 21: } break; case 22: -#line 264 "gram.y" +#line 258 "gram.y" { yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '+'); if (yyval.defaults == NULL) { @@ -1470,7 +1464,7 @@ case 22: } break; case 23: -#line 271 "gram.y" +#line 265 "gram.y" { yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '-'); if (yyval.defaults == NULL) { @@ -1480,14 +1474,14 @@ case 23: } break; case 25: -#line 281 "gram.y" +#line 275 "gram.y" { HLTQ_CONCAT(yyvsp[-2].privilege, yyvsp[0].privilege, entries); yyval.privilege = yyvsp[-2].privilege; } break; case 26: -#line 287 "gram.y" +#line 281 "gram.y" { struct privilege *p = calloc(1, sizeof(*p)); if (p == NULL) { @@ -1502,21 +1496,21 @@ case 26: } break; case 27: -#line 301 "gram.y" +#line 295 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 28: -#line 305 "gram.y" +#line 299 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 29: -#line 311 "gram.y" +#line 305 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); if (yyval.member == NULL) { @@ -1526,7 +1520,7 @@ case 29: } break; case 30: -#line 318 "gram.y" +#line 312 "gram.y" { yyval.member = new_member(NULL, ALL); if (yyval.member == NULL) { @@ -1536,7 +1530,7 @@ case 30: } break; case 31: -#line 325 "gram.y" +#line 319 "gram.y" { yyval.member = new_member(yyvsp[0].string, NETGROUP); if (yyval.member == NULL) { @@ -1546,7 +1540,7 @@ case 31: } break; case 32: -#line 332 "gram.y" +#line 326 "gram.y" { yyval.member = new_member(yyvsp[0].string, NTWKADDR); if (yyval.member == NULL) { @@ -1556,7 +1550,7 @@ case 32: } break; case 33: -#line 339 "gram.y" +#line 333 "gram.y" { yyval.member = new_member(yyvsp[0].string, WORD); if (yyval.member == NULL) { @@ -1566,7 +1560,7 @@ case 33: } break; case 35: -#line 349 "gram.y" +#line 343 "gram.y" { struct cmndspec *prev; prev = HLTQ_LAST(yyvsp[-2].cmndspec, cmndspec, entries); @@ -1620,7 +1614,7 @@ case 35: } break; case 36: -#line 402 "gram.y" +#line 396 "gram.y" { struct cmndspec *cs = calloc(1, sizeof(*cs)); if (cs == NULL) { @@ -1674,7 +1668,7 @@ case 36: } break; case 37: -#line 455 "gram.y" +#line 449 "gram.y" { yyval.digest = new_digest(SUDO_DIGEST_SHA224, yyvsp[0].string); if (yyval.digest == NULL) { @@ -1684,7 +1678,7 @@ case 37: } break; case 38: -#line 462 "gram.y" +#line 456 "gram.y" { yyval.digest = new_digest(SUDO_DIGEST_SHA256, yyvsp[0].string); if (yyval.digest == NULL) { @@ -1694,7 +1688,7 @@ case 38: } break; case 39: -#line 469 "gram.y" +#line 463 "gram.y" { yyval.digest = new_digest(SUDO_DIGEST_SHA384, yyvsp[0].string); if (yyval.digest == NULL) { @@ -1704,7 +1698,7 @@ case 39: } break; case 40: -#line 476 "gram.y" +#line 470 "gram.y" { yyval.digest = new_digest(SUDO_DIGEST_SHA512, yyvsp[0].string); if (yyval.digest == NULL) { @@ -1714,20 +1708,20 @@ case 40: } break; case 42: -#line 486 "gram.y" +#line 480 "gram.y" { HLTQ_CONCAT(yyvsp[-2].digest, yyvsp[0].digest, entries); yyval.digest = yyvsp[-2].digest; } break; case 43: -#line 492 "gram.y" +#line 486 "gram.y" { yyval.member = yyvsp[0].member; } break; case 44: -#line 495 "gram.y" +#line 489 "gram.y" { struct sudo_command *c = (struct sudo_command *) yyvsp[0].member->name; @@ -1749,75 +1743,75 @@ case 44: } break; case 45: -#line 516 "gram.y" +#line 510 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 46: -#line 520 "gram.y" +#line 514 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 47: -#line 526 "gram.y" +#line 520 "gram.y" { yyval.string = yyvsp[0].string; } break; case 48: -#line 531 "gram.y" +#line 525 "gram.y" { yyval.string = yyvsp[0].string; } break; case 49: -#line 535 "gram.y" +#line 529 "gram.y" { yyval.string = yyvsp[0].string; } break; case 50: -#line 540 "gram.y" +#line 534 "gram.y" { yyval.string = yyvsp[0].string; } break; case 51: -#line 545 "gram.y" +#line 539 "gram.y" { yyval.string = yyvsp[0].string; } break; case 52: -#line 550 "gram.y" +#line 544 "gram.y" { yyval.string = yyvsp[0].string; } break; case 53: -#line 554 "gram.y" +#line 548 "gram.y" { yyval.string = yyvsp[0].string; } break; case 54: -#line 559 "gram.y" +#line 553 "gram.y" { yyval.runas = NULL; } break; case 55: -#line 562 "gram.y" +#line 556 "gram.y" { yyval.runas = yyvsp[-1].runas; } break; case 56: -#line 567 "gram.y" +#line 561 "gram.y" { yyval.runas = calloc(1, sizeof(struct runascontainer)); if (yyval.runas != NULL) { @@ -1835,7 +1829,7 @@ case 56: } break; case 57: -#line 582 "gram.y" +#line 576 "gram.y" { yyval.runas = calloc(1, sizeof(struct runascontainer)); if (yyval.runas == NULL) { @@ -1847,7 +1841,7 @@ case 57: } break; case 58: -#line 591 "gram.y" +#line 585 "gram.y" { yyval.runas = calloc(1, sizeof(struct runascontainer)); if (yyval.runas == NULL) { @@ -1859,7 +1853,7 @@ case 58: } break; case 59: -#line 600 "gram.y" +#line 594 "gram.y" { yyval.runas = calloc(1, sizeof(struct runascontainer)); if (yyval.runas == NULL) { @@ -1871,7 +1865,7 @@ case 59: } break; case 60: -#line 609 "gram.y" +#line 603 "gram.y" { yyval.runas = calloc(1, sizeof(struct runascontainer)); if (yyval.runas != NULL) { @@ -1889,13 +1883,13 @@ case 60: } break; case 61: -#line 626 "gram.y" +#line 620 "gram.y" { init_options(&yyval.options); } break; case 62: -#line 629 "gram.y" +#line 623 "gram.y" { yyval.options.notbefore = parse_gentime(yyvsp[0].string); free(yyvsp[0].string); @@ -1906,7 +1900,7 @@ case 62: } break; case 63: -#line 637 "gram.y" +#line 631 "gram.y" { yyval.options.notafter = parse_gentime(yyvsp[0].string); free(yyvsp[0].string); @@ -1917,7 +1911,7 @@ case 63: } break; case 64: -#line 645 "gram.y" +#line 639 "gram.y" { yyval.options.timeout = parse_timeout(yyvsp[0].string); free(yyvsp[0].string); @@ -1931,7 +1925,7 @@ case 64: } break; case 65: -#line 656 "gram.y" +#line 650 "gram.y" { #ifdef HAVE_SELINUX free(yyval.options.role); @@ -1940,7 +1934,7 @@ case 65: } break; case 66: -#line 662 "gram.y" +#line 656 "gram.y" { #ifdef HAVE_SELINUX free(yyval.options.type); @@ -1949,7 +1943,7 @@ case 66: } break; case 67: -#line 668 "gram.y" +#line 662 "gram.y" { #ifdef HAVE_PRIV_SET free(yyval.options.privs); @@ -1958,7 +1952,7 @@ case 67: } break; case 68: -#line 674 "gram.y" +#line 668 "gram.y" { #ifdef HAVE_PRIV_SET free(yyval.options.limitprivs); @@ -1967,97 +1961,97 @@ case 68: } break; case 69: -#line 682 "gram.y" +#line 676 "gram.y" { TAGS_INIT(yyval.tag); } break; case 70: -#line 685 "gram.y" +#line 679 "gram.y" { yyval.tag.nopasswd = true; } break; case 71: -#line 688 "gram.y" +#line 682 "gram.y" { yyval.tag.nopasswd = false; } break; case 72: -#line 691 "gram.y" +#line 685 "gram.y" { yyval.tag.noexec = true; } break; case 73: -#line 694 "gram.y" +#line 688 "gram.y" { yyval.tag.noexec = false; } break; case 74: -#line 697 "gram.y" +#line 691 "gram.y" { yyval.tag.setenv = true; } break; case 75: -#line 700 "gram.y" +#line 694 "gram.y" { yyval.tag.setenv = false; } break; case 76: -#line 703 "gram.y" +#line 697 "gram.y" { yyval.tag.log_input = true; } break; case 77: -#line 706 "gram.y" +#line 700 "gram.y" { yyval.tag.log_input = false; } break; case 78: -#line 709 "gram.y" +#line 703 "gram.y" { yyval.tag.log_output = true; } break; case 79: -#line 712 "gram.y" +#line 706 "gram.y" { yyval.tag.log_output = false; } break; case 80: -#line 715 "gram.y" +#line 709 "gram.y" { yyval.tag.follow = true; } break; case 81: -#line 718 "gram.y" +#line 712 "gram.y" { yyval.tag.follow = false; } break; case 82: -#line 721 "gram.y" +#line 715 "gram.y" { yyval.tag.send_mail = true; } break; case 83: -#line 724 "gram.y" +#line 718 "gram.y" { yyval.tag.send_mail = false; } break; case 84: -#line 729 "gram.y" +#line 723 "gram.y" { yyval.member = new_member(NULL, ALL); if (yyval.member == NULL) { @@ -2067,7 +2061,7 @@ case 84: } break; case 85: -#line 736 "gram.y" +#line 730 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); if (yyval.member == NULL) { @@ -2077,7 +2071,7 @@ case 85: } break; case 86: -#line 743 "gram.y" +#line 737 "gram.y" { struct sudo_command *c; @@ -2094,7 +2088,7 @@ case 86: } break; case 89: -#line 763 "gram.y" +#line 757 "gram.y" { const char *s; s = alias_add(&parsed_policy, yyvsp[-2].string, HOSTALIAS, @@ -2106,14 +2100,14 @@ case 89: } break; case 91: -#line 775 "gram.y" +#line 769 "gram.y" { HLTQ_CONCAT(yyvsp[-2].member, yyvsp[0].member, entries); yyval.member = yyvsp[-2].member; } break; case 94: -#line 785 "gram.y" +#line 779 "gram.y" { const char *s; s = alias_add(&parsed_policy, yyvsp[-2].string, CMNDALIAS, @@ -2125,14 +2119,14 @@ case 94: } break; case 96: -#line 797 "gram.y" +#line 791 "gram.y" { HLTQ_CONCAT(yyvsp[-2].member, yyvsp[0].member, entries); yyval.member = yyvsp[-2].member; } break; case 99: -#line 807 "gram.y" +#line 801 "gram.y" { const char *s; s = alias_add(&parsed_policy, yyvsp[-2].string, RUNASALIAS, @@ -2144,7 +2138,7 @@ case 99: } break; case 102: -#line 822 "gram.y" +#line 816 "gram.y" { const char *s; s = alias_add(&parsed_policy, yyvsp[-2].string, USERALIAS, @@ -2156,28 +2150,28 @@ case 102: } break; case 104: -#line 834 "gram.y" +#line 828 "gram.y" { HLTQ_CONCAT(yyvsp[-2].member, yyvsp[0].member, entries); yyval.member = yyvsp[-2].member; } break; case 105: -#line 840 "gram.y" +#line 834 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 106: -#line 844 "gram.y" +#line 838 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 107: -#line 850 "gram.y" +#line 844 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); if (yyval.member == NULL) { @@ -2187,7 +2181,7 @@ case 107: } break; case 108: -#line 857 "gram.y" +#line 851 "gram.y" { yyval.member = new_member(NULL, ALL); if (yyval.member == NULL) { @@ -2197,7 +2191,7 @@ case 108: } break; case 109: -#line 864 "gram.y" +#line 858 "gram.y" { yyval.member = new_member(yyvsp[0].string, NETGROUP); if (yyval.member == NULL) { @@ -2207,7 +2201,7 @@ case 109: } break; case 110: -#line 871 "gram.y" +#line 865 "gram.y" { yyval.member = new_member(yyvsp[0].string, USERGROUP); if (yyval.member == NULL) { @@ -2217,7 +2211,7 @@ case 110: } break; case 111: -#line 878 "gram.y" +#line 872 "gram.y" { yyval.member = new_member(yyvsp[0].string, WORD); if (yyval.member == NULL) { @@ -2227,28 +2221,28 @@ case 111: } break; case 113: -#line 888 "gram.y" +#line 882 "gram.y" { HLTQ_CONCAT(yyvsp[-2].member, yyvsp[0].member, entries); yyval.member = yyvsp[-2].member; } break; case 114: -#line 894 "gram.y" +#line 888 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 115: -#line 898 "gram.y" +#line 892 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 116: -#line 904 "gram.y" +#line 898 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); if (yyval.member == NULL) { @@ -2258,7 +2252,7 @@ case 116: } break; case 117: -#line 911 "gram.y" +#line 905 "gram.y" { yyval.member = new_member(NULL, ALL); if (yyval.member == NULL) { @@ -2268,7 +2262,7 @@ case 117: } break; case 118: -#line 918 "gram.y" +#line 912 "gram.y" { yyval.member = new_member(yyvsp[0].string, WORD); if (yyval.member == NULL) { @@ -2277,7 +2271,7 @@ case 118: } } break; -#line 2223 "gram.c" +#line 2217 "gram.c" } yyssp -= yym; yystate = *yyssp; diff --git a/plugins/sudoers/gram.y b/plugins/sudoers/gram.y index aa857dd2b..b92195570 100644 --- a/plugins/sudoers/gram.y +++ b/plugins/sudoers/gram.y @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -35,11 +34,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif #if defined(YYBISON) && defined(HAVE_ALLOCA_H) && !defined(__GNUC__) # include #endif /* YYBISON && HAVE_ALLOCA_H && !__GNUC__ */ diff --git a/plugins/sudoers/group_plugin.c b/plugins/sudoers/group_plugin.c index ada703248..9d724b7fe 100644 --- a/plugins/sudoers/group_plugin.c +++ b/plugins/sudoers/group_plugin.c @@ -23,7 +23,6 @@ #include -#include #include #include #include @@ -34,10 +33,8 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include -#include #include "sudoers.h" #include "sudo_dso.h" diff --git a/plugins/sudoers/hexchar.c b/plugins/sudoers/hexchar.c index 6ef72cc9c..510d27c64 100644 --- a/plugins/sudoers/hexchar.c +++ b/plugins/sudoers/hexchar.c @@ -23,9 +23,6 @@ #include -#include -#include - #include "sudoers.h" /* diff --git a/plugins/sudoers/interfaces.c b/plugins/sudoers/interfaces.c index 072901369..b9ebc9ec7 100644 --- a/plugins/sudoers/interfaces.c +++ b/plugins/sudoers/interfaces.c @@ -33,7 +33,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include #include #ifdef NEED_RESOLV_H diff --git a/plugins/sudoers/iolog_client.c b/plugins/sudoers/iolog_client.c index 23100fa9d..9a1526a54 100644 --- a/plugins/sudoers/iolog_client.c +++ b/plugins/sudoers/iolog_client.c @@ -32,11 +32,6 @@ #include #include #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif /* HAVE_STDBOOL_H */ #if defined(HAVE_STDINT_H) # include #elif defined(HAVE_INTTYPES_H) diff --git a/plugins/sudoers/iolog_path_escapes.c b/plugins/sudoers/iolog_path_escapes.c index e7736121e..d8d05cd14 100644 --- a/plugins/sudoers/iolog_path_escapes.c +++ b/plugins/sudoers/iolog_path_escapes.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -34,8 +33,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/ldap_conf.c b/plugins/sudoers/ldap_conf.c index 402a51a20..e107eb60e 100644 --- a/plugins/sudoers/ldap_conf.c +++ b/plugins/sudoers/ldap_conf.c @@ -25,9 +25,7 @@ #include -#include #include -#include #include #include #ifdef HAVE_STRING_H @@ -37,7 +35,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include #ifdef HAVE_LBER_H diff --git a/plugins/sudoers/linux_audit.c b/plugins/sudoers/linux_audit.c index ed76600d3..17e9946ab 100644 --- a/plugins/sudoers/linux_audit.c +++ b/plugins/sudoers/linux_audit.c @@ -25,7 +25,6 @@ #ifdef HAVE_LINUX_AUDIT -#include #include #include #include diff --git a/plugins/sudoers/locale.c b/plugins/sudoers/locale.c index 12d48056a..913cd0b58 100644 --- a/plugins/sudoers/locale.c +++ b/plugins/sudoers/locale.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index 92229ea56..4e1804575 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -31,9 +31,7 @@ #include -#include #include -#include #include #include #include @@ -50,7 +48,6 @@ #include #include #include -#include #include #include #include diff --git a/plugins/sudoers/logwrap.c b/plugins/sudoers/logwrap.c index 30542bc54..be5b66a26 100644 --- a/plugins/sudoers/logwrap.c +++ b/plugins/sudoers/logwrap.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index eb8c9f606..96b8f27fc 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -28,7 +28,6 @@ #include -#include #include #ifdef HAVE_SYS_SYSTEMINFO_H # include diff --git a/plugins/sudoers/match_command.c b/plugins/sudoers/match_command.c index 275672ed9..d0d7ca96c 100644 --- a/plugins/sudoers/match_command.c +++ b/plugins/sudoers/match_command.c @@ -28,7 +28,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/match_digest.c b/plugins/sudoers/match_digest.c index 049bf1b39..6016a9417 100644 --- a/plugins/sudoers/match_digest.c +++ b/plugins/sudoers/match_digest.c @@ -28,8 +28,6 @@ #include -#include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/parse.c b/plugins/sudoers/parse.c index dca3304ec..4e7932e13 100644 --- a/plugins/sudoers/parse.c +++ b/plugins/sudoers/parse.c @@ -23,7 +23,6 @@ #include -#include #include #include #include @@ -35,9 +34,7 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include -#include #include "sudoers.h" #include "sudo_lbuf.h" diff --git a/plugins/sudoers/parse_ldif.c b/plugins/sudoers/parse_ldif.c index dc1e7f437..62ad79485 100644 --- a/plugins/sudoers/parse_ldif.c +++ b/plugins/sudoers/parse_ldif.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/prompt.c b/plugins/sudoers/prompt.c index 42389fd4e..bb042800a 100644 --- a/plugins/sudoers/prompt.c +++ b/plugins/sudoers/prompt.c @@ -28,7 +28,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -38,7 +37,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include "sudoers.h" diff --git a/plugins/sudoers/pwutil.c b/plugins/sudoers/pwutil.c index a92781277..eaa7c06de 100644 --- a/plugins/sudoers/pwutil.c +++ b/plugins/sudoers/pwutil.c @@ -28,18 +28,15 @@ #include -#include #include #include #include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #ifdef HAVE_SETAUTHDB # include #endif /* HAVE_SETAUTHDB */ diff --git a/plugins/sudoers/pwutil_impl.c b/plugins/sudoers/pwutil_impl.c index 2634ee445..0ca0d3aa4 100644 --- a/plugins/sudoers/pwutil_impl.c +++ b/plugins/sudoers/pwutil_impl.c @@ -28,7 +28,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/rcstr.c b/plugins/sudoers/rcstr.c index f506ba592..cedcad09b 100644 --- a/plugins/sudoers/rcstr.c +++ b/plugins/sudoers/rcstr.c @@ -23,16 +23,8 @@ #include -#include - #include -#include #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/plugins/sudoers/redblack.c b/plugins/sudoers/redblack.c index 4673c2d3b..3c837b8ee 100644 --- a/plugins/sudoers/redblack.c +++ b/plugins/sudoers/redblack.c @@ -49,8 +49,6 @@ #include -#include - #include #include diff --git a/plugins/sudoers/regress/check_symbols/check_symbols.c b/plugins/sudoers/regress/check_symbols/check_symbols.c index a1c15163b..87a0519e7 100644 --- a/plugins/sudoers/regress/check_symbols/check_symbols.c +++ b/plugins/sudoers/regress/check_symbols/check_symbols.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/regress/env_match/check_env_pattern.c b/plugins/sudoers/regress/env_match/check_env_pattern.c index 1855bceb9..95d60e711 100644 --- a/plugins/sudoers/regress/env_match/check_env_pattern.c +++ b/plugins/sudoers/regress/env_match/check_env_pattern.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,8 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include /* for sudo_compat.h */ -#include /* for sudo_compat.h */ #include "sudoers.h" diff --git a/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c b/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c index e544eb1a5..ca0bb596d 100644 --- a/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c +++ b/plugins/sudoers/regress/iolog_plugin/check_iolog_plugin.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -29,7 +28,6 @@ #endif /* HAVE_STRINGS_H */ #include #include -#include #include #define SUDO_ERROR_WRAP 0 diff --git a/plugins/sudoers/regress/logging/check_wrap.c b/plugins/sudoers/regress/logging/check_wrap.c index c99b4ec55..2c5d9dd2a 100644 --- a/plugins/sudoers/regress/logging/check_wrap.c +++ b/plugins/sudoers/regress/logging/check_wrap.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/regress/parser/check_addr.c b/plugins/sudoers/regress/parser/check_addr.c index 3c7cbcd8f..fa83a58fd 100644 --- a/plugins/sudoers/regress/parser/check_addr.c +++ b/plugins/sudoers/regress/parser/check_addr.c @@ -30,9 +30,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include -#include -#include #include #include diff --git a/plugins/sudoers/regress/parser/check_base64.c b/plugins/sudoers/regress/parser/check_base64.c index 6c70c982e..ae0aa8aa0 100644 --- a/plugins/sudoers/regress/parser/check_base64.c +++ b/plugins/sudoers/regress/parser/check_base64.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif #define SUDO_ERROR_WRAP 0 diff --git a/plugins/sudoers/regress/parser/check_digest.c b/plugins/sudoers/regress/parser/check_digest.c index c24c78d1a..c57e54502 100644 --- a/plugins/sudoers/regress/parser/check_digest.c +++ b/plugins/sudoers/regress/parser/check_digest.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,17 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif /* HAVE_STDBOOL_H */ -#include #include #include "sudo_compat.h" diff --git a/plugins/sudoers/regress/parser/check_fill.c b/plugins/sudoers/regress/parser/check_fill.c index f065b5557..ea9b4d384 100644 --- a/plugins/sudoers/regress/parser/check_fill.c +++ b/plugins/sudoers/regress/parser/check_fill.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STDBOOL_H @@ -32,8 +31,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #define SUDO_ERROR_WRAP 0 diff --git a/plugins/sudoers/regress/parser/check_gentime.c b/plugins/sudoers/regress/parser/check_gentime.c index ba840bc3c..f484025ab 100644 --- a/plugins/sudoers/regress/parser/check_gentime.c +++ b/plugins/sudoers/regress/parser/check_gentime.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/regress/parser/check_hexchar.c b/plugins/sudoers/regress/parser/check_hexchar.c index 6722f5eff..2d7029916 100644 --- a/plugins/sudoers/regress/parser/check_hexchar.c +++ b/plugins/sudoers/regress/parser/check_hexchar.c @@ -18,7 +18,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -27,11 +26,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#if defined(HAVE_STDINT_H) -# include -#elif defined(HAVE_INTTYPES_H) -# include -#endif #define SUDO_ERROR_WRAP 0 diff --git a/plugins/sudoers/regress/starttime/check_starttime.c b/plugins/sudoers/regress/starttime/check_starttime.c index 0ea8d928a..bbd2eb4c1 100644 --- a/plugins/sudoers/regress/starttime/check_starttime.c +++ b/plugins/sudoers/regress/starttime/check_starttime.c @@ -18,7 +18,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/set_perms.c b/plugins/sudoers/set_perms.c index bcfc61a5b..5258d246b 100644 --- a/plugins/sudoers/set_perms.c +++ b/plugins/sudoers/set_perms.c @@ -27,7 +27,6 @@ #include -#include #include #include #include diff --git a/plugins/sudoers/solaris_audit.c b/plugins/sudoers/solaris_audit.c index a0196535f..4b5ac4438 100644 --- a/plugins/sudoers/solaris_audit.c +++ b/plugins/sudoers/solaris_audit.c @@ -25,11 +25,11 @@ #ifdef HAVE_SOLARIS_AUDIT -#include #include #include -#include #include +#include +#include #include #include diff --git a/plugins/sudoers/sssd.c b/plugins/sudoers/sssd.c index f517d19b7..327781cdc 100644 --- a/plugins/sudoers/sssd.c +++ b/plugins/sudoers/sssd.c @@ -28,24 +28,18 @@ #ifdef HAVE_SSSD -#include -#include #include #include +#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #include -#include -#include - #include -#include +#include #include "sudoers.h" #include "gram.h" diff --git a/plugins/sudoers/strlist.c b/plugins/sudoers/strlist.c index 321898873..d6e74fe3f 100644 --- a/plugins/sudoers/strlist.c +++ b/plugins/sudoers/strlist.c @@ -23,8 +23,6 @@ #include -#include -#include #include #ifdef HAVE_STRING_H # include diff --git a/plugins/sudoers/stubs.c b/plugins/sudoers/stubs.c index 327f8e25e..39abf9655 100644 --- a/plugins/sudoers/stubs.c +++ b/plugins/sudoers/stubs.c @@ -28,9 +28,7 @@ #include -#include #include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/plugins/sudoers/sudo_nss.c b/plugins/sudoers/sudo_nss.c index b186529d9..ea15ff571 100644 --- a/plugins/sudoers/sudo_nss.c +++ b/plugins/sudoers/sudo_nss.c @@ -23,9 +23,6 @@ #include -#include -#include - #include #include #ifdef HAVE_STRING_H @@ -34,9 +31,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/sudo_printf.c b/plugins/sudoers/sudo_printf.c index fd21e4b9e..944280b12 100644 --- a/plugins/sudoers/sudo_printf.c +++ b/plugins/sudoers/sudo_printf.c @@ -23,9 +23,7 @@ #include -#include #include -#include #include #include diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index be33998e5..5fd987d0c 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -47,9 +47,7 @@ #include #include #include -#include #include -#include #include #ifdef HAVE_LOGIN_CAP_H # include diff --git a/plugins/sudoers/sudoers_debug.c b/plugins/sudoers/sudoers_debug.c index 079f0d48e..6bf3671f2 100644 --- a/plugins/sudoers/sudoers_debug.c +++ b/plugins/sudoers/sudoers_debug.c @@ -23,22 +23,14 @@ #include -#include #include #include -#ifdef HAVE_STDBOOL_H -# include -#else -# include "compat/stdbool.h" -#endif #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #include "sudoers.h" diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index f994d511f..f3288b219 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -26,8 +26,8 @@ #include #include #include -#include #include + #include #include #if defined(HAVE_STDINT_H) diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c index 80aa1950d..79db12216 100644 --- a/plugins/sudoers/testsudoers.c +++ b/plugins/sudoers/testsudoers.c @@ -30,7 +30,8 @@ #include #include -#include +#include +#include #include #include #ifdef HAVE_STRING_H @@ -40,14 +41,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef HAVE_NETGROUP_H -# include -#endif /* HAVE_NETGROUP_H */ -#include -#include #include -#include -#include #include "tsgetgrpw.h" #include "sudoers.h" diff --git a/plugins/sudoers/timeout.c b/plugins/sudoers/timeout.c index c86546422..7bbef8656 100644 --- a/plugins/sudoers/timeout.c +++ b/plugins/sudoers/timeout.c @@ -23,10 +23,8 @@ #include -#include #include #include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index 4191a9181..3e54e9e4b 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -23,7 +23,6 @@ #include -#include #include #include #include @@ -45,7 +44,6 @@ #include #include #include -#include #include #include "sudoers.h" diff --git a/plugins/sudoers/timestr.c b/plugins/sudoers/timestr.c index 86de36437..339840559 100644 --- a/plugins/sudoers/timestr.c +++ b/plugins/sudoers/timestr.c @@ -24,9 +24,6 @@ #include -#include -#include -#include #include #include "sudo_compat.h" diff --git a/plugins/sudoers/toke_util.c b/plugins/sudoers/toke_util.c index 62c9e6948..69e396041 100644 --- a/plugins/sudoers/toke_util.c +++ b/plugins/sudoers/toke_util.c @@ -28,7 +28,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -37,8 +36,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include #include "sudoers.h" #include "toke.h" diff --git a/plugins/sudoers/tsdump.c b/plugins/sudoers/tsdump.c index 9297b5431..79efac3bf 100644 --- a/plugins/sudoers/tsdump.c +++ b/plugins/sudoers/tsdump.c @@ -23,8 +23,6 @@ #include -#include -#include #include #include #ifdef HAVE_STRING_H diff --git a/plugins/sudoers/tsgetgrpw.c b/plugins/sudoers/tsgetgrpw.c index b416755fb..d1163ddfd 100644 --- a/plugins/sudoers/tsgetgrpw.c +++ b/plugins/sudoers/tsgetgrpw.c @@ -30,7 +30,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -39,7 +38,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include #include #include diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index c0edf4084..72a49f054 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -38,7 +38,6 @@ #include #include -#include #include #ifndef __TANDEM # include diff --git a/plugins/system_group/system_group.c b/plugins/system_group/system_group.c index c010ff8ab..f0d346699 100644 --- a/plugins/system_group/system_group.c +++ b/plugins/system_group/system_group.c @@ -23,9 +23,6 @@ #include -#include -#include - #include #include #ifdef HAVE_STDBOOL_H @@ -39,13 +36,7 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include -#include -#include -#include -#include #include -#include #include "sudo_compat.h" #include "sudo_dso.h" diff --git a/src/conversation.c b/src/conversation.c index 6bd016f1f..e94a90cd7 100644 --- a/src/conversation.c +++ b/src/conversation.c @@ -27,7 +27,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/src/copy_file.c b/src/copy_file.c index 9be8c86ce..0db52630f 100644 --- a/src/copy_file.c +++ b/src/copy_file.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #include #include diff --git a/src/env_hooks.c b/src/env_hooks.c index ab11c10f0..494b954a7 100644 --- a/src/env_hooks.c +++ b/src/env_hooks.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #ifdef HAVE_STRING_H # include diff --git a/src/exec.c b/src/exec.c index e32048ba5..2cbcf427e 100644 --- a/src/exec.c +++ b/src/exec.c @@ -23,10 +23,8 @@ #include -#include #include #include -#include #include #ifdef HAVE_STRING_H # include diff --git a/src/exec_common.c b/src/exec_common.c index 24bac9f55..c10e6ef72 100644 --- a/src/exec_common.c +++ b/src/exec_common.c @@ -23,7 +23,6 @@ #include -#include #include #include #ifdef HAVE_STRING_H @@ -37,8 +36,6 @@ # include #endif #include -#include -#include #include "sudo.h" #include "sudo_exec.h" diff --git a/src/exec_nopty.c b/src/exec_nopty.c index 4769846c1..04fe67a38 100644 --- a/src/exec_nopty.c +++ b/src/exec_nopty.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/src/get_pty.c b/src/get_pty.c index 3b727c991..9de0f7bec 100644 --- a/src/get_pty.c +++ b/src/get_pty.c @@ -24,13 +24,11 @@ #include -#include #include #include #ifdef HAVE_SYS_STROPTS_H #include #endif /* HAVE_SYS_STROPTS_H */ -#include #include #ifdef HAVE_STRING_H # include @@ -42,7 +40,6 @@ #include #include #include -#include #if defined(HAVE_LIBUTIL_H) # include diff --git a/src/hooks.c b/src/hooks.c index 01078ae4c..f6b2350ac 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -23,8 +23,6 @@ #include -#include -#include #include #ifdef HAVE_STRING_H # include @@ -32,7 +30,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include #include "sudo.h" diff --git a/src/limits.c b/src/limits.c index 334d2cad0..de3559682 100644 --- a/src/limits.c +++ b/src/limits.c @@ -23,10 +23,7 @@ #include -#include #include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/src/load_plugins.c b/src/load_plugins.c index 454a97781..08fd2b451 100644 --- a/src/load_plugins.c +++ b/src/load_plugins.c @@ -23,7 +23,6 @@ #include -#include #include #include #include @@ -33,7 +32,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include #include "sudo.h" diff --git a/src/openbsd.c b/src/openbsd.c index ed0d021eb..180a79102 100644 --- a/src/openbsd.c +++ b/src/openbsd.c @@ -23,17 +23,6 @@ #include -#include -#include -#include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ -#include - #include "sudo.h" int diff --git a/src/parse_args.c b/src/parse_args.c index 725684e4b..5fb1a49bc 100644 --- a/src/parse_args.c +++ b/src/parse_args.c @@ -27,8 +27,6 @@ #include -#include - #include #include #ifdef HAVE_STRING_H @@ -37,10 +35,7 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include -#include -#include #include #include diff --git a/src/preload.c b/src/preload.c index 524ada21c..01d30ccdd 100644 --- a/src/preload.c +++ b/src/preload.c @@ -23,7 +23,6 @@ #include -#include #ifdef HAVE_GSS_KRB5_CCACHE_NAME # if defined(HAVE_GSSAPI_GSSAPI_KRB5_H) # include diff --git a/src/preserve_fds.c b/src/preserve_fds.c index 4823059c1..5f39bb246 100644 --- a/src/preserve_fds.c +++ b/src/preserve_fds.c @@ -23,9 +23,6 @@ #include -#include - -#include #include #ifdef HAVE_STRING_H # include diff --git a/src/selinux.c b/src/selinux.c index 25e174865..4a0f4524c 100644 --- a/src/selinux.c +++ b/src/selinux.c @@ -35,7 +35,6 @@ #ifdef HAVE_SELINUX -#include #include #include #include diff --git a/src/sesh.c b/src/sesh.c index 1b2c4e99c..c9d426000 100644 --- a/src/sesh.c +++ b/src/sesh.c @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/src/signal.c b/src/signal.c index 80bc1d82b..867341f82 100644 --- a/src/signal.c +++ b/src/signal.c @@ -23,18 +23,13 @@ #include -#include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#include #include -#include #include #include "sudo.h" diff --git a/src/solaris.c b/src/solaris.c index d5ec8d07d..bfaccea2e 100644 --- a/src/solaris.c +++ b/src/solaris.c @@ -23,23 +23,12 @@ #include -#include -#include -#include -#include -#ifdef HAVE_STRING_H -# include -#endif /* HAVE_STRING_H */ -#ifdef HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ -#include #ifdef HAVE_PROJECT_H # include # include +# include +# include #endif -#include -#include #include "sudo.h" #include "sudo_dso.h" diff --git a/src/sudo_edit.c b/src/sudo_edit.c index bff1889a0..fd677148e 100644 --- a/src/sudo_edit.c +++ b/src/sudo_edit.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #ifdef HAVE_STRING_H diff --git a/src/tcsetpgrp_nobg.c b/src/tcsetpgrp_nobg.c index 3c888b814..59748c6dc 100644 --- a/src/tcsetpgrp_nobg.c +++ b/src/tcsetpgrp_nobg.c @@ -23,9 +23,6 @@ #include -#include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ diff --git a/src/tgetpass.c b/src/tgetpass.c index 9c9de08c2..98feb892a 100644 --- a/src/tgetpass.c +++ b/src/tgetpass.c @@ -32,7 +32,6 @@ #include -#include #include #include #include @@ -43,7 +42,6 @@ # include #endif /* HAVE_STRINGS_H */ #include -#include #include #include #include diff --git a/src/utmp.c b/src/utmp.c index 5fd67e799..04b90dd24 100644 --- a/src/utmp.c +++ b/src/utmp.c @@ -23,11 +23,8 @@ #include -#include #include #include -#include -#include #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */