results in "sudo -U otheruser -l" exiting with a status of 0 even
when otheruser is not allowed to run commands. This is appropriate
since the "sudo -l" command was successful. This does not change
the exit value when otheruser runs "sudo -l" themselves, the exit
status will be 1 since that user is not allowed to run commands.
Requested by Radovan Sroka.
/*
* Print out privileges for the specified user.
- * Returns true if the user is allowed to run commands, false if not
- * or -1 on error.
+ * Returns true on success or -1 on error.
*/
int
display_privs(struct sudo_nss_list *snl, struct passwd *pw)
sudo_lbuf_destroy(&defs);
sudo_lbuf_destroy(&privs);
- debug_return_int(count > 0);
+ debug_return_int(true);
bad:
sudo_lbuf_destroy(&defs);
sudo_lbuf_destroy(&privs);