]> granicus.if.org Git - sudo/commitdiff
Deal with user_name not being set in cvtsudoers.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 22 Feb 2018 17:43:47 +0000 (10:43 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Thu, 22 Feb 2018 17:43:47 +0000 (10:43 -0700)
plugins/sudoers/fmtsudoers.c

index 813c9f4a0b0edf5e49764bdc6544040d699438f6..01da535676f6c244e2c4744ce0cf6760c69a2ccb 100644 (file)
@@ -51,7 +51,8 @@ sudoers_format_member_int(struct sudo_lbuf *lbuf, char *name, int type,
            sudo_lbuf_append(lbuf, "%sALL", negated ? "!" : "");
            break;
        case MYSELF:
-           sudo_lbuf_append(lbuf, "%s%s", negated ? "!" : "", user_name);
+           sudo_lbuf_append(lbuf, "%s%s", negated ? "!" : "",
+               user_name ? user_name : "");
            break;
        case COMMAND:
            c = (struct sudo_command *) name;