while (top) {
if (host_matches == TRUE)
if (cmnd_matches == TRUE)
- if ((runas_matches == TRUE) ||
- (runas_matches != FALSE && !strcmp(runas_user, "root")))
+ if (runas_matches == TRUE)
/*
* User was granted access to cmnd on host.
* If no passwd required return as such.
| opcmndlist ',' opcmnd
;
-opcmnd : cmnd { ; }
+opcmnd : cmnd { runas_matches = TRUE; }
| '!' {
if (printmatches == TRUE && host_matches == TRUE
&& user_matches == TRUE) {
runasspec : RUNAS runaslist chkcmnd {
if ($2 > 0 && $3 == TRUE)
runas_matches = TRUE;
- else
- runas_matches = FALSE;
}
runaslist : runasuser {