From: Todd C. Miller Date: Thu, 12 Apr 2018 12:25:35 +0000 (-0600) Subject: Don't always expand aliases when formatting a host-based Defaults X-Git-Tag: SUDO_1_8_23^2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df7a6ea4e8aa6a6b6acd73c8ec6f0f5865337f28;p=sudo Don't always expand aliases when formatting a host-based Defaults line. This was missed when expand_aliases support was added. --- diff --git a/plugins/sudoers/fmtsudoers.c b/plugins/sudoers/fmtsudoers.c index 8d86b3140..9f3eb251b 100644 --- a/plugins/sudoers/fmtsudoers.c +++ b/plugins/sudoers/fmtsudoers.c @@ -348,7 +348,7 @@ sudoers_format_default_line(struct sudo_lbuf *lbuf, struct defaults *d, switch (d->type) { case DEFAULTS_HOST: sudo_lbuf_append(lbuf, "Defaults@"); - alias_type = HOSTALIAS; + alias_type = expand_aliases ? HOSTALIAS : UNSPEC; break; case DEFAULTS_USER: sudo_lbuf_append(lbuf, "Defaults:");