Don't include <sys/param.h>. 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.
This commit is contained in:
Todd C. Miller
2012-12-04 10:40:47 -05:00
parent 3c9da162e4
commit 1d7072fe09
81 changed files with 170 additions and 258 deletions

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#ifdef HAVE_FLOCK #ifdef HAVE_FLOCK
# include <sys/file.h> # include <sys/file.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -19,7 +19,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -18,7 +18,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
# include <string.h> # include <string.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -18,7 +18,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -29,7 +29,7 @@
#include <config.h> #include <config.h>
#include <sys/param.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>

View File

@@ -52,7 +52,7 @@
#include <config.h> #include <config.h>
#include <sys/param.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -42,7 +42,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -82,26 +82,18 @@
#endif #endif
#ifndef PATH_MAX #ifndef PATH_MAX
# ifdef MAXPATHLEN # ifdef _POSIX_PATH_MAX
# define PATH_MAX MAXPATHLEN # define PATH_MAX _POSIX_PATH_MAX
# else # else
# ifdef _POSIX_PATH_MAX # define PATH_MAX 256
# define PATH_MAX _POSIX_PATH_MAX
# else
# define PATH_MAX 1024
# endif
# endif # endif
#endif #endif
#ifndef HOST_NAME_MAX #ifndef HOST_NAME_MAX
# ifdef MAXHOSTNAMELEN # ifdef _POSIX_HOST_NAME_MAX
# define HOST_NAME_MAX MAXHOSTNAMELEN # define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
# else # else
# ifdef _POSIX_HOST_NAME_MAX # define HOST_NAME_MAX 255
# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
# else
# define HOST_NAME_MAX 64
# endif
# endif # endif
#endif #endif
@@ -148,7 +140,7 @@
#endif #endif
/* /*
* BSD defines these in <sys/param.h> but others may not. * BSD defines these in <sys/param.h> but we don't include that anymore.
*/ */
#ifndef MIN #ifndef MIN
# define MIN(a,b) (((a)<(b))?(a):(b)) # define MIN(a,b) (((a)<(b))?(a):(b))

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h> #include <sys/wait.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -15,7 +15,6 @@
*/ */
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -20,7 +20,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -36,7 +36,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -25,7 +25,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -26,7 +26,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -24,7 +24,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -16,7 +16,6 @@
#include <config.h> #include <config.h>
#include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -23,7 +23,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -23,7 +23,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H #ifdef HAVE_STRING_H
# include <string.h> # include <string.h>

View File

