struct sudo_nss *nss;
{
if (def_ignore_local_sudoers)
- return(-1);
+ return -1;
nss->handle = open_sudoers(_PATH_SUDOERS, FALSE, NULL);
- return(nss->handle ? 0 : -1);
+ return nss->handle ? 0 : -1;
}
int
nss->handle = NULL;
yyin = NULL;
}
- return(0);
+ return 0;
}
/*
struct sudo_nss *nss;
{
if (nss->handle == NULL)
- return(-1);
+ return -1;
init_parser(_PATH_SUDOERS, 0);
yyin = nss->handle;
if (yyparse() != 0 || parse_error) {
log_error(NO_EXIT, "parse error in %s near line %d",
errorfile, errorlineno);
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
/*
struct sudo_nss *nss;
{
if (nss->handle == NULL)
- return(-1);
+ return -1;
if (!update_defaults(SETDEF_GENERIC|SETDEF_HOST|SETDEF_USER))
- return(-1);
- return(0);
+ return -1;
+ return 0;
}
/*
struct userspec *us;
if (nss->handle == NULL)
- return(validated);
+ return validated;
/*
* Only check the actual command if pwflag is not set.
SET(validated, FLAG_CHECK_USER);
else if (pwcheck == never || nopass == TRUE)
def_authenticate = FALSE;
- return(validated);
+ return validated;
}
/* Need to be runas user while stat'ing things. */
CLR(validated, VALIDATE_OK);
}
set_perms(PERM_ROOT);
- return(validated);
+ return validated;
}
#define TAG_CHANGED(t) \
}
lbuf_append(lbuf, "\n", NULL);
}
- return(nfound);
+ return nfound;
}
static int
nfound++;
}
}
- return(nfound);
+ return nfound;
}
int
nfound += sudo_file_display_priv_short(pw, us, lbuf);
}
done:
- return(nfound);
+ return nfound;
}
/*
nfound++;
}
done:
- return(nfound);
+ return nfound;
}
/*
nfound += display_bound_defaults(DEFAULTS_RUNAS, lbuf);
nfound += display_bound_defaults(DEFAULTS_CMND, lbuf);
- return(nfound);
+ return nfound;
}
/*
dsep = "!";
break;
default:
- return(-1);
+ return -1;
}
/* printf("Per-%s Defaults entries:\n", dname); */
tq_foreach_fwd(&defaults, d) {
lbuf_append(lbuf, d->op == FALSE ? "!" : "", d->var, NULL);
}
- return(nfound);
+ return nfound;
}
int
if (runas_match == ALLOW) {
cmnd_match = cmnd_matches(cs->cmnd);
if (cmnd_match != UNSPEC) {
- match = host_match && runas_match ?
- cs->cmnd : NULL;
+ match = host_match && runas_match ? cs->cmnd : NULL;
goto matched;
}
}
rval = 0;
}
done:
- return(rval);
+ return rval;
}
/*