display_privs() and display_cmnd() may need to return -1 on error.

This commit is contained in:
Todd C. Miller
2015-06-26 10:33:28 -06:00
parent d3bc17a611
commit 2751413464
4 changed files with 18 additions and 10 deletions

View File

@@ -583,6 +583,9 @@ sudo_file_display_priv_long(struct passwd *pw, struct userspec *us,
debug_return_int(nfound);
}
/*
* Returns the number of matching privileges or -1 on error.
*/
int
sudo_file_display_privs(struct sudo_nss *nss, struct passwd *pw,
struct sudo_lbuf *lbuf)
@@ -738,6 +741,9 @@ display_bound_defaults(int dtype, struct sudo_lbuf *lbuf)
debug_return_int(nfound);
}
/*
* Returns 0 if the command is allowed, 1 if not or -1 on error.
*/
int
sudo_file_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
{