@@ -63,7 +63,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>
@@ -161,7 +160,7 @@ sudoerserror(const char *s)
parse_error = true; parse_error = true;
debug_return; debug_return;
} }
#line 128 "gram.y" #line 127 "gram.y"
#ifndef YYSTYPE_DEFINED #ifndef YYSTYPE_DEFINED
#define YYSTYPE_DEFINED #define YYSTYPE_DEFINED
typedef union { typedef union {
@@ -178,7 +177,7 @@ typedef union {
int tok; int tok;
} YYSTYPE; } YYSTYPE;
#endif /* YYSTYPE_DEFINED */ #endif /* YYSTYPE_DEFINED */
#line 181 "gram.c" #line 180 "gram.c"
#define COMMAND 257 #define COMMAND 257
#define ALIAS 258 #define ALIAS 258
#define DEFVAR 259 #define DEFVAR 259
@@ -705,7 +704,7 @@ short *yyss;
short *yysslim; short *yysslim;
YYSTYPE *yyvs; YYSTYPE *yyvs;
int yystacksize; int yystacksize;
#line 680 "gram.y" #line 679 "gram.y"
static struct defaults * static struct defaults *
new_default(char *var, char *val, int op) new_default(char *var, char *val, int op)
{ {
@@ -908,7 +907,7 @@ init_parser(const char *path, bool quiet)
debug_return; debug_return;
} }
#line 859 "gram.c" #line 858 "gram.c"
/* allocate initial stack or double stack size, up to YYMAXDEPTH */ /* allocate initial stack or double stack size, up to YYMAXDEPTH */
#if defined(__cplusplus) || defined(__STDC__) #if defined(__cplusplus) || defined(__STDC__)
static int yygrowstack(void) static int yygrowstack(void)
@@ -1111,127 +1110,127 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 1: case 1:
#line 210 "gram.y" #line 209 "gram.y"
{ ; } { ; }
break; break;
case 5: case 5:
#line 218 "gram.y" #line 217 "gram.y"
{ {
; ;
} }
break; break;
case 6: case 6:
#line 221 "gram.y" #line 220 "gram.y"
{ {
yyerrok; yyerrok;
} }
break; break;
case 7: case 7:
#line 224 "gram.y" #line 223 "gram.y"
{ {
add_userspec(yyvsp[-1].member, yyvsp[0].privilege); add_userspec(yyvsp[-1].member, yyvsp[0].privilege);
} }
break; break;
case 8: case 8:
#line 227 "gram.y" #line 226 "gram.y"
{ {
; ;
} }
break; break;
case 9: case 9:
#line 230 "gram.y" #line 229 "gram.y"
{ {
; ;
} }
break; break;
case 10: case 10:
#line 233 "gram.y" #line 232 "gram.y"
{ {
; ;
} }
break; break;
case 11: case 11:
#line 236 "gram.y" #line 235 "gram.y"
{ {
; ;
} }
break; break;
case 12: case 12:
#line 239 "gram.y" #line 238 "gram.y"
{ {
add_defaults(DEFAULTS, NULL, yyvsp[0].defaults); add_defaults(DEFAULTS, NULL, yyvsp[0].defaults);
} }
break; break;
case 13: case 13:
#line 242 "gram.y" #line 241 "gram.y"
{ {
add_defaults(DEFAULTS_USER, yyvsp[-1].member, yyvsp[0].defaults); add_defaults(DEFAULTS_USER, yyvsp[-1].member, yyvsp[0].defaults);
} }
break; break;
case 14: case 14:
#line 245 "gram.y" #line 244 "gram.y"
{ {
add_defaults(DEFAULTS_RUNAS, yyvsp[-1].member, yyvsp[0].defaults); add_defaults(DEFAULTS_RUNAS, yyvsp[-1].member, yyvsp[0].defaults);
} }
break; break;
case 15: case 15:
#line 248 "gram.y" #line 247 "gram.y"
{ {
add_defaults(DEFAULTS_HOST, yyvsp[-1].member, yyvsp[0].defaults); add_defaults(DEFAULTS_HOST, yyvsp[-1].member, yyvsp[0].defaults);
} }
break; break;
case 16: case 16:
#line 251 "gram.y" #line 250 "gram.y"
{ {
add_defaults(DEFAULTS_CMND, yyvsp[-1].member, yyvsp[0].defaults); add_defaults(DEFAULTS_CMND, yyvsp[-1].member, yyvsp[0].defaults);
} }
break; break;
case 18: case 18:
#line 257 "gram.y" #line 256 "gram.y"
{ {
list_append(yyvsp[-2].defaults, yyvsp[0].defaults); list_append(yyvsp[-2].defaults, yyvsp[0].defaults);
yyval.defaults = yyvsp[-2].defaults; yyval.defaults = yyvsp[-2].defaults;
} }
break; break;
case 19: case 19:
#line 263 "gram.y" #line 262 "gram.y"
{ {
yyval.defaults = new_default(yyvsp[0].string, NULL, true); yyval.defaults = new_default(yyvsp[0].string, NULL, true);
} }
break; break;
case 20: case 20:
#line 266 "gram.y" #line 265 "gram.y"
{ {
yyval.defaults = new_default(yyvsp[0].string, NULL, false); yyval.defaults = new_default(yyvsp[0].string, NULL, false);
} }
break; break;
case 21: case 21:
#line 269 "gram.y" #line 268 "gram.y"
{ {
yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, true); yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, true);
} }
break; break;
case 22: case 22:
#line 272 "gram.y" #line 271 "gram.y"
{ {
yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '+'); yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '+');
} }
break; break;
case 23: case 23:
#line 275 "gram.y" #line 274 "gram.y"
{ {
yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '-'); yyval.defaults = new_default(yyvsp[-2].string, yyvsp[0].string, '-');
} }
break; break;
case 25: case 25:
#line 281 "gram.y" #line 280 "gram.y"
{ {
list_append(yyvsp[-2].privilege, yyvsp[0].privilege); list_append(yyvsp[-2].privilege, yyvsp[0].privilege);
yyval.privilege = yyvsp[-2].privilege; yyval.privilege = yyvsp[-2].privilege;
} }
break; break;
case 26: case 26:
#line 287 "gram.y" #line 286 "gram.y"
{ {
struct privilege *p = ecalloc(1, sizeof(*p)); struct privilege *p = ecalloc(1, sizeof(*p));
list2tq(&p->hostlist, yyvsp[-2].member); list2tq(&p->hostlist, yyvsp[-2].member);
@@ -1242,51 +1241,51 @@ case 26:
} }
break; break;
case 27: case 27:
#line 297 "gram.y" #line 296 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = false; yyval.member->negated = false;
} }
break; break;
case 28: case 28:
#line 301 "gram.y" #line 300 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = true; yyval.member->negated = true;
} }
break; break;
case 29: case 29:
#line 307 "gram.y" #line 306 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, ALIAS); yyval.member = new_member(yyvsp[0].string, ALIAS);
} }
break; break;
case 30: case 30:
#line 310 "gram.y" #line 309 "gram.y"
{ {
yyval.member = new_member(NULL, ALL); yyval.member = new_member(NULL, ALL);
} }
break; break;
case 31: case 31:
#line 313 "gram.y" #line 312 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, NETGROUP); yyval.member = new_member(yyvsp[0].string, NETGROUP);
} }
break; break;
case 32: case 32:
#line 316 "gram.y" #line 315 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, NTWKADDR); yyval.member = new_member(yyvsp[0].string, NTWKADDR);
} }
break; break;
case 33: case 33:
#line 319 "gram.y" #line 318 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, WORD); yyval.member = new_member(yyvsp[0].string, WORD);
} }
break; break;
case 35: case 35:
#line 325 "gram.y" #line 324 "gram.y"
{ {
list_append(yyvsp[-2].cmndspec, yyvsp[0].cmndspec); list_append(yyvsp[-2].cmndspec, yyvsp[0].cmndspec);
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
@@ -1326,7 +1325,7 @@ case 35:
} }
break; break;
case 36: case 36:
#line 364 "gram.y" #line 363 "gram.y"
{ {
struct cmndspec *cs = ecalloc(1, sizeof(*cs)); struct cmndspec *cs = ecalloc(1, sizeof(*cs));
if (yyvsp[-4].runas != NULL) { if (yyvsp[-4].runas != NULL) {
@@ -1357,127 +1356,127 @@ case 36:
} }
break; break;
case 37: case 37:
#line 394 "gram.y" #line 393 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = false; yyval.member->negated = false;
} }
break; break;
case 38: case 38:
#line 398 "gram.y" #line 397 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = true; yyval.member->negated = true;
} }
break; break;
case 39: case 39:
#line 404 "gram.y" #line 403 "gram.y"
{ {
yyval.string = yyvsp[0].string; yyval.string = yyvsp[0].string;
} }
break; break;
case 40: case 40:
#line 409 "gram.y" #line 408 "gram.y"
{ {
yyval.string = yyvsp[0].string; yyval.string = yyvsp[0].string;
} }
break; break;
case 41: case 41:
#line 414 "gram.y" #line 413 "gram.y"
{ {
yyval.seinfo.role = NULL; yyval.seinfo.role = NULL;
yyval.seinfo.type = NULL; yyval.seinfo.type = NULL;
} }
break; break;
case 42: case 42:
#line 418 "gram.y" #line 417 "gram.y"
{ {
yyval.seinfo.role = yyvsp[0].string; yyval.seinfo.role = yyvsp[0].string;
yyval.seinfo.type = NULL; yyval.seinfo.type = NULL;
} }
break; break;
case 43: case 43:
#line 422 "gram.y" #line 421 "gram.y"
{ {
yyval.seinfo.type = yyvsp[0].string; yyval.seinfo.type = yyvsp[0].string;
yyval.seinfo.role = NULL; yyval.seinfo.role = NULL;
} }
break; break;
case 44: case 44:
#line 426 "gram.y" #line 425 "gram.y"
{ {
yyval.seinfo.role = yyvsp[-1].string; yyval.seinfo.role = yyvsp[-1].string;
yyval.seinfo.type = yyvsp[0].string; yyval.seinfo.type = yyvsp[0].string;
} }
break; break;
case 45: case 45:
#line 430 "gram.y" #line 429 "gram.y"
{ {
yyval.seinfo.type = yyvsp[-1].string; yyval.seinfo.type = yyvsp[-1].string;
yyval.seinfo.role = yyvsp[0].string; yyval.seinfo.role = yyvsp[0].string;
} }
break; break;
case 46: case 46:
#line 436 "gram.y" #line 435 "gram.y"
{ {
yyval.string = yyvsp[0].string; yyval.string = yyvsp[0].string;
} }
break; break;
case 47: case 47:
#line 440 "gram.y" #line 439 "gram.y"
{ {
yyval.string = yyvsp[0].string; yyval.string = yyvsp[0].string;
} }
break; break;
case 48: case 48:
#line 445 "gram.y" #line 444 "gram.y"
{ {
yyval.privinfo.privs = NULL; yyval.privinfo.privs = NULL;
yyval.privinfo.limitprivs = NULL; yyval.privinfo.limitprivs = NULL;
} }
break; break;
case 49: case 49:
#line 449 "gram.y" #line 448 "gram.y"
{ {
yyval.privinfo.privs = yyvsp[0].string; yyval.privinfo.privs = yyvsp[0].string;
yyval.privinfo.limitprivs = NULL; yyval.privinfo.limitprivs = NULL;
} }
break; break;
case 50: case 50:
#line 453 "gram.y" #line 452 "gram.y"
{ {
yyval.privinfo.privs = NULL; yyval.privinfo.privs = NULL;
yyval.privinfo.limitprivs = yyvsp[0].string; yyval.privinfo.limitprivs = yyvsp[0].string;
} }
break; break;
case 51: case 51:
#line 457 "gram.y" #line 456 "gram.y"
{ {
yyval.privinfo.privs = yyvsp[-1].string; yyval.privinfo.privs = yyvsp[-1].string;
yyval.privinfo.limitprivs = yyvsp[0].string; yyval.privinfo.limitprivs = yyvsp[0].string;
} }
break; break;
case 52: case 52:
#line 461 "gram.y" #line 460 "gram.y"
{ {
yyval.privinfo.limitprivs = yyvsp[-1].string; yyval.privinfo.limitprivs = yyvsp[-1].string;
yyval.privinfo.privs = yyvsp[0].string; yyval.privinfo.privs = yyvsp[0].string;
} }
break; break;
case 53: case 53:
#line 466 "gram.y" #line 465 "gram.y"
{ {
yyval.runas = NULL; yyval.runas = NULL;
} }
break; break;
case 54: case 54:
#line 469 "gram.y" #line 468 "gram.y"
{ {
yyval.runas = yyvsp[-1].runas; yyval.runas = yyvsp[-1].runas;
} }
break; break;
case 55: case 55:
#line 474 "gram.y" #line 473 "gram.y"
{ {
yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas = ecalloc(1, sizeof(struct runascontainer));
yyval.runas->runasusers = new_member(NULL, MYSELF); yyval.runas->runasusers = new_member(NULL, MYSELF);
@@ -1485,7 +1484,7 @@ case 55:
} }
break; break;
case 56: case 56:
#line 479 "gram.y" #line 478 "gram.y"
{ {
yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas = ecalloc(1, sizeof(struct runascontainer));
yyval.runas->runasusers = yyvsp[0].member; yyval.runas->runasusers = yyvsp[0].member;
@@ -1493,7 +1492,7 @@ case 56:
} }
break; break;
case 57: case 57:
#line 484 "gram.y" #line 483 "gram.y"
{ {
yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas = ecalloc(1, sizeof(struct runascontainer));
yyval.runas->runasusers = yyvsp[-2].member; yyval.runas->runasusers = yyvsp[-2].member;
@@ -1501,7 +1500,7 @@ case 57:
} }
break; break;
case 58: case 58:
#line 489 "gram.y" #line 488 "gram.y"
{ {
yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas = ecalloc(1, sizeof(struct runascontainer));
/* $$->runasusers = NULL; */ /* $$->runasusers = NULL; */
@@ -1509,7 +1508,7 @@ case 58:
} }
break; break;
case 59: case 59:
#line 494 "gram.y" #line 493 "gram.y"
{ {
yyval.runas = ecalloc(1, sizeof(struct runascontainer)); yyval.runas = ecalloc(1, sizeof(struct runascontainer));
yyval.runas->runasusers = new_member(NULL, MYSELF); yyval.runas->runasusers = new_member(NULL, MYSELF);
@@ -1517,86 +1516,86 @@ case 59:
} }
break; break;
case 60: case 60:
#line 501 "gram.y" #line 500 "gram.y"
{ {
yyval.tag.nopasswd = yyval.tag.noexec = yyval.tag.setenv = yyval.tag.nopasswd = yyval.tag.noexec = yyval.tag.setenv =
yyval.tag.log_input = yyval.tag.log_output = UNSPEC; yyval.tag.log_input = yyval.tag.log_output = UNSPEC;
} }
break; break;
case 61: case 61:
#line 505 "gram.y" #line 504 "gram.y"
{ {
yyval.tag.nopasswd = true; yyval.tag.nopasswd = true;
} }
break; break;
case 62: case 62:
#line 508 "gram.y" #line 507 "gram.y"
{ {
yyval.tag.nopasswd = false; yyval.tag.nopasswd = false;
} }
break; break;
case 63: case 63:
#line 511 "gram.y" #line 510 "gram.y"
{ {
yyval.tag.noexec = true; yyval.tag.noexec = true;
} }
break; break;
case 64: case 64:
#line 514 "gram.y" #line 513 "gram.y"
{ {
yyval.tag.noexec = false; yyval.tag.noexec = false;
} }
break; break;
case 65: case 65:
#line 517 "gram.y" #line 516 "gram.y"
{ {
yyval.tag.setenv = true; yyval.tag.setenv = true;
} }
break; break;
case 66: case 66:
#line 520 "gram.y" #line 519 "gram.y"
{ {
yyval.tag.setenv = false; yyval.tag.setenv = false;
} }
break; break;
case 67: case 67:
#line 523 "gram.y" #line 522 "gram.y"
{ {
yyval.tag.log_input = true; yyval.tag.log_input = true;
} }
break; break;
case 68: case 68:
#line 526 "gram.y" #line 525 "gram.y"
{ {
yyval.tag.log_input = false; yyval.tag.log_input = false;
} }
break; break;
case 69: case 69:
#line 529 "gram.y" #line 528 "gram.y"
{ {
yyval.tag.log_output = true; yyval.tag.log_output = true;
} }
break; break;
case 70: case 70:
#line 532 "gram.y" #line 531 "gram.y"
{ {
yyval.tag.log_output = false; yyval.tag.log_output = false;
} }
break; break;
case 71: case 71:
#line 537 "gram.y" #line 536 "gram.y"
{ {
yyval.member = new_member(NULL, ALL); yyval.member = new_member(NULL, ALL);
} }
break; break;
case 72: case 72:
#line 540 "gram.y" #line 539 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, ALIAS); yyval.member = new_member(yyvsp[0].string, ALIAS);
} }
break; break;
case 73: case 73:
#line 543 "gram.y" #line 542 "gram.y"
{ {
struct sudo_command *c = ecalloc(1, sizeof(*c)); struct sudo_command *c = ecalloc(1, sizeof(*c));
c->cmnd = yyvsp[0].command.cmnd; c->cmnd = yyvsp[0].command.cmnd;
@@ -1605,7 +1604,7 @@ case 73:
} }
break; break;
case 76: case 76:
#line 555 "gram.y" #line 554 "gram.y"
{ {
char *s; char *s;
if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) { if ((s = alias_add(yyvsp[-2].string, HOSTALIAS, yyvsp[0].member)) != NULL) {
@@ -1615,14 +1614,14 @@ case 76:
} }
break; break;
case 78: case 78:
#line 565 "gram.y" #line 564 "gram.y"
{ {
list_append(yyvsp[-2].member, yyvsp[0].member); list_append(yyvsp[-2].member, yyvsp[0].member);
yyval.member = yyvsp[-2].member; yyval.member = yyvsp[-2].member;
} }
break; break;
case 81: case 81:
#line 575 "gram.y" #line 574 "gram.y"
{ {
char *s; char *s;
if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) { if ((s = alias_add(yyvsp[-2].string, CMNDALIAS, yyvsp[0].member)) != NULL) {
@@ -1632,14 +1631,14 @@ case 81:
} }
break; break;
case 83: case 83:
#line 585 "gram.y" #line 584 "gram.y"
{ {
list_append(yyvsp[-2].member, yyvsp[0].member); list_append(yyvsp[-2].member, yyvsp[0].member);
yyval.member = yyvsp[-2].member; yyval.member = yyvsp[-2].member;
} }
break; break;
case 86: case 86:
#line 595 "gram.y" #line 594 "gram.y"
{ {
char *s; char *s;
if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) { if ((s = alias_add(yyvsp[-2].string, RUNASALIAS, yyvsp[0].member)) != NULL) {
@@ -1649,7 +1648,7 @@ case 86:
} }
break; break;
case 89: case 89:
#line 608 "gram.y" #line 607 "gram.y"
{ {
char *s; char *s;
if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) { if ((s = alias_add(yyvsp[-2].string, USERALIAS, yyvsp[0].member)) != NULL) {
@@ -1659,96 +1658,96 @@ case 89:
} }
break; break;
case 91: case 91:
#line 618 "gram.y" #line 617 "gram.y"
{ {
list_append(yyvsp[-2].member, yyvsp[0].member); list_append(yyvsp[-2].member, yyvsp[0].member);
yyval.member = yyvsp[-2].member; yyval.member = yyvsp[-2].member;
} }
break; break;
case 92: case 92:
#line 624 "gram.y" #line 623 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = false; yyval.member->negated = false;
} }
break; break;
case 93: case 93:
#line 628 "gram.y" #line 627 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = true; yyval.member->negated = true;
} }
break; break;
case 94: case 94:
#line 634 "gram.y" #line 633 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, ALIAS); yyval.member = new_member(yyvsp[0].string, ALIAS);
} }
break; break;
case 95: case 95:
#line 637 "gram.y" #line 636 "gram.y"
{ {
yyval.member = new_member(NULL, ALL); yyval.member = new_member(NULL, ALL);
} }
break; break;
case 96: case 96:
#line 640 "gram.y" #line 639 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, NETGROUP); yyval.member = new_member(yyvsp[0].string, NETGROUP);
} }
break; break;
case 97: case 97:
#line 643 "gram.y" #line 642 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, USERGROUP); yyval.member = new_member(yyvsp[0].string, USERGROUP);
} }
break; break;
case 98: case 98:
#line 646 "gram.y" #line 645 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, WORD); yyval.member = new_member(yyvsp[0].string, WORD);
} }
break; break;
case 100: case 100:
#line 652 "gram.y" #line 651 "gram.y"
{ {
list_append(yyvsp[-2].member, yyvsp[0].member); list_append(yyvsp[-2].member, yyvsp[0].member);
yyval.member = yyvsp[-2].member; yyval.member = yyvsp[-2].member;
} }
break; break;
case 101: case 101:
#line 658 "gram.y" #line 657 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = false; yyval.member->negated = false;
} }
break; break;
case 102: case 102:
#line 662 "gram.y" #line 661 "gram.y"
{ {
yyval.member = yyvsp[0].member; yyval.member = yyvsp[0].member;
yyval.member->negated = true; yyval.member->negated = true;
} }
break; break;
case 103: case 103:
#line 668 "gram.y" #line 667 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, ALIAS); yyval.member = new_member(yyvsp[0].string, ALIAS);
} }
break; break;
case 104: case 104:
#line 671 "gram.y" #line 670 "gram.y"
{ {
yyval.member = new_member(NULL, ALL); yyval.member = new_member(NULL, ALL);
} }
break; break;
case 105: case 105:
#line 674 "gram.y" #line 673 "gram.y"
{ {
yyval.member = new_member(yyvsp[0].string, WORD); yyval.member = new_member(yyvsp[0].string, WORD);
} }
break; break;
#line 1699 "gram.c" #line 1698 "gram.c"
} }
yyssp -= yym; yyssp -= yym;
yystate = *yyssp; yystate = *yyssp;

