]> granicus.if.org Git - sudo/commitdiff
We may need the hostname to resolve %h escapes in include files.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Sun, 25 Feb 2018 01:46:00 +0000 (18:46 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Sun, 25 Feb 2018 01:46:00 +0000 (18:46 -0700)
plugins/sudoers/cvtsudoers.c

index 2d7e24c03104a8b3d386ed71c1630b1b0a6aec97..520a1d60db10c11d8d31af6b4262a4b21b39723f 100644 (file)
@@ -249,6 +249,9 @@ main(int argc, char *argv[])
        }
     }
 
+    /* We may need the hostname to resolve %h escapes in include files. */
+    get_hostname();
+
     /* Setup defaults data structures. */
     if (!init_defaults())
        sudo_fatalx(U_("unable to initialize sudoers default values"));