]> granicus.if.org Git - sudo/commitdiff
Don't always expand aliases when formatting a host-based Defaults
authorTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 12 Apr 2018 12:25:35 +0000 (06:25 -0600)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 12 Apr 2018 12:25:35 +0000 (06:25 -0600)
line.  This was missed when expand_aliases support was added.

plugins/sudoers/fmtsudoers.c

index 8d86b3140325ecc598f1e00b0bcff8203137fdc9..9f3eb251bed78a93295beefe85a6a55169e52c1e 100644 (file)
@@ -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:");