View File

@@ -25,7 +25,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -18,7 +18,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -20,7 +20,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
@@ -48,7 +47,6 @@
#include <grp.h> #include <grp.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h>
#ifdef HAVE_LBER_H #ifdef HAVE_LBER_H
# include <lber.h> # include <lber.h>
#endif #endif

View File

@@ -25,7 +25,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/wait.h> #include <sys/wait.h>

View File

@@ -24,7 +24,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
@@ -56,7 +55,6 @@
#include <ctype.h> #include <ctype.h>
#include <pwd.h> #include <pwd.h>
#include <grp.h> #include <grp.h>
#include <netdb.h>
#ifdef HAVE_DIRENT_H #ifdef HAVE_DIRENT_H
# include <dirent.h> # include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name) # define NAMLEN(dirent) strlen((dirent)->d_name)

View File

@@ -45,7 +45,6 @@
#endif /* HAVE_UNISTD_H */ #endif /* HAVE_UNISTD_H */
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h>
#include "sudoers.h" #include "sudoers.h"
#include "interfaces.h" #include "interfaces.h"

View File

@@ -19,7 +19,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -43,7 +43,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -41,7 +41,6 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h>
#define SUDO_ERROR_WRAP 0 #define SUDO_ERROR_WRAP 0

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -21,7 +21,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -28,7 +28,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/uio.h> #include <sys/uio.h>
#ifdef HAVE_SYS_SYSMACROS_H #ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> # include <sys/sysmacros.h>

