summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2014-05-18 07:04:33 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2014-05-18 07:04:33 (GMT)
commit9087acb001afd6fefa0fe4f2e4fbdcb3ae524e02 (patch) (side-by-side diff)
tree5a9971eb3dc6494e09a07020c6e088304104b1fd
parentbe939243b4c916fde82ca69973e9d1bd94e668d6 (diff)
downloadanubis-9087acb001afd6fefa0fe4f2e4fbdcb3ae524e02.tar.gz
anubis-9087acb001afd6fefa0fe4f2e4fbdcb3ae524e02.tar.bz2
More fixes.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Enable everything. * src/anubisusr.c [USE_GNUTLS] (tls_cafile): Remove. [USE_GNUTLS] (secure): New global. (starttls): Update start_ssl_client invocation. * src/usr.opt (tls-cafile option): Set secure.cafile. * src/authmode.c (asmtp_ehlo): Update call to start_ssl_server. * src/getopt.m4 (version_etc_copyright): Update copyright years. * src/gpg.c (gpg_proc): Remove useless preprocessor checks. * src/headers.h: Likewise. * src/rc-gram.y (yyerror): Argument is const char *. * testsuite/mta.c: Remove the use of deprecated gnutls types and functions.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile.am9
-rw-r--r--src/anubisusr.c4
-rw-r--r--src/authmode.c6
-rw-r--r--src/getopt.m42
-rw-r--r--src/gpg.c4
-rw-r--r--src/headers.h5
-rw-r--r--src/rc-gram.y4
-rw-r--r--src/usr.opt2
-rw-r--r--testsuite/mta.c18
9 files changed, 25 insertions, 29 deletions
diff --git a/Makefile.am b/Makefile.am
index 4183599..7382036 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,15 @@ ACLOCAL_AMFLAGS = -I m4 -I am -I gint
SUBDIRS = build lib gint src po doc scripts examples guile contrib \
elisp testsuite
+AM_DISTCHECK_CONFIGURE_FLAGS =\
+ --with-gsasl\
+ --with-mysql\
+ --with-postgres\
+ --with-pam\
+ --with-tcp-wrappers\
+ --with-socks-proxy\
+ --with-pcre
+
.PHONY: make-ChangeLog
make-ChangeLog:
if test -d .git; then \
diff --git a/src/anubisusr.c b/src/anubisusr.c
index 69e2c06..8cbbc71 100644
--- a/src/anubisusr.c
+++ b/src/anubisusr.c
@@ -20,7 +20,7 @@
#include <anubisusr.h>
#ifdef USE_GNUTLS
-char *tls_cafile;
+struct secure_struct secure;
int enable_tls = 1;
#endif /* USE_GNUTLS */
@@ -107,7 +107,7 @@ starttls (void)
exit (1);
}
smtp_reply_free (reply);
- iostream = start_ssl_client (iostream, tls_cafile, verbose > 2);
+ iostream = start_ssl_client (iostream, verbose > 2);
if (!iostream)
{
error (_("TLS negotiation failed"));
diff --git a/src/authmode.c b/src/authmode.c
index ca7e8dd..950b1ec 100644
--- a/src/authmode.c
+++ b/src/authmode.c
@@ -354,11 +354,7 @@ asmtp_ehlo (enum asmtp_state state, ANUBIS_USER * usr)
}
asmtp_reply (220, "Ready to start TLS");
- stream = start_ssl_server (remote_client,
- secure.cafile,
- secure.cert,
- secure.key,
- options.termlevel > NORMAL);
+ stream = start_ssl_server (remote_client, options.termlevel > NORMAL);
if (!stream)
{
asmtp_reply (454, "TLS not available" CRLF);
diff --git a/src/getopt.m4 b/src/getopt.m4
index 3cc7cce..88e3ba4 100644
--- a/src/getopt.m4
+++ b/src/getopt.m4
@@ -452,7 +452,7 @@ print_usage(void)
const char version_etc_copyright[] =
/* Do *not* mark this string for translation. %s is a copyright
symbol suitable for this locale. */
- "Copyright %s 2001, 2002, 2003, 2004, 2005, 2007, 2008 The Anubis Team.";
+ "Copyright %s 2001-2014 The Anubis Team.";
void
print_version_only(const char *program_version, FILE *stream)
diff --git a/src/gpg.c b/src/gpg.c
index 4e9c696..9ad3289 100644
--- a/src/gpg.c
+++ b/src/gpg.c
@@ -442,20 +442,16 @@ _gpg_funcall (char **output, char *input, void *param)
void
gpg_proc (MESSAGE msg, char *(*fun) (char *input))
{
-#if defined(HAVE_SETENV) || defined(HAVE_PUTENV)
char homedir_s[MAXPATHLEN + 1]; /* SUPERVISOR */
char homedir_c[MAXPATHLEN + 1]; /* CLIENT */
get_homedir (session.supervisor, homedir_s, sizeof (homedir_s));
get_homedir (session.clientname, homedir_c, sizeof (homedir_c));
setenv ("HOME", homedir_c, 1);
-#endif /* HAVE_SETENV or HAVE_PUTENV */
message_proc_body (msg, _gpg_funcall, fun);
-#if defined(HAVE_SETENV) || defined(HAVE_PUTENV)
setenv ("HOME", homedir_s, 1);
-#endif /* HAVE_SETENV or HAVE_PUTENV */
}
void
diff --git a/src/headers.h b/src/headers.h
index e20a579..dd4ad5f 100644
--- a/src/headers.h
+++ b/src/headers.h
@@ -323,11 +323,6 @@ int stream_destroy (NET_STREAM *);
/* main.c */
void anubis (char *);
-/* setenv.c */
-#if !defined(HAVE_SETENV) && defined(HAVE_PUTENV)
-int setenv (const char *, const char *, int);
-#endif
-
/* env.c */
void get_options (int, char *[]);
void get_homedir (char *, char *, int);
diff --git a/src/rc-gram.y b/src/rc-gram.y
index 65ecb44..d2aa080 100644
--- a/src/rc-gram.y
+++ b/src/rc-gram.y
@@ -31,7 +31,7 @@
#include "rcfile.h"
extern int yylex (void);
-int yyerror (char *s);
+int yyerror (const char *s);
static RC_SECTION *rc_section_create (char *, RC_LOC *, RC_STMT *);
static void rc_section_destroy (RC_SECTION **);
@@ -678,7 +678,7 @@ parse_error (struct rc_loc *loc, const char *fmt, ...)
}
int
-yyerror (char *s)
+yyerror (const char *s)
{
parse_error (NULL, "%s", s);
return 0;
diff --git a/src/usr.opt b/src/usr.opt
index 58d2a06..72ab222 100644
--- a/src/usr.opt
+++ b/src/usr.opt
@@ -33,7 +33,7 @@ OPTION(tls-cafile,C,FILE,
Use given CA file.)
BEGIN
#ifdef HAVE_TLS
- tls_cafile = optarg;
+ secure.cafile = optarg;
#endif
END
diff --git a/testsuite/mta.c b/testsuite/mta.c
index d17f653..43761a0 100644
--- a/testsuite/mta.c
+++ b/testsuite/mta.c
@@ -83,7 +83,7 @@ char *tls_cafile;
#define enable_tls() (tls_cafile != NULL || (tls_cert != NULL && tls_key != NULL))
void tls_init (void);
-gnutls_dh_params dh_params;
+gnutls_dh_params_t dh_params;
static gnutls_certificate_server_credentials x509_cred;
#endif /* USE_GNUTLS */
@@ -297,7 +297,7 @@ tls_init (void)
}
static ssize_t
-_tls_fd_pull (gnutls_transport_ptr fd, void *buf, size_t size)
+_tls_fd_pull (gnutls_transport_ptr_t fd, void *buf, size_t size)
{
int rc;
do
@@ -309,7 +309,7 @@ _tls_fd_pull (gnutls_transport_ptr fd, void *buf, size_t size)
}
static ssize_t
-_tls_fd_push (gnutls_transport_ptr fd, const void *buf, size_t size)
+_tls_fd_push (gnutls_transport_ptr_t fd, const void *buf, size_t size)
{
int rc;
do
@@ -367,10 +367,10 @@ _tls_close (void *sd)
return 0;
}
-static gnutls_session
+static gnutls_session_t
tls_session_init (void)
{
- gnutls_session session = 0;
+ gnutls_session_t session = 0;
int rc;
gnutls_init (&session, GNUTLS_SERVER);
@@ -383,8 +383,8 @@ tls_session_init (void)
gnutls_transport_set_push_function (session, _tls_fd_push);
gnutls_transport_set_ptr2 (session,
- (gnutls_transport_ptr) in,
- (gnutls_transport_ptr) out);
+ (gnutls_transport_ptr_t) in,
+ (gnutls_transport_ptr_t) out);
rc = gnutls_handshake (session);
if (rc < 0)
{
@@ -393,13 +393,13 @@ tls_session_init (void)
return 0;
}
- return (gnutls_session) session;
+ return session;
}
void
smtp_starttls (void)
{
- gnutls_session session;
+ gnutls_session_t session;
smtp_reply (220, "Ready to start TLS");

Return to:

Send suggestions and report system problems to the System administrator.