version 1.11, 2004/09/28 15:10:51 |
version 1.12, 2007/07/26 16:10:16 |
|
|
%{ |
%{ |
/* |
/* |
* Copyright (c) 1996, 1998-2004 Todd C. Miller <Todd.Miller@courtesan.com> |
* Copyright (c) 1996, 1998-2004, 2007 |
|
* Todd C. Miller <Todd.Miller@courtesan.com> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
|
|
* Materiel Command, USAF, under agreement number F39502-99-1-0512. |
* Materiel Command, USAF, under agreement number F39502-99-1-0512. |
*/ |
*/ |
|
|
#include "config.h" |
#include <config.h> |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/param.h> |
#include <sys/param.h> |
|
|
#include <sudo.tab.h> |
#include <sudo.tab.h> |
|
|
#ifndef lint |
#ifndef lint |
static const char rcsid[] = "$Sudo: parse.lex,v 1.132 2004/05/17 20:51:13 millert Exp $"; |
__unused static const char rcsid[] = "$Sudo: parse.lex,v 1.132.2.3 2007/06/23 21:36:48 millert Exp $"; |
#endif /* lint */ |
#endif /* lint */ |
|
|
#undef yywrap /* guard against a yywrap macro */ |
#undef yywrap /* guard against a yywrap macro */ |
|
|
return(EXEC); |
return(EXEC); |
} |
} |
|
|
|
SETENV[[:blank:]]*: { |
|
LEXTRACE("SETENV "); |
|
return(SETENV); |
|
} |
|
|
|
NOSETENV[[:blank:]]*: { |
|
LEXTRACE("NOSETENV "); |
|
return(NOSETENV); |
|
} |
|
|
\+{WORD} { |
\+{WORD} { |
/* netgroup */ |
/* netgroup */ |
fill(yytext, yyleng); |
fill(yytext, yyleng); |
|
|
(char *) realloc(yylval.command.args, arg_size) : |
(char *) realloc(yylval.command.args, arg_size) : |
(char *) malloc(arg_size); |
(char *) malloc(arg_size); |
if (p == NULL) { |
if (p == NULL) { |
if (yylval.command.args != NULL) |
efree(yylval.command.args); |
free(yylval.command.args); |
|
yyerror("unable to allocate memory"); |
yyerror("unable to allocate memory"); |
return; |
return; |
} else |
} else |