mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-26 20:31:06 +01:00
* 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. * exec.c: Provide stubs for exec_ functions when NO_EXEC is defined.
This commit is contained in:
parent
6dc53d136a
commit
cc0074dc5a
@ -1,3 +1,10 @@
|
|||||||
|
2002-05-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* 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 <dshaw@jabberwocky.com>
|
2002-04-30 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* configure.ac: Try and link to a sample LDAP program to check if
|
* configure.ac: Try and link to a sample LDAP program to check if
|
||||||
|
34
configure.ac
34
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])
|
AC_DEFINE(M_GUARD,1,[Define to use the (obsolete) malloc guarding feature])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether the LDAP keyserver interface is requested])
|
AC_MSG_CHECKING([whether to enable external program execution])
|
||||||
AC_ARG_ENABLE(ldap,
|
AC_ARG_ENABLE(exec,
|
||||||
[ --disable-ldap disable LDAP keyserver interface],
|
[ --disable-exec disable external program execution],
|
||||||
try_ldap=$enableval, try_ldap=yes)
|
use_exec=$enableval, use_exec=yes)
|
||||||
AC_MSG_RESULT($try_ldap)
|
AC_MSG_RESULT($use_exec)
|
||||||
|
if test "$use_exec" = no ; then
|
||||||
|
AC_DEFINE(NO_EXEC,1,[Define to disable external program execution])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether the email keyserver interface is requested])
|
if test "$use_exec" = yes ; then
|
||||||
AC_ARG_ENABLE(mailto,
|
AC_MSG_CHECKING([whether LDAP keyserver support is requested])
|
||||||
[ --disable-mailto disable email keyserver interface],
|
AC_ARG_ENABLE(ldap,
|
||||||
try_mailto=$enableval, try_mailto=yes)
|
[ --disable-ldap disable LDAP keyserver interface],
|
||||||
AC_MSG_RESULT($try_mailto)
|
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_MSG_CHECKING([whether included zlib is requested])
|
||||||
AC_ARG_WITH(included-zlib,
|
AC_ARG_WITH(included-zlib,
|
||||||
@ -295,8 +306,7 @@ fi
|
|||||||
AC_SUBST(GPGKEYS_LDAP)
|
AC_SUBST(GPGKEYS_LDAP)
|
||||||
|
|
||||||
if test "$try_mailto" = yes ; then
|
if test "$try_mailto" = yes ; then
|
||||||
AC_PATH_PROG(SENDMAIL,sendmail,/usr/sbin/sendmail,
|
AC_PATH_PROG(SENDMAIL,sendmail,,$PATH:/usr/sbin:/usr/libexec:/usr/lib)
|
||||||
$PATH:/usr/libexec:/usr/sbin)
|
|
||||||
|
|
||||||
if test "$ac_cv_path_SENDMAIL" ; then
|
if test "$ac_cv_path_SENDMAIL" ; then
|
||||||
GPGKEYS_MAILTO="gpgkeys_mailto"
|
GPGKEYS_MAILTO="gpgkeys_mailto"
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2002-05-03 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* exec.c: Provide stubs for exec_ functions when NO_EXEC is
|
||||||
|
defined.
|
||||||
|
|
||||||
2002-05-02 David Shaw <dshaw@jabberwocky.com>
|
2002-05-02 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* photoid.h, photoid.c (parse_image_header, image_type_to_string):
|
* photoid.h, photoid.c (parse_image_header, image_type_to_string):
|
||||||
|
14
g10/exec.c
14
g10/exec.c
@ -41,6 +41,19 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "exec.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
|
#ifndef HAVE_MKDTEMP
|
||||||
char *mkdtemp(char *template);
|
char *mkdtemp(char *template);
|
||||||
#endif
|
#endif
|
||||||
@ -494,3 +507,4 @@ int exec_finish(struct exec_info *info)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* ! NO_EXEC */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user