aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac36
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/exec.c14
4 files changed, 49 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b1c02acb..ee2657a36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-03 David Shaw <[email protected]>
+
+ * configure.ac: Add --disable-exec flag to disable all remote
+ program execution. --disable-exec implies --disable-ldap and
+ --disable-mailto. Also look in /usr/lib for sendmail. If
+ sendmail is not found, do not default - just fail.
+
2002-04-30 David Shaw <[email protected]>
* configure.ac: Try and link to a sample LDAP program to check if
diff --git a/configure.ac b/configure.ac
index 8b10c3737..f645ef9ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,17 +117,28 @@ if test "$use_m_guard" = yes ; then
AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
fi
-AC_MSG_CHECKING([whether the LDAP keyserver interface is requested])
-AC_ARG_ENABLE(ldap,
-[ --disable-ldap disable LDAP keyserver interface],
- try_ldap=$enableval, try_ldap=yes)
-AC_MSG_RESULT($try_ldap)
-
-AC_MSG_CHECKING([whether the email keyserver interface is requested])
-AC_ARG_ENABLE(mailto,
-[ --disable-mailto disable email keyserver interface],
- try_mailto=$enableval, try_mailto=yes)
-AC_MSG_RESULT($try_mailto)
+AC_MSG_CHECKING([whether to enable external program execution])
+AC_ARG_ENABLE(exec,
+ [ --disable-exec disable external program execution],
+ use_exec=$enableval, use_exec=yes)
+AC_MSG_RESULT($use_exec)
+if test "$use_exec" = no ; then
+ AC_DEFINE(NO_EXEC,1,[Define to disable external program execution])
+fi
+
+if test "$use_exec" = yes ; then
+ AC_MSG_CHECKING([whether LDAP keyserver support is requested])
+ AC_ARG_ENABLE(ldap,
+ [ --disable-ldap disable LDAP keyserver interface],
+ try_ldap=$enableval, try_ldap=yes)
+ AC_MSG_RESULT($try_ldap)
+
+ AC_MSG_CHECKING([whether email keyserver support is requested])
+ AC_ARG_ENABLE(mailto,
+ [ --disable-mailto disable email keyserver interface],
+ try_mailto=$enableval, try_mailto=yes)
+ AC_MSG_RESULT($try_mailto)
+fi
AC_MSG_CHECKING([whether included zlib is requested])
AC_ARG_WITH(included-zlib,
@@ -295,8 +306,7 @@ fi
AC_SUBST(GPGKEYS_LDAP)
if test "$try_mailto" = yes ; then
- AC_PATH_PROG(SENDMAIL,sendmail,/usr/sbin/sendmail,
- $PATH:/usr/libexec:/usr/sbin)
+ AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
if test "$ac_cv_path_SENDMAIL" ; then
GPGKEYS_MAILTO="gpgkeys_mailto"
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 424e03daa..3f4b95893 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-03 David Shaw <[email protected]>
+
+ * exec.c: Provide stubs for exec_ functions when NO_EXEC is
+ defined.
+
2002-05-02 David Shaw <[email protected]>
* photoid.h, photoid.c (parse_image_header, image_type_to_string):
diff --git a/g10/exec.c b/g10/exec.c
index bd5ead01c..4c0c664fc 100644
--- a/g10/exec.c
+++ b/g10/exec.c
@@ -41,6 +41,19 @@
#include "util.h"
#include "exec.h"
+#ifdef NO_EXEC
+int exec_write(struct exec_info **info,const char *program,
+ const char *args_in,int writeonly,int binary)
+{
+ log_error(_("no remote program execution supported\n"));
+ return G10ERR_GENERAL;
+}
+
+int exec_read(struct exec_info *info) { return G10ERR_GENERAL; }
+int exec_finish(struct exec_info *info) { return G10ERR_GENERAL; }
+
+#else /* ! NO_EXEC */
+
#ifndef HAVE_MKDTEMP
char *mkdtemp(char *template);
#endif
@@ -494,3 +507,4 @@ int exec_finish(struct exec_info *info)
return ret;
}
+#endif /* ! NO_EXEC */