]> granicus.if.org Git - sudo/commitdiff
shost must be set before log functions are called #ifdef HOST_IN_LOG
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Mar 1999 18:37:57 +0000 (18:37 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Mar 1999 18:37:57 +0000 (18:37 +0000)
sudo.c

diff --git a/sudo.c b/sudo.c
index 260c35abdad19652261af7deddcec8ae7dba0696..718ef615678205917a0706c27743edc43dcf5164 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -437,6 +437,13 @@ static void load_globals(sudo_mode)
     char *lrealm;
 #endif /* HAVE_KERB5 */
 
+#ifdef HOST_IN_LOG
+    /*
+     * Logging routines may use shost so set to a dummy value for now.
+     */
+    shost = strcpy(host, "localhost");
+#endif
+
     /*
      * Get a local copy of the user's struct passwd with the shadow password
      * if necesary.  It is assumed that euid is 0 at this point so we