%}
+NUMBER [0-9]+
VALUE \".*\"
MALSTRING \"[^\"\n]*\n
WHITE [\t ]*
%% /* BEGIN RULES SECTION */
+{NUMBER} { yylval.i = atoi(yytext); }
{VALUE} {
yytext[yyleng - 1] = '\0'; /* Kill the trailing quote */
yytext++; /* Kill the leading quote */
switch ($1)
{
case TYPE_SUID:
- if (getpwuid($3) != NULL)
+ if (!myconfig->shed_user && getpwuid($3) != NULL)
myconfig->shed_uid = $3;
else
fprintf(stderr, "%s: no such uid %lu\n", config, $3);
break;
case TYPE_SGID:
- if (getgrgid($3) != NULL)
+ if (!myconfig->shed_group && getgrgid($3) != NULL)
myconfig->shed_gid = $3;
else
fprintf(stderr, "%s: no such gid %lu\n", config, $3);