X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=plugins%2Fsudoers%2Fregress%2Fparser%2Fcheck_fill.c;h=5fc96d7264dc86fe70ba51991a788d9f24497dc7;hb=e8db7f6eea9b35527ddd4532affabd18a30549b5;hp=e0f39214f869687d4ffc935cb7c751d7856a8e81;hpb=98b9fd63cd28a3636a7cd24641b8f497eaadcd50;p=debian%2Fsudo diff --git a/plugins/sudoers/regress/parser/check_fill.c b/plugins/sudoers/regress/parser/check_fill.c index e0f3921..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 @@ -42,19 +42,20 @@ #define SUDO_ERROR_WRAP 0 +#include "missing.h" #include "list.h" #include "parse.h" #include "toke.h" #include "sudo_plugin.h" #include +__dso_public int main(int argc, char *argv[]); + /* * TODO: test realloc */ -sudo_conv_t sudo_conv; /* NULL in non-plugin */ - -YYSTYPE yylval; +YYSTYPE sudoerslval; struct fill_test { const char *input; @@ -106,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 @@ -115,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 @@ -124,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 @@ -184,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; }