For "sudo -U user -l" if user is not authorized on the host, say so.

This commit is contained in:
Todd C. Miller
2011-01-21 10:10:26 -05:00
parent be034d5e7e
commit fbbd0603da

View File

@@ -294,6 +294,9 @@ display_privs(struct sudo_nss_list *snl, struct passwd *pw)
if (count) { if (count) {
lbuf_print(&defs); lbuf_print(&defs);
lbuf_print(&privs); lbuf_print(&privs);
} else {
printf("User %s is not allowed to run sudo on %s.\n", pw->pw_name,
user_shost);
} }
lbuf_destroy(&defs); lbuf_destroy(&defs);