version 1.1.1.2, 2012/05/29 12:26:49
|
version 1.1.1.3, 2012/10/09 09:29:52
|
Line 94 static bool _push_include(char *, bool);
|
Line 94 static bool _push_include(char *, bool);
|
static bool pop_include(void); |
static bool pop_include(void); |
static char *parse_include(char *); |
static char *parse_include(char *); |
|
|
static int sudoers_trace_print(const char *msg); |
|
int (*trace_print)(const char *msg) = sudoers_trace_print; |
int (*trace_print)(const char *msg) = sudoers_trace_print; |
|
|
#define LEXRETURN(n) do { \ |
#define LEXRETURN(n) do { \ |
Line 504 ALL {
|
Line 503 ALL {
|
goto got_alias; |
goto got_alias; |
#endif |
#endif |
} |
} |
|
<INITIAL>PRIVS { |
|
#ifdef HAVE_PRIV_SET |
|
LEXTRACE("PRIVS "); |
|
LEXRETURN(PRIVS); |
|
#else |
|
goto got_alias; |
|
#endif |
|
} |
|
|
|
<INITIAL>LIMITPRIVS { |
|
#ifdef HAVE_PRIV_SET |
|
LEXTRACE("LIMITPRIVS "); |
|
LEXRETURN(LIMITPRIVS); |
|
#else |
|
goto got_alias; |
|
#endif |
|
} |
|
|
[[:upper:]][[:upper:][:digit:]_]* { |
[[:upper:]][[:upper:][:digit:]_]* { |
#ifndef HAVE_SELINUX |
|
got_alias: |
got_alias: |
#endif |
|
if (!fill(yytext, yyleng)) |
if (!fill(yytext, yyleng)) |
yyterminate(); |
yyterminate(); |
LEXTRACE("ALIAS "); |
LEXTRACE("ALIAS "); |
Line 864 _push_include(char *path, bool isdir)
|
Line 878 _push_include(char *path, bool isdir)
|
} |
} |
} else { |
} else { |
if ((fp = open_sudoers(path, true, &keepopen)) == NULL) { |
if ((fp = open_sudoers(path, true, &keepopen)) == NULL) { |
char *errbuf; | /* The error was already printed by open_sudoers() */ |
if (asprintf(&errbuf, _("%s: %s"), path, strerror(errno)) != -1) { | yyerror(NULL); |
yyerror(errbuf); | |
free(errbuf); | |
} else { | |
yyerror(_("unable to allocate memory")); | |
} | |
debug_return_bool(false); |
debug_return_bool(false); |
} |
} |
istack[idepth].more = NULL; |
istack[idepth].more = NULL; |
Line 997 parse_include(char *base)
|
Line 1006 parse_include(char *base)
|
} |
} |
|
|
#ifdef TRACELEXER |
#ifdef TRACELEXER |
static int | int |
sudoers_trace_print(const char *msg) |
sudoers_trace_print(const char *msg) |
{ |
{ |
return fputs(msg, stderr); |
return fputs(msg, stderr); |
} |
} |
#else |
#else |
static int | int |
sudoers_trace_print(const char *msg) |
sudoers_trace_print(const char *msg) |
{ |
{ |
static bool initialized; |
static bool initialized; |