]> granicus.if.org Git - sudo/commitdiff
Fix compilation when I/O logging support is not compiled in.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 23 May 2012 18:57:18 +0000 (14:57 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 23 May 2012 18:57:18 +0000 (14:57 -0400)
--HG--
branch : 1.7

defaults.c
exec.c

index dfe668d5fad8b6333621e2615603a259735cc11c..f311a1bf193780d80755c55518907492a10488eb 100644 (file)
@@ -439,7 +439,9 @@ init_defaults()
 #ifdef _PATH_SUDO_ASKPASS
     def_askpass = estrdup(_PATH_SUDO_ASKPASS);
 #endif
+#ifdef _PATH_SUDO_IO_LOGDIR
     def_iolog_dir = estrdup(_PATH_SUDO_IO_LOGDIR);
+#endif
     def_sudoers_locale = estrdup("C");
     def_env_reset = ENV_RESET;
     def_set_logname = TRUE;
diff --git a/exec.c b/exec.c
index 6bb984000664ef9d1679b5dc7effc10bf538f444..766302dedd8441047784fbdeeaf54eca9830de5b 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -406,12 +406,12 @@ sudo_execve(path, argv, envp, uid, cstat, dowait, bgmode)
                        cstat->val = errno;
                        break;
                    }
+#endif
                } else {
                    /* Short read or EOF. */
                    /* XXX - should set cstat */
                    break;
                }
-#endif
            }
 #ifdef _PATH_SUDO_IO_LOGDIR /* XXX */
            if (cstat->type == CMD_WSTATUS) {