View File

@@ -25,7 +25,6 @@
#include <config.h> #include <config.h>
#include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/socket.h> #include <sys/socket.h>
@@ -59,7 +58,6 @@
#include <errno.h> #include <errno.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h>
#include "tsgetgrpw.h" #include "tsgetgrpw.h"
#include "sudoers.h" #include "sudoers.h"

View File

@@ -22,7 +22,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef __linux__ #ifdef __linux__

View File

@@ -1437,7 +1437,6 @@ char *yytext;
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
@@ -1528,7 +1527,7 @@ int (*trace_print)(const char *msg) = sudoers_trace_print;
#define INSTR 5 #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 /* Macros after this point can all be overridden by user definitions in
* section 1. * section 1.
@@ -1682,9 +1681,9 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; 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 ) if ( yy_init )
{ {
@@ -1770,7 +1769,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 134 "toke.l" #line 133 "toke.l"
{ {
LEXTRACE(", "); LEXTRACE(", ");
LEXRETURN(','); LEXRETURN(',');
@@ -1778,12 +1777,12 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 139 "toke.l" #line 138 "toke.l"
BEGIN STARTDEFS; BEGIN STARTDEFS;
YY_BREAK YY_BREAK
case 3: case 3:
YY_RULE_SETUP YY_RULE_SETUP
#line 141 "toke.l" #line 140 "toke.l"
{ {
BEGIN INDEFS; BEGIN INDEFS;
LEXTRACE("DEFVAR "); LEXTRACE("DEFVAR ");
@@ -1795,7 +1794,7 @@ YY_RULE_SETUP
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 150 "toke.l" #line 149 "toke.l"
{ {
BEGIN STARTDEFS; BEGIN STARTDEFS;
LEXTRACE(", "); LEXTRACE(", ");
@@ -1804,7 +1803,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 5: case 5:
YY_RULE_SETUP YY_RULE_SETUP
#line 156 "toke.l" #line 155 "toke.l"
{ {
LEXTRACE("= "); LEXTRACE("= ");
LEXRETURN('='); LEXRETURN('=');
@@ -1812,7 +1811,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 6: case 6:
YY_RULE_SETUP YY_RULE_SETUP
#line 161 "toke.l" #line 160 "toke.l"
{ {
LEXTRACE("+= "); LEXTRACE("+= ");
LEXRETURN('+'); LEXRETURN('+');
@@ -1820,7 +1819,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 7: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 166 "toke.l" #line 165 "toke.l"
{ {
LEXTRACE("-= "); LEXTRACE("-= ");
LEXRETURN('-'); LEXRETURN('-');
@@ -1828,7 +1827,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 8: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 171 "toke.l" #line 170 "toke.l"
{ {
LEXTRACE("BEGINSTR "); LEXTRACE("BEGINSTR ");
sudoerslval.string = NULL; sudoerslval.string = NULL;
@@ -1838,7 +1837,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 9: case 9:
YY_RULE_SETUP YY_RULE_SETUP
#line 178 "toke.l" #line 177 "toke.l"
{ {
LEXTRACE("WORD(2) "); LEXTRACE("WORD(2) ");
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
@@ -1850,7 +1849,7 @@ YY_RULE_SETUP
case 10: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 187 "toke.l" #line 186 "toke.l"
{ {
/* Line continuation char followed by newline. */ /* Line continuation char followed by newline. */
sudolineno++; sudolineno++;
@@ -1859,7 +1858,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 11: case 11:
YY_RULE_SETUP YY_RULE_SETUP
#line 193 "toke.l" #line 192 "toke.l"
{ {
LEXTRACE("ENDSTR "); LEXTRACE("ENDSTR ");
BEGIN prev_state; BEGIN prev_state;
@@ -1894,7 +1893,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 12: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 225 "toke.l" #line 224 "toke.l"
{ {
LEXTRACE("BACKSLASH "); LEXTRACE("BACKSLASH ");
if (!append(sudoerstext, sudoersleng)) if (!append(sudoerstext, sudoersleng))
@@ -1903,7 +1902,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 13: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 231 "toke.l" #line 230 "toke.l"
{ {
LEXTRACE("STRBODY "); LEXTRACE("STRBODY ");
if (!append(sudoerstext, sudoersleng)) if (!append(sudoerstext, sudoersleng))
@@ -1914,7 +1913,7 @@ YY_RULE_SETUP
case 14: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 239 "toke.l" #line 238 "toke.l"
{ {
/* quoted fnmatch glob char, pass verbatim */ /* quoted fnmatch glob char, pass verbatim */
LEXTRACE("QUOTEDCHAR "); LEXTRACE("QUOTEDCHAR ");
@@ -1925,7 +1924,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 15: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 247 "toke.l" #line 246 "toke.l"
{ {
/* quoted sudoers special char, strip backslash */ /* quoted sudoers special char, strip backslash */
LEXTRACE("QUOTEDCHAR "); LEXTRACE("QUOTEDCHAR ");
@@ -1936,7 +1935,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 16: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 255 "toke.l" #line 254 "toke.l"
{ {
BEGIN INITIAL; BEGIN INITIAL;
yyless(0); yyless(0);
@@ -1945,7 +1944,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 17: case 17:
YY_RULE_SETUP YY_RULE_SETUP
#line 261 "toke.l" #line 260 "toke.l"
{ {
LEXTRACE("ARG "); LEXTRACE("ARG ");
if (!fill_args(sudoerstext, sudoersleng, sawspace)) if (!fill_args(sudoerstext, sudoersleng, sawspace))
@@ -1956,7 +1955,7 @@ YY_RULE_SETUP
case 18: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 269 "toke.l" #line 268 "toke.l"
{ {
char *path; char *path;
@@ -1977,7 +1976,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 19: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 287 "toke.l" #line 286 "toke.l"
{ {
char *path; char *path;
@@ -2001,7 +2000,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 20: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 308 "toke.l" #line 307 "toke.l"
{ {
char deftype; char deftype;
int n; int n;
@@ -2044,7 +2043,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 21: case 21:
YY_RULE_SETUP YY_RULE_SETUP
#line 348 "toke.l" #line 347 "toke.l"
{ {
int n; int n;
@@ -2073,7 +2072,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 22: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 374 "toke.l" #line 373 "toke.l"
{ {
/* cmnd does not require passwd for this user */ /* cmnd does not require passwd for this user */
LEXTRACE("NOPASSWD "); LEXTRACE("NOPASSWD ");
@@ -2082,7 +2081,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 23: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 380 "toke.l" #line 379 "toke.l"
{ {
/* cmnd requires passwd for this user */ /* cmnd requires passwd for this user */
LEXTRACE("PASSWD "); LEXTRACE("PASSWD ");
@@ -2091,7 +2090,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 24: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 386 "toke.l" #line 385 "toke.l"
{ {
LEXTRACE("NOEXEC "); LEXTRACE("NOEXEC ");
LEXRETURN(NOEXEC); LEXRETURN(NOEXEC);
@@ -2099,7 +2098,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 25: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 391 "toke.l" #line 390 "toke.l"
{ {
LEXTRACE("EXEC "); LEXTRACE("EXEC ");
LEXRETURN(EXEC); LEXRETURN(EXEC);
@@ -2107,7 +2106,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 26: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 396 "toke.l" #line 395 "toke.l"
{ {
LEXTRACE("SETENV "); LEXTRACE("SETENV ");
LEXRETURN(SETENV); LEXRETURN(SETENV);
@@ -2115,7 +2114,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 27: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 401 "toke.l" #line 400 "toke.l"
{ {
LEXTRACE("NOSETENV "); LEXTRACE("NOSETENV ");
LEXRETURN(NOSETENV); LEXRETURN(NOSETENV);
@@ -2123,7 +2122,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 28: case 28:
YY_RULE_SETUP YY_RULE_SETUP
#line 406 "toke.l" #line 405 "toke.l"
{ {
LEXTRACE("LOG_OUTPUT "); LEXTRACE("LOG_OUTPUT ");
LEXRETURN(LOG_OUTPUT); LEXRETURN(LOG_OUTPUT);
@@ -2131,7 +2130,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 29: case 29:
YY_RULE_SETUP YY_RULE_SETUP
#line 411 "toke.l" #line 410 "toke.l"
{ {
LEXTRACE("NOLOG_OUTPUT "); LEXTRACE("NOLOG_OUTPUT ");
LEXRETURN(NOLOG_OUTPUT); LEXRETURN(NOLOG_OUTPUT);
@@ -2139,7 +2138,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 30: case 30:
YY_RULE_SETUP YY_RULE_SETUP
#line 416 "toke.l" #line 415 "toke.l"
{ {
LEXTRACE("LOG_INPUT "); LEXTRACE("LOG_INPUT ");
LEXRETURN(LOG_INPUT); LEXRETURN(LOG_INPUT);
@@ -2147,7 +2146,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 31: case 31:
YY_RULE_SETUP YY_RULE_SETUP
#line 421 "toke.l" #line 420 "toke.l"
{ {
LEXTRACE("NOLOG_INPUT "); LEXTRACE("NOLOG_INPUT ");
LEXRETURN(NOLOG_INPUT); LEXRETURN(NOLOG_INPUT);
@@ -2155,7 +2154,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 32: case 32:
YY_RULE_SETUP YY_RULE_SETUP
#line 426 "toke.l" #line 425 "toke.l"
{ {
/* empty group or netgroup */ /* empty group or netgroup */
LEXTRACE("ERROR "); LEXTRACE("ERROR ");
@@ -2164,7 +2163,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 33: case 33:
YY_RULE_SETUP YY_RULE_SETUP
#line 432 "toke.l" #line 431 "toke.l"
{ {
/* netgroup */ /* netgroup */
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
@@ -2175,7 +2174,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 34: case 34:
YY_RULE_SETUP YY_RULE_SETUP
#line 440 "toke.l" #line 439 "toke.l"
{ {
/* group */ /* group */
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
@@ -2186,7 +2185,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 35: case 35:
YY_RULE_SETUP YY_RULE_SETUP
#line 448 "toke.l" #line 447 "toke.l"
{ {
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
yyterminate(); yyterminate();
@@ -2196,7 +2195,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 36: case 36:
YY_RULE_SETUP YY_RULE_SETUP
#line 455 "toke.l" #line 454 "toke.l"
{ {
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
yyterminate(); yyterminate();
@@ -2206,7 +2205,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 37: case 37:
YY_RULE_SETUP YY_RULE_SETUP
#line 462 "toke.l" #line 461 "toke.l"
{ {
if (!ipv6_valid(sudoerstext)) { if (!ipv6_valid(sudoerstext)) {
LEXTRACE("ERROR "); LEXTRACE("ERROR ");
@@ -2220,7 +2219,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 38: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 473 "toke.l" #line 472 "toke.l"
{ {
if (!ipv6_valid(sudoerstext)) { if (!ipv6_valid(sudoerstext)) {
LEXTRACE("ERROR "); LEXTRACE("ERROR ");
@@ -2234,7 +2233,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 39: case 39:
YY_RULE_SETUP YY_RULE_SETUP
#line 484 "toke.l" #line 483 "toke.l"
{ {
LEXTRACE("ALL "); LEXTRACE("ALL ");
LEXRETURN(ALL); LEXRETURN(ALL);
@@ -2243,7 +2242,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 40: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 490 "toke.l" #line 489 "toke.l"
{ {
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
LEXTRACE("ROLE "); LEXTRACE("ROLE ");
@@ -2255,7 +2254,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 41: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 499 "toke.l" #line 498 "toke.l"
{ {
#ifdef HAVE_SELINUX #ifdef HAVE_SELINUX
LEXTRACE("TYPE "); LEXTRACE("TYPE ");
@@ -2267,7 +2266,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 42: case 42:
YY_RULE_SETUP YY_RULE_SETUP
#line 507 "toke.l" #line 506 "toke.l"
{ {
#ifdef HAVE_PRIV_SET #ifdef HAVE_PRIV_SET
LEXTRACE("PRIVS "); LEXTRACE("PRIVS ");
@@ -2279,7 +2278,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 43: case 43:
YY_RULE_SETUP YY_RULE_SETUP
#line 516 "toke.l" #line 515 "toke.l"
{ {
#ifdef HAVE_PRIV_SET #ifdef HAVE_PRIV_SET
LEXTRACE("LIMITPRIVS "); LEXTRACE("LIMITPRIVS ");
@@ -2291,7 +2290,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 44: case 44:
YY_RULE_SETUP YY_RULE_SETUP
#line 525 "toke.l" #line 524 "toke.l"
{ {
got_alias: got_alias:
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
@@ -2302,7 +2301,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 45: case 45:
YY_RULE_SETUP YY_RULE_SETUP
#line 533 "toke.l" #line 532 "toke.l"
{ {
/* no command args allowed for Defaults!/path */ /* no command args allowed for Defaults!/path */
if (!fill_cmnd(sudoerstext, sudoersleng)) if (!fill_cmnd(sudoerstext, sudoersleng))
@@ -2313,7 +2312,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 46: case 46:
YY_RULE_SETUP YY_RULE_SETUP
#line 541 "toke.l" #line 540 "toke.l"
{ {
BEGIN GOTCMND; BEGIN GOTCMND;
LEXTRACE("COMMAND "); LEXTRACE("COMMAND ");
@@ -2323,7 +2322,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 47: case 47:
YY_RULE_SETUP YY_RULE_SETUP
#line 548 "toke.l" #line 547 "toke.l"
{ {
/* directories can't have args... */ /* directories can't have args... */
if (sudoerstext[sudoersleng - 1] == '/') { if (sudoerstext[sudoersleng - 1] == '/') {
@@ -2341,7 +2340,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 48: case 48:
YY_RULE_SETUP YY_RULE_SETUP
#line 563 "toke.l" #line 562 "toke.l"
{ {
LEXTRACE("BEGINSTR "); LEXTRACE("BEGINSTR ");
sudoerslval.string = NULL; sudoerslval.string = NULL;
@@ -2351,7 +2350,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 49: case 49:
YY_RULE_SETUP YY_RULE_SETUP
#line 570 "toke.l" #line 569 "toke.l"
{ {
/* a word */ /* a word */
if (!fill(sudoerstext, sudoersleng)) if (!fill(sudoerstext, sudoersleng))
@@ -2362,7 +2361,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 50: case 50:
YY_RULE_SETUP YY_RULE_SETUP
#line 578 "toke.l" #line 577 "toke.l"
{ {
LEXTRACE("( "); LEXTRACE("( ");
LEXRETURN('('); LEXRETURN('(');
@@ -2370,7 +2369,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 51: case 51:
YY_RULE_SETUP YY_RULE_SETUP
#line 583 "toke.l" #line 582 "toke.l"
{ {
LEXTRACE(") "); LEXTRACE(") ");
LEXRETURN(')'); LEXRETURN(')');
@@ -2378,7 +2377,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 52: case 52:
YY_RULE_SETUP YY_RULE_SETUP
#line 588 "toke.l" #line 587 "toke.l"
{ {
LEXTRACE(", "); LEXTRACE(", ");
LEXRETURN(','); LEXRETURN(',');
@@ -2386,7 +2385,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 53: case 53:
YY_RULE_SETUP YY_RULE_SETUP
#line 593 "toke.l" #line 592 "toke.l"
{ {
LEXTRACE("= "); LEXTRACE("= ");
LEXRETURN('='); LEXRETURN('=');
@@ -2394,7 +2393,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 54: case 54:
YY_RULE_SETUP YY_RULE_SETUP
#line 598 "toke.l" #line 597 "toke.l"
{ {
LEXTRACE(": "); LEXTRACE(": ");
LEXRETURN(':'); LEXRETURN(':');
@@ -2402,7 +2401,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 55: case 55:
YY_RULE_SETUP YY_RULE_SETUP
#line 603 "toke.l" #line 602 "toke.l"
{ {
if (sudoersleng & 1) { if (sudoersleng & 1) {
LEXTRACE("!"); LEXTRACE("!");
@@ -2412,7 +2411,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 56: case 56:
YY_RULE_SETUP YY_RULE_SETUP
#line 610 "toke.l" #line 609 "toke.l"
{ {
if (YY_START == INSTR) { if (YY_START == INSTR) {
LEXTRACE("ERROR "); LEXTRACE("ERROR ");
@@ -2427,14 +2426,14 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 57: case 57:
YY_RULE_SETUP YY_RULE_SETUP
#line 622 "toke.l" #line 621 "toke.l"
{ /* throw away space/tabs */ { /* throw away space/tabs */
sawspace = true; /* but remember for fill_args */ sawspace = true; /* but remember for fill_args */
} }
YY_BREAK YY_BREAK
case 58: case 58:
YY_RULE_SETUP YY_RULE_SETUP
#line 626 "toke.l" #line 625 "toke.l"
{ {
sawspace = true; /* remember for fill_args */ sawspace = true; /* remember for fill_args */
sudolineno++; sudolineno++;
@@ -2443,7 +2442,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 59: case 59:
YY_RULE_SETUP YY_RULE_SETUP
#line 632 "toke.l" #line 631 "toke.l"
{ {
BEGIN INITIAL; BEGIN INITIAL;
sudolineno++; sudolineno++;
@@ -2454,7 +2453,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 60: case 60:
YY_RULE_SETUP YY_RULE_SETUP
#line 640 "toke.l" #line 639 "toke.l"
{ {
LEXTRACE("ERROR "); LEXTRACE("ERROR ");
LEXRETURN(ERROR); LEXRETURN(ERROR);
@@ -2466,7 +2465,7 @@ case YY_STATE_EOF(GOTCMND):
case YY_STATE_EOF(STARTDEFS): case YY_STATE_EOF(STARTDEFS):
case YY_STATE_EOF(INDEFS): case YY_STATE_EOF(INDEFS):
case YY_STATE_EOF(INSTR): case YY_STATE_EOF(INSTR):
#line 645 "toke.l" #line 644 "toke.l"
{ {
if (YY_START != INITIAL) { if (YY_START != INITIAL) {
BEGIN INITIAL; BEGIN INITIAL;
@@ -2479,10 +2478,10 @@ case YY_STATE_EOF(INSTR):
YY_BREAK YY_BREAK
case 61: case 61:
YY_RULE_SETUP YY_RULE_SETUP
#line 655 "toke.l" #line 654 "toke.l"
ECHO; ECHO;
YY_BREAK YY_BREAK
#line 2485 "lex.sudoers.c" #line 2484 "lex.sudoers.c"
case YY_END_OF_BUFFER: case YY_END_OF_BUFFER:
{ {
@@ -3373,7 +3372,7 @@ int main()
return 0; return 0;
} }
#endif #endif
#line 655 "toke.l" #line 654 "toke.l"
struct path_list { struct path_list {
char *path; char *path;

View File

@@ -26,7 +26,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -25,7 +25,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -24,7 +24,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -32,7 +32,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/time.h> #include <sys/time.h>
@@ -68,7 +67,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <netdb.h>
#if TIME_WITH_SYS_TIME #if TIME_WITH_SYS_TIME
# include <time.h> # include <time.h>
#endif #endif

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#ifdef HAVE_SYS_SYSMACROS_H #ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> # include <sys/sysmacros.h>
#endif #endif

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#ifdef HAVE_SYS_SYSMACROS_H #ifdef HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> # include <sys/sysmacros.h>
#endif #endif

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef HAVE_SYS_STROPTS_H #ifdef HAVE_SYS_STROPTS_H

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -32,7 +32,6 @@ struct rtentry;
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF) #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF)

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS

View File

@@ -21,7 +21,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/socket.h> #include <sys/socket.h>

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/wait.h> #include <sys/wait.h>

View File

@@ -26,7 +26,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <stdio.h> #include <stdio.h>
#ifdef STDC_HEADERS #ifdef STDC_HEADERS
# include <stdlib.h> # include <stdlib.h>

View File

@@ -23,7 +23,6 @@
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#if defined(MAJOR_IN_MKDEV) #if defined(MAJOR_IN_MKDEV)
# include <sys/mkdev.h> # include <sys/mkdev.h>
@@ -71,8 +70,10 @@
# endif # endif
#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) #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 <sys/param.h>
# include <sys/sysctl.h> # include <sys/sysctl.h>
#elif defined(HAVE_STRUCT_KINFO_PROC_KI_TDEV) #elif defined(HAVE_STRUCT_KINFO_PROC_KI_TDEV)
# include <sys/param.h>
# include <sys/sysctl.h> # include <sys/sysctl.h>
# include <sys/user.h> # include <sys/user.h>
#endif #endif

View File

@@ -17,7 +17,6 @@
#include <config.h> #include <config.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <stdio.h> #include <stdio.h>