From: Todd C. Miller Date: Tue, 4 Dec 2012 15:40:47 +0000 (-0500) Subject: Don't include . We only needed it for MAXPATHLEN, X-Git-Tag: SUDO_1_8_7~1^2~300 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d7072fe0942f265fefefb8579cfd6cc59281db7;p=sudo Don't include . We only needed it for MAXPATHLEN, MAXHOSTNAMELEN and the MIN/MAX macros. We now use PATH_MAX and HOST_NAME_MAX throughout without falling back on MAXPATHLEN or MAXHOSTNAMELEN and define our own MIN/MAX macros as needed. --- diff --git a/common/alloc.c b/common/alloc.c index adc200723..09c95f5eb 100644 --- a/common/alloc.c +++ b/common/alloc.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/common/atobool.c b/common/atobool.c index 6d6b50289..86b01f583 100644 --- a/common/atobool.c +++ b/common/atobool.c @@ -17,7 +17,6 @@ #include #include -#include #include #ifdef STDC_HEADERS diff --git a/common/fileops.c b/common/fileops.c index f99710c03..a23a42a07 100644 --- a/common/fileops.c +++ b/common/fileops.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef HAVE_FLOCK # include diff --git a/common/fmt_string.c b/common/fmt_string.c index 23bc5f72b..2b8ccc3a1 100644 --- a/common/fmt_string.c +++ b/common/fmt_string.c @@ -17,7 +17,6 @@ #include #include -#include #include #ifdef STDC_HEADERS diff --git a/common/lbuf.c b/common/lbuf.c index 3b20323fc..bbd095918 100644 --- a/common/lbuf.c +++ b/common/lbuf.c @@ -19,7 +19,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/common/secure_path.c b/common/secure_path.c index 7ae3c19e0..6eaf2fc85 100644 --- a/common/secure_path.c +++ b/common/secure_path.c @@ -18,7 +18,6 @@ #include #include -#include #include #ifdef HAVE_STRING_H # include diff --git a/common/sudo_conf.c b/common/sudo_conf.c index 92453b7c5..75100e970 100644 --- a/common/sudo_conf.c +++ b/common/sudo_conf.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/common/sudo_debug.c b/common/sudo_debug.c index 823019058..3416cb3d4 100644 --- a/common/sudo_debug.c +++ b/common/sudo_debug.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/common/term.c b/common/term.c index e9c4a499d..83e130d1d 100644 --- a/common/term.c +++ b/common/term.c @@ -17,7 +17,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/compat/closefrom.c b/compat/closefrom.c index 71777e7b2..8ff20f864 100644 --- a/compat/closefrom.c +++ b/compat/closefrom.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/compat/getcwd.c b/compat/getcwd.c index 31855046c..0c0de2bdb 100644 --- a/compat/getcwd.c +++ b/compat/getcwd.c @@ -29,7 +29,7 @@ #include -#include +#include #include #include diff --git a/compat/glob.c b/compat/glob.c index cf9a4e2bf..d81fee987 100644 --- a/compat/glob.c +++ b/compat/glob.c @@ -52,7 +52,7 @@ #include -#include +#include #include #include diff --git a/compat/snprintf.c b/compat/snprintf.c index 8a77a5bd7..5fcdb4ec3 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -42,7 +42,6 @@ #include #include -#include #include #ifdef STDC_HEADERS diff --git a/include/missing.h b/include/missing.h index 1cd16e5b9..a060b7cc8 100644 --- a/include/missing.h +++ b/include/missing.h @@ -82,26 +82,18 @@ #endif #ifndef PATH_MAX -# ifdef MAXPATHLEN -# define PATH_MAX MAXPATHLEN +# ifdef _POSIX_PATH_MAX +# define PATH_MAX _POSIX_PATH_MAX # else -# ifdef _POSIX_PATH_MAX -# define PATH_MAX _POSIX_PATH_MAX -# else -# define PATH_MAX 1024 -# endif +# define PATH_MAX 256 # endif #endif #ifndef HOST_NAME_MAX -# ifdef MAXHOSTNAMELEN -# define HOST_NAME_MAX MAXHOSTNAMELEN +# ifdef _POSIX_HOST_NAME_MAX +# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX # else -# ifdef _POSIX_HOST_NAME_MAX -# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX -# else -# define HOST_NAME_MAX 64 -# endif +# define HOST_NAME_MAX 255 # endif #endif @@ -148,7 +140,7 @@ #endif /* - * BSD defines these in but others may not. + * BSD defines these in but we don't include that anymore. */ #ifndef MIN # define MIN(a,b) (((a)<(b))?(a):(b)) diff --git a/plugins/sample/sample_plugin.c b/plugins/sample/sample_plugin.c index a8d4118b7..23043d095 100644 --- a/plugins/sample/sample_plugin.c +++ b/plugins/sample/sample_plugin.c @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/plugins/sample_group/getgrent.c b/plugins/sample_group/getgrent.c index aa98c1419..5c7a319b6 100644 --- a/plugins/sample_group/getgrent.c +++ b/plugins/sample_group/getgrent.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sample_group/plugin_test.c b/plugins/sample_group/plugin_test.c index 9d75cb292..a74deb1c4 100644 --- a/plugins/sample_group/plugin_test.c +++ b/plugins/sample_group/plugin_test.c @@ -15,7 +15,6 @@ */ #include -#include #include #include diff --git a/plugins/sample_group/sample_group.c b/plugins/sample_group/sample_group.c index 2e3628d24..1cd238c75 100644 --- a/plugins/sample_group/sample_group.c +++ b/plugins/sample_group/sample_group.c @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/plugins/sudoers/alias.c b/plugins/sudoers/alias.c index 1079bf2a8..d89e32918 100644 --- a/plugins/sudoers/alias.c +++ b/plugins/sudoers/alias.c @@ -20,7 +20,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/afs.c b/plugins/sudoers/auth/afs.c index f9693d04f..d2ed144e0 100644 --- a/plugins/sudoers/auth/afs.c +++ b/plugins/sudoers/auth/afs.c @@ -21,7 +21,6 @@ #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/auth/aix_auth.c b/plugins/sudoers/auth/aix_auth.c index 7aa5e273b..14c5094eb 100644 --- a/plugins/sudoers/auth/aix_auth.c +++ b/plugins/sudoers/auth/aix_auth.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/bsdauth.c b/plugins/sudoers/auth/bsdauth.c index e2cbb0581..2e39d3e52 100644 --- a/plugins/sudoers/auth/bsdauth.c +++ b/plugins/sudoers/auth/bsdauth.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/dce.c b/plugins/sudoers/auth/dce.c index 467c08fe9..bee57dd5e 100644 --- a/plugins/sudoers/auth/dce.c +++ b/plugins/sudoers/auth/dce.c @@ -36,7 +36,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/fwtk.c b/plugins/sudoers/auth/fwtk.c index 48556237c..aea6dd2c9 100644 --- a/plugins/sudoers/auth/fwtk.c +++ b/plugins/sudoers/auth/fwtk.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/kerb5.c b/plugins/sudoers/auth/kerb5.c index 0ccdb0e75..c6cabc651 100644 --- a/plugins/sudoers/auth/kerb5.c +++ b/plugins/sudoers/auth/kerb5.c @@ -25,7 +25,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/pam.c b/plugins/sudoers/auth/pam.c index 6ec97c6ce..5f0386492 100644 --- a/plugins/sudoers/auth/pam.c +++ b/plugins/sudoers/auth/pam.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/passwd.c b/plugins/sudoers/auth/passwd.c index 1736f3066..2cc16c370 100644 --- a/plugins/sudoers/auth/passwd.c +++ b/plugins/sudoers/auth/passwd.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/rfc1938.c b/plugins/sudoers/auth/rfc1938.c index f4ed7c0f6..ec9463391 100644 --- a/plugins/sudoers/auth/rfc1938.c +++ b/plugins/sudoers/auth/rfc1938.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/secureware.c b/plugins/sudoers/auth/secureware.c index 776b5dd70..70a9c7b33 100644 --- a/plugins/sudoers/auth/secureware.c +++ b/plugins/sudoers/auth/secureware.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/securid5.c b/plugins/sudoers/auth/securid5.c index 6fe7dcbd0..b2caf4b5e 100644 --- a/plugins/sudoers/auth/securid5.c +++ b/plugins/sudoers/auth/securid5.c @@ -26,7 +26,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/sia.c b/plugins/sudoers/auth/sia.c index a9f847eda..96476e019 100644 --- a/plugins/sudoers/auth/sia.c +++ b/plugins/sudoers/auth/sia.c @@ -24,7 +24,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/auth/sudo_auth.c b/plugins/sudoers/auth/sudo_auth.c index e23954221..3cd510b6d 100644 --- a/plugins/sudoers/auth/sudo_auth.c +++ b/plugins/sudoers/auth/sudo_auth.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/boottime.c b/plugins/sudoers/boottime.c index 2c9c07467..6c8f28225 100644 --- a/plugins/sudoers/boottime.c +++ b/plugins/sudoers/boottime.c @@ -16,7 +16,6 @@ #include -#include #include #include diff --git a/plugins/sudoers/check.c b/plugins/sudoers/check.c index c0954af39..5f7eb0a6e 100644 --- a/plugins/sudoers/check.c +++ b/plugins/sudoers/check.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/defaults.c b/plugins/sudoers/defaults.c index 156eff065..69ddeebc8 100644 --- a/plugins/sudoers/defaults.c +++ b/plugins/sudoers/defaults.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/env.c b/plugins/sudoers/env.c index e937a995a..caae19adb 100644 --- a/plugins/sudoers/env.c +++ b/plugins/sudoers/env.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/find_path.c b/plugins/sudoers/find_path.c index ff1bd096d..a8a85d3f9 100644 --- a/plugins/sudoers/find_path.c +++ b/plugins/sudoers/find_path.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/getspwuid.c b/plugins/sudoers/getspwuid.c index e98db8358..dd8adcb1f 100644 --- a/plugins/sudoers/getspwuid.c +++ b/plugins/sudoers/getspwuid.c @@ -23,7 +23,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/goodpath.c b/plugins/sudoers/goodpath.c index 2a8446b1c..f73c1f09d 100644 --- a/plugins/sudoers/goodpath.c +++ b/plugins/sudoers/goodpath.c @@ -23,7 +23,6 @@ #include #include -#include #include #ifdef HAVE_STRING_H # include diff --git a/plugins/sudoers/gram.c b/plugins/sudoers/gram.c index a4484ecd3..9360db557 100644 --- a/plugins/sudoers/gram.c +++ b/plugins/sudoers/gram.c @@ -63,7 +63,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include @@ -161,7 +160,7 @@ sudoerserror(const char *s) parse_error = true; debug_return; } -#line 128 "gram.y" +#line 127 "gram.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { @@ -178,7 +177,7 @@ typedef union { int tok; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ -#line 181 "gram.c" +#line 180 "gram.c" #define COMMAND 257 #define ALIAS 258 #define DEFVAR 259 @@ -705,7 +704,7 @@ short *yyss; short *yysslim; YYSTYPE *yyvs; int yystacksize; -#line 680 "gram.y" +#line 679 "gram.y" static struct defaults * new_default(char *var, char *val, int op) { @@ -908,7 +907,7 @@ init_parser(const char *path, bool quiet) debug_return; } -#line 859 "gram.c" +#line 858 "gram.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) @@ -1111,127 +1110,127 @@ yyreduce: switch (yyn) { case 1: -#line 210 "gram.y" +#line 209 "gram.y" { ; } break; case 5: -#line 218 "gram.y" +#line 217 "gram.y" { ; } break; case 6: -#line 221 "gram.y" +#line 220 "gram.y" { yyerrok; } break; case 7: -#line 224 "gram.y" +#line 223 "gram.y" { add_userspec(yyvsp[-1].member, yyvsp[0].privilege); } break; case 8: -#line 227 "gram.y" +#line 226 "gram.y" { ; } break; case 9: -#line 230 "gram.y" +#line 229 "gram.y" { ; } break; case 10: -#line 233 "gram.y" +#line 232 "gram.y" { ; } break; case 11: -#line 236 "gram.y" +#line 235 "gram.y" { ; } break; case 12: -#line 239 "gram.y" +#line 238 "gram.y" { add_defaults(DEFAULTS, NULL, yyvsp[0].defaults); } break; case 13: -#line 242 "gram.y" +#line 241 "gram.y" { add_defaults(DEFAULTS_USER, yyvsp[-1].member, yyvsp[0].defaults); } break; case 14: -#line 245 "gram.y" +#line 244 "gram.y" { add_defaults(DEFAULTS_RUNAS, yyvsp[-1].member, yyvsp[0].defaults); } break; case 15: -#line 248 "gram.y" +#line 247 "gram.y" { add_defaults(DEFAULTS_HOST, yyvsp[-1].member, yyvsp[0].defaults); } break; case 16: -#line 251 "gram.y" +#line 250 "gram.y" { add_defaults(DEFAULTS_CMND, yyvsp[-1].member, yyvsp[0].defaults); } break; case 18: -#line 257 "gram.y" +#line 256 "gram.y" { list_append(yyvsp[-2].defaults, yyvsp[0].defaults); yyval.defaults = yyvsp[-2].defaults; } break; case 19: -#line 263 "gram.y" +#line 262 "gram.y" { yyval.defaults = new_default(yyvsp[0].string, NULL, true); } break; case 20: -#line 266 "gram.y" +#line 265 "gram.y" { yyval.defaults = new_default(yyvsp[0].string, NULL, false); } break; case 21: -#line 269 "gram.y" +#line 268 "gram.y" { yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, true); } break; case 22: -#line 272 "gram.y" +#line 271 "gram.y" { yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '+'); } break; case 23: -#line 275 "gram.y" +#line 274 "gram.y" { yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '-'); } break; case 25: -#line 281 "gram.y" +#line 280 "gram.y" { list_append(yyvsp[-2].privilege, yyvsp[0].privilege); yyval.privilege = yyvsp[-2].privilege; } break; case 26: -#line 287 "gram.y" +#line 286 "gram.y" { struct privilege *p = ecalloc(1, sizeof(*p)); list2tq(&p->hostlist, yyvsp[-2].member); @@ -1242,51 +1241,51 @@ case 26: } break; case 27: -#line 297 "gram.y" +#line 296 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 28: -#line 301 "gram.y" +#line 300 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 29: -#line 307 "gram.y" +#line 306 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); } break; case 30: -#line 310 "gram.y" +#line 309 "gram.y" { yyval.member = new_member(NULL, ALL); } break; case 31: -#line 313 "gram.y" +#line 312 "gram.y" { yyval.member = new_member(yyvsp[0].string, NETGROUP); } break; case 32: -#line 316 "gram.y" +#line 315 "gram.y" { yyval.member = new_member(yyvsp[0].string, NTWKADDR); } break; case 33: -#line 319 "gram.y" +#line 318 "gram.y" { yyval.member = new_member(yyvsp[0].string, WORD); } break; case 35: -#line 325 "gram.y" +#line 324 "gram.y" { list_append(yyvsp[-2].cmndspec, yyvsp[0].cmndspec); #ifdef HAVE_SELINUX @@ -1326,7 +1325,7 @@ case 35: } break; case 36: -#line 364 "gram.y" +#line 363 "gram.y" { struct cmndspec *cs = ecalloc(1, sizeof(*cs)); if (yyvsp[-4].runas != NULL) { @@ -1357,127 +1356,127 @@ case 36: } break; case 37: -#line 394 "gram.y" +#line 393 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 38: -#line 398 "gram.y" +#line 397 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 39: -#line 404 "gram.y" +#line 403 "gram.y" { yyval.string = yyvsp[0].string; } break; case 40: -#line 409 "gram.y" +#line 408 "gram.y" { yyval.string = yyvsp[0].string; } break; case 41: -#line 414 "gram.y" +#line 413 "gram.y" { yyval.seinfo.role = NULL; yyval.seinfo.type = NULL; } break; case 42: -#line 418 "gram.y" +#line 417 "gram.y" { yyval.seinfo.role = yyvsp[0].string; yyval.seinfo.type = NULL; } break; case 43: -#line 422 "gram.y" +#line 421 "gram.y" { yyval.seinfo.type = yyvsp[0].string; yyval.seinfo.role = NULL; } break; case 44: -#line 426 "gram.y" +#line 425 "gram.y" { yyval.seinfo.role = yyvsp[-1].string; yyval.seinfo.type = yyvsp[0].string; } break; case 45: -#line 430 "gram.y" +#line 429 "gram.y" { yyval.seinfo.type = yyvsp[-1].string; yyval.seinfo.role = yyvsp[0].string; } break; case 46: -#line 436 "gram.y" +#line 435 "gram.y" { yyval.string = yyvsp[0].string; } break; case 47: -#line 440 "gram.y" +#line 439 "gram.y" { yyval.string = yyvsp[0].string; } break; case 48: -#line 445 "gram.y" +#line 444 "gram.y" { yyval.privinfo.privs = NULL; yyval.privinfo.limitprivs = NULL; } break; case 49: -#line 449 "gram.y" +#line 448 "gram.y" { yyval.privinfo.privs = yyvsp[0].string; yyval.privinfo.limitprivs = NULL; } break; case 50: -#line 453 "gram.y" +#line 452 "gram.y" { yyval.privinfo.privs = NULL; yyval.privinfo.limitprivs = yyvsp[0].string; } break; case 51: -#line 457 "gram.y" +#line 456 "gram.y" { yyval.privinfo.privs = yyvsp[-1].string; yyval.privinfo.limitprivs = yyvsp[0].string; } break; case 52: -#line 461 "gram.y" +#line 460 "gram.y" { yyval.privinfo.limitprivs = yyvsp[-1].string; yyval.privinfo.privs = yyvsp[0].string; } break; case 53: -#line 466 "gram.y" +#line 465 "gram.y" { yyval.runas = NULL; } break; case 54: -#line 469 "gram.y" +#line 468 "gram.y" { yyval.runas = yyvsp[-1].runas; } break; case 55: -#line 474 "gram.y" +#line 473 "gram.y" { yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas->runasusers = new_member(NULL, MYSELF); @@ -1485,7 +1484,7 @@ case 55: } break; case 56: -#line 479 "gram.y" +#line 478 "gram.y" { yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas->runasusers = yyvsp[0].member; @@ -1493,7 +1492,7 @@ case 56: } break; case 57: -#line 484 "gram.y" +#line 483 "gram.y" { yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas->runasusers = yyvsp[-2].member; @@ -1501,7 +1500,7 @@ case 57: } break; case 58: -#line 489 "gram.y" +#line 488 "gram.y" { yyval.runas = ecalloc(1, sizeof(struct runascontainer)); /* $$->runasusers = NULL; */ @@ -1509,7 +1508,7 @@ case 58: } break; case 59: -#line 494 "gram.y" +#line 493 "gram.y" { yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas->runasusers = new_member(NULL, MYSELF); @@ -1517,86 +1516,86 @@ case 59: } break; case 60: -#line 501 "gram.y" +#line 500 "gram.y" { yyval.tag.nopasswd = yyval.tag.noexec = yyval.tag.setenv = yyval.tag.log_input = yyval.tag.log_output = UNSPEC; } break; case 61: -#line 505 "gram.y" +#line 504 "gram.y" { yyval.tag.nopasswd = true; } break; case 62: -#line 508 "gram.y" +#line 507 "gram.y" { yyval.tag.nopasswd = false; } break; case 63: -#line 511 "gram.y" +#line 510 "gram.y" { yyval.tag.noexec = true; } break; case 64: -#line 514 "gram.y" +#line 513 "gram.y" { yyval.tag.noexec = false; } break; case 65: -#line 517 "gram.y" +#line 516 "gram.y" { yyval.tag.setenv = true; } break; case 66: -#line 520 "gram.y" +#line 519 "gram.y" { yyval.tag.setenv = false; } break; case 67: -#line 523 "gram.y" +#line 522 "gram.y" { yyval.tag.log_input = true; } break; case 68: -#line 526 "gram.y" +#line 525 "gram.y" { yyval.tag.log_input = false; } break; case 69: -#line 529 "gram.y" +#line 528 "gram.y" { yyval.tag.log_output = true; } break; case 70: -#line 532 "gram.y" +#line 531 "gram.y" { yyval.tag.log_output = false; } break; case 71: -#line 537 "gram.y" +#line 536 "gram.y" { yyval.member = new_member(NULL, ALL); } break; case 72: -#line 540 "gram.y" +#line 539 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); } break; case 73: -#line 543 "gram.y" +#line 542 "gram.y" { struct sudo_command *c = ecalloc(1, sizeof(*c)); c->cmnd = yyvsp[0].command.cmnd; @@ -1605,7 +1604,7 @@ case 73: } break; case 76: -#line 555 "gram.y" +#line 554 "gram.y" { char *s; if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) { @@ -1615,14 +1614,14 @@ case 76: } break; case 78: -#line 565 "gram.y" +#line 564 "gram.y" { list_append(yyvsp[-2].member, yyvsp[0].member); yyval.member = yyvsp[-2].member; } break; case 81: -#line 575 "gram.y" +#line 574 "gram.y" { char *s; if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) { @@ -1632,14 +1631,14 @@ case 81: } break; case 83: -#line 585 "gram.y" +#line 584 "gram.y" { list_append(yyvsp[-2].member, yyvsp[0].member); yyval.member = yyvsp[-2].member; } break; case 86: -#line 595 "gram.y" +#line 594 "gram.y" { char *s; if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) { @@ -1649,7 +1648,7 @@ case 86: } break; case 89: -#line 608 "gram.y" +#line 607 "gram.y" { char *s; if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) { @@ -1659,96 +1658,96 @@ case 89: } break; case 91: -#line 618 "gram.y" +#line 617 "gram.y" { list_append(yyvsp[-2].member, yyvsp[0].member); yyval.member = yyvsp[-2].member; } break; case 92: -#line 624 "gram.y" +#line 623 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 93: -#line 628 "gram.y" +#line 627 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 94: -#line 634 "gram.y" +#line 633 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); } break; case 95: -#line 637 "gram.y" +#line 636 "gram.y" { yyval.member = new_member(NULL, ALL); } break; case 96: -#line 640 "gram.y" +#line 639 "gram.y" { yyval.member = new_member(yyvsp[0].string, NETGROUP); } break; case 97: -#line 643 "gram.y" +#line 642 "gram.y" { yyval.member = new_member(yyvsp[0].string, USERGROUP); } break; case 98: -#line 646 "gram.y" +#line 645 "gram.y" { yyval.member = new_member(yyvsp[0].string, WORD); } break; case 100: -#line 652 "gram.y" +#line 651 "gram.y" { list_append(yyvsp[-2].member, yyvsp[0].member); yyval.member = yyvsp[-2].member; } break; case 101: -#line 658 "gram.y" +#line 657 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = false; } break; case 102: -#line 662 "gram.y" +#line 661 "gram.y" { yyval.member = yyvsp[0].member; yyval.member->negated = true; } break; case 103: -#line 668 "gram.y" +#line 667 "gram.y" { yyval.member = new_member(yyvsp[0].string, ALIAS); } break; case 104: -#line 671 "gram.y" +#line 670 "gram.y" { yyval.member = new_member(NULL, ALL); } break; case 105: -#line 674 "gram.y" +#line 673 "gram.y" { yyval.member = new_member(yyvsp[0].string, WORD); } break; -#line 1699 "gram.c" +#line 1698 "gram.c" } yyssp -= yym; yystate = *yyssp; diff --git a/plugins/sudoers/gram.y b/plugins/sudoers/gram.y index 47e1fc17d..19fb65770 100644 --- a/plugins/sudoers/gram.y +++ b/plugins/sudoers/gram.y @@ -25,7 +25,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/group_plugin.c b/plugins/sudoers/group_plugin.c index 37f36e726..65aaefc70 100644 --- a/plugins/sudoers/group_plugin.c +++ b/plugins/sudoers/group_plugin.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/plugins/sudoers/interfaces.c b/plugins/sudoers/interfaces.c index df390cd81..f6ce5f543 100644 --- a/plugins/sudoers/interfaces.c +++ b/plugins/sudoers/interfaces.c @@ -18,7 +18,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index 88750312a..7036f94da 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/plugins/sudoers/ldap.c b/plugins/sudoers/ldap.c index af3c6a37c..a4935c7b0 100644 --- a/plugins/sudoers/ldap.c +++ b/plugins/sudoers/ldap.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS @@ -48,7 +47,6 @@ #include #include #include -#include #ifdef HAVE_LBER_H # include #endif diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index fc2838035..17237d571 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/plugins/sudoers/match.c b/plugins/sudoers/match.c index 45c4090c9..94367526c 100644 --- a/plugins/sudoers/match.c +++ b/plugins/sudoers/match.c @@ -24,7 +24,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS @@ -56,7 +55,6 @@ #include #include #include -#include #ifdef HAVE_DIRENT_H # include # define NAMLEN(dirent) strlen((dirent)->d_name) diff --git a/plugins/sudoers/match_addr.c b/plugins/sudoers/match_addr.c index b6aea7063..409ab8dd8 100644 --- a/plugins/sudoers/match_addr.c +++ b/plugins/sudoers/match_addr.c @@ -45,7 +45,6 @@ #endif /* HAVE_UNISTD_H */ #include #include -#include #include "sudoers.h" #include "interfaces.h" diff --git a/plugins/sudoers/parse.c b/plugins/sudoers/parse.c index f5addf0a6..d70eec0a8 100644 --- a/plugins/sudoers/parse.c +++ b/plugins/sudoers/parse.c @@ -19,7 +19,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/policy.c b/plugins/sudoers/policy.c index e0cff9f2d..f1af9b30a 100644 --- a/plugins/sudoers/policy.c +++ b/plugins/sudoers/policy.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/prompt.c b/plugins/sudoers/prompt.c index f5c2fdb7f..aadedb7c5 100644 --- a/plugins/sudoers/prompt.c +++ b/plugins/sudoers/prompt.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/pwutil.c b/plugins/sudoers/pwutil.c index 24be29f5d..1c4901d41 100644 --- a/plugins/sudoers/pwutil.c +++ b/plugins/sudoers/pwutil.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/pwutil_impl.c b/plugins/sudoers/pwutil_impl.c index c87b3830c..c929bdc77 100644 --- a/plugins/sudoers/pwutil_impl.c +++ b/plugins/sudoers/pwutil_impl.c @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/redblack.c b/plugins/sudoers/redblack.c index 584f2c0aa..3cbda4c21 100644 --- a/plugins/sudoers/redblack.c +++ b/plugins/sudoers/redblack.c @@ -43,7 +43,6 @@ #include #include -#include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/regress/parser/check_addr.c b/plugins/sudoers/regress/parser/check_addr.c index 8bb1cd806..b607a9bfe 100644 --- a/plugins/sudoers/regress/parser/check_addr.c +++ b/plugins/sudoers/regress/parser/check_addr.c @@ -41,7 +41,6 @@ #include #include -#include #define SUDO_ERROR_WRAP 0 diff --git a/plugins/sudoers/set_perms.c b/plugins/sudoers/set_perms.c index ef44779fb..14958fc1a 100644 --- a/plugins/sudoers/set_perms.c +++ b/plugins/sudoers/set_perms.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/sssd.c b/plugins/sudoers/sssd.c index 95a4776d5..26aaab567 100644 --- a/plugins/sudoers/sssd.c +++ b/plugins/sudoers/sssd.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/sudo_nss.c b/plugins/sudoers/sudo_nss.c index 83a3fe912..e2be3ac43 100644 --- a/plugins/sudoers/sudo_nss.c +++ b/plugins/sudoers/sudo_nss.c @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index f10d4193a..4b6f4681e 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -28,7 +28,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index fa08b4720..bcf5746f1 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -17,7 +17,6 @@ #include #include -#include #include #ifdef HAVE_SYS_SYSMACROS_H # include diff --git a/plugins/sudoers/testsudoers.c b/plugins/sudoers/testsudoers.c index f7678de01..8ac9130d1 100644 --- a/plugins/sudoers/testsudoers.c +++ b/plugins/sudoers/testsudoers.c @@ -25,7 +25,6 @@ #include -#include #include #include #include @@ -59,7 +58,6 @@ #include #include #include -#include #include "tsgetgrpw.h" #include "sudoers.h" diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index cd2c8c6f1..93fd94ee2 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -22,7 +22,6 @@ #include #include -#include #include #include #ifdef __linux__ diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c index 2ca507513..dc60f8ff0 100644 --- a/plugins/sudoers/toke.c +++ b/plugins/sudoers/toke.c @@ -1437,7 +1437,6 @@ char *yytext; #include #include -#include #include #include #ifdef STDC_HEADERS @@ -1528,7 +1527,7 @@ int (*trace_print)(const char *msg) = sudoers_trace_print; #define INSTR 5 -#line 1531 "lex.sudoers.c" +#line 1530 "lex.sudoers.c" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1682,9 +1681,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 133 "toke.l" +#line 132 "toke.l" -#line 1687 "lex.sudoers.c" +#line 1686 "lex.sudoers.c" if ( yy_init ) { @@ -1770,7 +1769,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 134 "toke.l" +#line 133 "toke.l" { LEXTRACE(", "); LEXRETURN(','); @@ -1778,12 +1777,12 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 139 "toke.l" +#line 138 "toke.l" BEGIN STARTDEFS; YY_BREAK case 3: YY_RULE_SETUP -#line 141 "toke.l" +#line 140 "toke.l" { BEGIN INDEFS; LEXTRACE("DEFVAR "); @@ -1795,7 +1794,7 @@ YY_RULE_SETUP case 4: YY_RULE_SETUP -#line 150 "toke.l" +#line 149 "toke.l" { BEGIN STARTDEFS; LEXTRACE(", "); @@ -1804,7 +1803,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 156 "toke.l" +#line 155 "toke.l" { LEXTRACE("= "); LEXRETURN('='); @@ -1812,7 +1811,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 161 "toke.l" +#line 160 "toke.l" { LEXTRACE("+= "); LEXRETURN('+'); @@ -1820,7 +1819,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 166 "toke.l" +#line 165 "toke.l" { LEXTRACE("-= "); LEXRETURN('-'); @@ -1828,7 +1827,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 171 "toke.l" +#line 170 "toke.l" { LEXTRACE("BEGINSTR "); sudoerslval.string = NULL; @@ -1838,7 +1837,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 178 "toke.l" +#line 177 "toke.l" { LEXTRACE("WORD(2) "); if (!fill(sudoerstext, sudoersleng)) @@ -1850,7 +1849,7 @@ YY_RULE_SETUP case 10: YY_RULE_SETUP -#line 187 "toke.l" +#line 186 "toke.l" { /* Line continuation char followed by newline. */ sudolineno++; @@ -1859,7 +1858,7 @@ YY_RULE_SETUP YY_BREAK case 11: YY_RULE_SETUP -#line 193 "toke.l" +#line 192 "toke.l" { LEXTRACE("ENDSTR "); BEGIN prev_state; @@ -1894,7 +1893,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 225 "toke.l" +#line 224 "toke.l" { LEXTRACE("BACKSLASH "); if (!append(sudoerstext, sudoersleng)) @@ -1903,7 +1902,7 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 231 "toke.l" +#line 230 "toke.l" { LEXTRACE("STRBODY "); if (!append(sudoerstext, sudoersleng)) @@ -1914,7 +1913,7 @@ YY_RULE_SETUP case 14: YY_RULE_SETUP -#line 239 "toke.l" +#line 238 "toke.l" { /* quoted fnmatch glob char, pass verbatim */ LEXTRACE("QUOTEDCHAR "); @@ -1925,7 +1924,7 @@ YY_RULE_SETUP YY_BREAK case 15: YY_RULE_SETUP -#line 247 "toke.l" +#line 246 "toke.l" { /* quoted sudoers special char, strip backslash */ LEXTRACE("QUOTEDCHAR "); @@ -1936,7 +1935,7 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 255 "toke.l" +#line 254 "toke.l" { BEGIN INITIAL; yyless(0); @@ -1945,7 +1944,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 261 "toke.l" +#line 260 "toke.l" { LEXTRACE("ARG "); if (!fill_args(sudoerstext, sudoersleng, sawspace)) @@ -1956,7 +1955,7 @@ YY_RULE_SETUP case 18: YY_RULE_SETUP -#line 269 "toke.l" +#line 268 "toke.l" { char *path; @@ -1977,7 +1976,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 287 "toke.l" +#line 286 "toke.l" { char *path; @@ -2001,7 +2000,7 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 308 "toke.l" +#line 307 "toke.l" { char deftype; int n; @@ -2044,7 +2043,7 @@ YY_RULE_SETUP YY_BREAK case 21: YY_RULE_SETUP -#line 348 "toke.l" +#line 347 "toke.l" { int n; @@ -2073,7 +2072,7 @@ YY_RULE_SETUP YY_BREAK case 22: YY_RULE_SETUP -#line 374 "toke.l" +#line 373 "toke.l" { /* cmnd does not require passwd for this user */ LEXTRACE("NOPASSWD "); @@ -2082,7 +2081,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 380 "toke.l" +#line 379 "toke.l" { /* cmnd requires passwd for this user */ LEXTRACE("PASSWD "); @@ -2091,7 +2090,7 @@ YY_RULE_SETUP YY_BREAK case 24: YY_RULE_SETUP -#line 386 "toke.l" +#line 385 "toke.l" { LEXTRACE("NOEXEC "); LEXRETURN(NOEXEC); @@ -2099,7 +2098,7 @@ YY_RULE_SETUP YY_BREAK case 25: YY_RULE_SETUP -#line 391 "toke.l" +#line 390 "toke.l" { LEXTRACE("EXEC "); LEXRETURN(EXEC); @@ -2107,7 +2106,7 @@ YY_RULE_SETUP YY_BREAK case 26: YY_RULE_SETUP -#line 396 "toke.l" +#line 395 "toke.l" { LEXTRACE("SETENV "); LEXRETURN(SETENV); @@ -2115,7 +2114,7 @@ YY_RULE_SETUP YY_BREAK case 27: YY_RULE_SETUP -#line 401 "toke.l" +#line 400 "toke.l" { LEXTRACE("NOSETENV "); LEXRETURN(NOSETENV); @@ -2123,7 +2122,7 @@ YY_RULE_SETUP YY_BREAK case 28: YY_RULE_SETUP -#line 406 "toke.l" +#line 405 "toke.l" { LEXTRACE("LOG_OUTPUT "); LEXRETURN(LOG_OUTPUT); @@ -2131,7 +2130,7 @@ YY_RULE_SETUP YY_BREAK case 29: YY_RULE_SETUP -#line 411 "toke.l" +#line 410 "toke.l" { LEXTRACE("NOLOG_OUTPUT "); LEXRETURN(NOLOG_OUTPUT); @@ -2139,7 +2138,7 @@ YY_RULE_SETUP YY_BREAK case 30: YY_RULE_SETUP -#line 416 "toke.l" +#line 415 "toke.l" { LEXTRACE("LOG_INPUT "); LEXRETURN(LOG_INPUT); @@ -2147,7 +2146,7 @@ YY_RULE_SETUP YY_BREAK case 31: YY_RULE_SETUP -#line 421 "toke.l" +#line 420 "toke.l" { LEXTRACE("NOLOG_INPUT "); LEXRETURN(NOLOG_INPUT); @@ -2155,7 +2154,7 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 426 "toke.l" +#line 425 "toke.l" { /* empty group or netgroup */ LEXTRACE("ERROR "); @@ -2164,7 +2163,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 432 "toke.l" +#line 431 "toke.l" { /* netgroup */ if (!fill(sudoerstext, sudoersleng)) @@ -2175,7 +2174,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 440 "toke.l" +#line 439 "toke.l" { /* group */ if (!fill(sudoerstext, sudoersleng)) @@ -2186,7 +2185,7 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 448 "toke.l" +#line 447 "toke.l" { if (!fill(sudoerstext, sudoersleng)) yyterminate(); @@ -2196,7 +2195,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 455 "toke.l" +#line 454 "toke.l" { if (!fill(sudoerstext, sudoersleng)) yyterminate(); @@ -2206,7 +2205,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 462 "toke.l" +#line 461 "toke.l" { if (!ipv6_valid(sudoerstext)) { LEXTRACE("ERROR "); @@ -2220,7 +2219,7 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 473 "toke.l" +#line 472 "toke.l" { if (!ipv6_valid(sudoerstext)) { LEXTRACE("ERROR "); @@ -2234,7 +2233,7 @@ YY_RULE_SETUP YY_BREAK case 39: YY_RULE_SETUP -#line 484 "toke.l" +#line 483 "toke.l" { LEXTRACE("ALL "); LEXRETURN(ALL); @@ -2243,7 +2242,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 490 "toke.l" +#line 489 "toke.l" { #ifdef HAVE_SELINUX LEXTRACE("ROLE "); @@ -2255,7 +2254,7 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 499 "toke.l" +#line 498 "toke.l" { #ifdef HAVE_SELINUX LEXTRACE("TYPE "); @@ -2267,7 +2266,7 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 507 "toke.l" +#line 506 "toke.l" { #ifdef HAVE_PRIV_SET LEXTRACE("PRIVS "); @@ -2279,7 +2278,7 @@ YY_RULE_SETUP YY_BREAK case 43: YY_RULE_SETUP -#line 516 "toke.l" +#line 515 "toke.l" { #ifdef HAVE_PRIV_SET LEXTRACE("LIMITPRIVS "); @@ -2291,7 +2290,7 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 525 "toke.l" +#line 524 "toke.l" { got_alias: if (!fill(sudoerstext, sudoersleng)) @@ -2302,7 +2301,7 @@ YY_RULE_SETUP YY_BREAK case 45: YY_RULE_SETUP -#line 533 "toke.l" +#line 532 "toke.l" { /* no command args allowed for Defaults!/path */ if (!fill_cmnd(sudoerstext, sudoersleng)) @@ -2313,7 +2312,7 @@ YY_RULE_SETUP YY_BREAK case 46: YY_RULE_SETUP -#line 541 "toke.l" +#line 540 "toke.l" { BEGIN GOTCMND; LEXTRACE("COMMAND "); @@ -2323,7 +2322,7 @@ YY_RULE_SETUP YY_BREAK case 47: YY_RULE_SETUP -#line 548 "toke.l" +#line 547 "toke.l" { /* directories can't have args... */ if (sudoerstext[sudoersleng - 1] == '/') { @@ -2341,7 +2340,7 @@ YY_RULE_SETUP YY_BREAK case 48: YY_RULE_SETUP -#line 563 "toke.l" +#line 562 "toke.l" { LEXTRACE("BEGINSTR "); sudoerslval.string = NULL; @@ -2351,7 +2350,7 @@ YY_RULE_SETUP YY_BREAK case 49: YY_RULE_SETUP -#line 570 "toke.l" +#line 569 "toke.l" { /* a word */ if (!fill(sudoerstext, sudoersleng)) @@ -2362,7 +2361,7 @@ YY_RULE_SETUP YY_BREAK case 50: YY_RULE_SETUP -#line 578 "toke.l" +#line 577 "toke.l" { LEXTRACE("( "); LEXRETURN('('); @@ -2370,7 +2369,7 @@ YY_RULE_SETUP YY_BREAK case 51: YY_RULE_SETUP -#line 583 "toke.l" +#line 582 "toke.l" { LEXTRACE(") "); LEXRETURN(')'); @@ -2378,7 +2377,7 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 588 "toke.l" +#line 587 "toke.l" { LEXTRACE(", "); LEXRETURN(','); @@ -2386,7 +2385,7 @@ YY_RULE_SETUP YY_BREAK case 53: YY_RULE_SETUP -#line 593 "toke.l" +#line 592 "toke.l" { LEXTRACE("= "); LEXRETURN('='); @@ -2394,7 +2393,7 @@ YY_RULE_SETUP YY_BREAK case 54: YY_RULE_SETUP -#line 598 "toke.l" +#line 597 "toke.l" { LEXTRACE(": "); LEXRETURN(':'); @@ -2402,7 +2401,7 @@ YY_RULE_SETUP YY_BREAK case 55: YY_RULE_SETUP -#line 603 "toke.l" +#line 602 "toke.l" { if (sudoersleng & 1) { LEXTRACE("!"); @@ -2412,7 +2411,7 @@ YY_RULE_SETUP YY_BREAK case 56: YY_RULE_SETUP -#line 610 "toke.l" +#line 609 "toke.l" { if (YY_START == INSTR) { LEXTRACE("ERROR "); @@ -2427,14 +2426,14 @@ YY_RULE_SETUP YY_BREAK case 57: YY_RULE_SETUP -#line 622 "toke.l" +#line 621 "toke.l" { /* throw away space/tabs */ sawspace = true; /* but remember for fill_args */ } YY_BREAK case 58: YY_RULE_SETUP -#line 626 "toke.l" +#line 625 "toke.l" { sawspace = true; /* remember for fill_args */ sudolineno++; @@ -2443,7 +2442,7 @@ YY_RULE_SETUP YY_BREAK case 59: YY_RULE_SETUP -#line 632 "toke.l" +#line 631 "toke.l" { BEGIN INITIAL; sudolineno++; @@ -2454,7 +2453,7 @@ YY_RULE_SETUP YY_BREAK case 60: YY_RULE_SETUP -#line 640 "toke.l" +#line 639 "toke.l" { LEXTRACE("ERROR "); LEXRETURN(ERROR); @@ -2466,7 +2465,7 @@ case YY_STATE_EOF(GOTCMND): case YY_STATE_EOF(STARTDEFS): case YY_STATE_EOF(INDEFS): case YY_STATE_EOF(INSTR): -#line 645 "toke.l" +#line 644 "toke.l" { if (YY_START != INITIAL) { BEGIN INITIAL; @@ -2479,10 +2478,10 @@ case YY_STATE_EOF(INSTR): YY_BREAK case 61: YY_RULE_SETUP -#line 655 "toke.l" +#line 654 "toke.l" ECHO; YY_BREAK -#line 2485 "lex.sudoers.c" +#line 2484 "lex.sudoers.c" case YY_END_OF_BUFFER: { @@ -3373,7 +3372,7 @@ int main() return 0; } #endif -#line 655 "toke.l" +#line 654 "toke.l" struct path_list { char *path; diff --git a/plugins/sudoers/toke.l b/plugins/sudoers/toke.l index 893dee41b..6a9bae471 100644 --- a/plugins/sudoers/toke.l +++ b/plugins/sudoers/toke.l @@ -26,7 +26,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/plugins/sudoers/toke_util.c b/plugins/sudoers/toke_util.c index c25f556d5..e717e946f 100644 --- a/plugins/sudoers/toke_util.c +++ b/plugins/sudoers/toke_util.c @@ -25,7 +25,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/tsgetgrpw.c b/plugins/sudoers/tsgetgrpw.c index 4fd933602..5b44aceb9 100644 --- a/plugins/sudoers/tsgetgrpw.c +++ b/plugins/sudoers/tsgetgrpw.c @@ -24,7 +24,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index f9f92bc3a..34abec88f 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -68,7 +67,6 @@ #include #include #include -#include #if TIME_WITH_SYS_TIME # include #endif diff --git a/plugins/system_group/system_group.c b/plugins/system_group/system_group.c index b015d39f1..d6567dbd3 100644 --- a/plugins/system_group/system_group.c +++ b/plugins/system_group/system_group.c @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/src/conversation.c b/src/conversation.c index aea675d10..512260945 100644 --- a/src/conversation.c +++ b/src/conversation.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/src/exec.c b/src/exec.c index 5c149c8b1..b49b836e3 100644 --- a/src/exec.c +++ b/src/exec.c @@ -17,7 +17,6 @@ #include #include -#include #ifdef HAVE_SYS_SYSMACROS_H # include #endif diff --git a/src/exec_common.c b/src/exec_common.c index 426fba0c0..045c702de 100644 --- a/src/exec_common.c +++ b/src/exec_common.c @@ -17,7 +17,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/src/exec_pty.c b/src/exec_pty.c index 98fb55778..403928360 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -17,7 +17,6 @@ #include #include -#include #ifdef HAVE_SYS_SYSMACROS_H # include #endif diff --git a/src/get_pty.c b/src/get_pty.c index 21449cb91..f6a1fab16 100644 --- a/src/get_pty.c +++ b/src/get_pty.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #ifdef HAVE_SYS_STROPTS_H diff --git a/src/load_plugins.c b/src/load_plugins.c index 893bd2f70..2efe1e63d 100644 --- a/src/load_plugins.c +++ b/src/load_plugins.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #ifdef STDC_HEADERS diff --git a/src/net_ifs.c b/src/net_ifs.c index fa8b67604..82fc3629f 100644 --- a/src/net_ifs.c +++ b/src/net_ifs.c @@ -32,7 +32,6 @@ struct rtentry; #include #include -#include #include #include #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF) diff --git a/src/parse_args.c b/src/parse_args.c index 652850983..35e87a814 100644 --- a/src/parse_args.c +++ b/src/parse_args.c @@ -21,7 +21,6 @@ #include #include -#include #include #ifdef STDC_HEADERS diff --git a/src/sudo.c b/src/sudo.c index 1e28e870e..d90ea1854 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/src/sudo_edit.c b/src/sudo_edit.c index f7df6e812..0c9d1b12b 100644 --- a/src/sudo_edit.c +++ b/src/sudo_edit.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/src/tgetpass.c b/src/tgetpass.c index b23db4cc5..489c66b78 100644 --- a/src/tgetpass.c +++ b/src/tgetpass.c @@ -26,7 +26,6 @@ #include #include -#include #include #ifdef STDC_HEADERS # include diff --git a/src/ttyname.c b/src/ttyname.c index 821dc2366..9176cbb76 100644 --- a/src/ttyname.c +++ b/src/ttyname.c @@ -23,7 +23,6 @@ #endif #include -#include #include #if defined(MAJOR_IN_MKDEV) # include @@ -71,8 +70,10 @@ # endif #endif #if defined(HAVE_STRUCT_KINFO_PROC_P_TDEV) || defined (HAVE_STRUCT_KINFO_PROC_KP_EPROC_E_TDEV) || defined(HAVE_STRUCT_KINFO_PROC2_P_TDEV) +# include # include #elif defined(HAVE_STRUCT_KINFO_PROC_KI_TDEV) +# include # include # include #endif diff --git a/src/utmp.c b/src/utmp.c index 97a1ea659..613e78c2f 100644 --- a/src/utmp.c +++ b/src/utmp.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include