priv = sudo_ldap_role_to_priv(cn, hosts, runasusers, runasgroups,
cmnds, opts, notbefore ? notbefore[0]->bv_val : NULL,
- notafter ? notafter[0]->bv_val : NULL, false, long_list,
+ notafter ? notafter[0]->bv_val : NULL, false, !short_list,
berval_iter);
cleanup:
if (userlist_matches(parse_tree, pw, &us->users) != ALLOW)
continue;
- if (long_list)
- nfound += display_priv_long(parse_tree, pw, us, lbuf);
- else
+ if (short_list)
nfound += display_priv_short(parse_tree, pw, us, lbuf);
+ else
+ nfound += display_priv_long(parse_tree, pw, us, lbuf);
}
if (sudo_lbuf_error(lbuf))
debug_return_int(-1);
SET(sudo_mode, MODE_CHECK);
else
SET(sudo_mode, MODE_LIST);
- if (verbose)
- long_list = 1;
+ if (!verbose)
+ short_list = 1;
if (list_user) {
list_pw = sudo_getpwnam(list_user);
if (list_pw == NULL) {
priv = sudo_ldap_role_to_priv(cn, hosts, runasusers, runasgroups,
cmnds, opts, notbefore ? notbefore[0] : NULL,
- notafter ? notafter[0] : NULL, false, long_list, val_array_iter);
+ notafter ? notafter[0] : NULL, false, !short_list, val_array_iter);
cleanup:
if (cn_array != NULL)
*/
struct sudo_user sudo_user;
struct passwd *list_pw;
-int long_list;
+bool short_list;
uid_t timestamp_uid;
gid_t timestamp_gid;
#ifdef HAVE_BSD_AUTH_H
void sudoers_cleanup(void);
extern struct sudo_user sudo_user;
extern struct passwd *list_pw;
-extern int long_list;
+extern bool short_list;
extern int sudo_mode;
extern uid_t timestamp_uid;
extern gid_t timestamp_gid;