X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=plugins%2Fsudoers%2Fregress%2Fparser%2Fcheck_fill.c;h=5fc96d7264dc86fe70ba51991a788d9f24497dc7;hb=e8db7f6eea9b35527ddd4532affabd18a30549b5;hp=599a202e21c1070d4f9a980e5b7437e09d08ffab;hpb=7a01b10fee894dea7ecb3252886912eab41e9693;p=debian%2Fsudo diff --git a/plugins/sudoers/regress/parser/check_fill.c b/plugins/sudoers/regress/parser/check_fill.c index 599a202..5fc96d7 100644 --- a/plugins/sudoers/regress/parser/check_fill.c +++ b/plugins/sudoers/regress/parser/check_fill.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 Todd C. Miller + * Copyright (c) 2011-2013 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,6 +26,11 @@ # include # endif #endif /* STDC_HEADERS */ +#ifdef HAVE_STDBOOL_H +# include +#else +# include "compat/stdbool.h" +#endif /* HAVE_STDBOOL_H */ #ifdef HAVE_STRING_H # include #endif /* HAVE_STRING_H */ @@ -35,16 +40,22 @@ #include #include +#define SUDO_ERROR_WRAP 0 + +#include "missing.h" #include "list.h" #include "parse.h" #include "toke.h" -#include "gram.h" +#include "sudo_plugin.h" +#include + +__dso_public int main(int argc, char *argv[]); /* * TODO: test realloc */ -YYSTYPE yylval; +YYSTYPE sudoerslval; struct fill_test { const char *input; @@ -96,8 +107,8 @@ check_fill(const char *input, int len, int addspace, const char *expect, char ** { if (!fill(input, len)) return -1; - *resultp = yylval.string; - return !strcmp(yylval.string, expect); + *resultp = sudoerslval.string; + return !strcmp(sudoerslval.string, expect); } static int @@ -105,8 +116,8 @@ check_fill_cmnd(const char *input, int len, int addspace, const char *expect, ch { if (!fill_cmnd(input, len)) return -1; - *resultp = yylval.command.cmnd; - return !strcmp(yylval.command.cmnd, expect); + *resultp = sudoerslval.command.cmnd; + return !strcmp(sudoerslval.command.cmnd, expect); } static int @@ -114,8 +125,8 @@ check_fill_args(const char *input, int len, int addspace, const char *expect, ch { if (!fill_args(input, len, addspace)) return -1; - *resultp = yylval.command.args; - return !strcmp(yylval.command.args, expect); + *resultp = sudoerslval.command.args; + return !strcmp(sudoerslval.command.args, expect); } static int @@ -174,14 +185,7 @@ main(int argc, char *argv[]) /* STUB */ void -cleanup(int gotsig) -{ - return; -} - -/* STUB */ -void -yyerror(const char *s) +sudoerserror(const char *s) { return; }