From baf309de6b8b33af9fdcaf368317520b147dc51b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 20 Feb 1998 16:32:52 +0000 Subject: Security relabeling. svn path=/trunk/; revision=1659 --- acconfig.h | 2 +- configure.in | 4 ++-- fetchmail.c | 10 +++++----- options.c | 8 ++++---- rcfile_y.y | 6 +++--- socket.c | 18 +++++++++--------- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/acconfig.h b/acconfig.h index f349fe48..29fad8ff 100644 --- a/acconfig.h +++ b/acconfig.h @@ -74,7 +74,7 @@ #undef INET6 /* Define if you want network security support compiled in */ -#undef NETSEC +#undef NET_SECURITY /* Leave that blank line there!! Autoheader needs it. If you're adding to this file, keep in mind: diff --git a/configure.in b/configure.in index 50d653ae..84dae585 100644 --- a/configure.in +++ b/configure.in @@ -198,14 +198,14 @@ AC_ARG_ENABLE(inet6, AC_DEFINE(INET6, 1) ]) AC_ARG_ENABLE(netsec, - [ --enable-netsec support network security (req. the inet6-apps library)], + [ --enable-netsec support network security (requires inet6-apps library)], [ unset ac_cv_lib_inet6_net_security_strtorequest; AC_CHECK_LIB(inet6, net_security_strtorequest,, [ unset ac_cv_lib_inet6_net_security_strtorequest; LDFLAGS="$LDFLAGS -L/usr/inet6/lib"; AC_CHECK_LIB(inet6, net_security_strtorequest,, [ echo 'configure: cannot find net_security_strtorequest in libinet6, which is required'; echo ' for network security support. Either it does not exist, or it was'; echo ' not built with network security support enabled.'; exit 1]) ]) - AC_DEFINE(NETSEC, 1) ]) + AC_DEFINE(NET_SECURITY, 1) ]) ### use option --with-gssapi=DIR to compile in GSSAPI support AC_ARG_WITH(gssapi, diff --git a/fetchmail.c b/fetchmail.c index a14390da..1d937873 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -72,10 +72,10 @@ char *home; char *fetchmailhost; /* the name of the host running fetchmail */ char *program_name; /* the name to prefix error messages with */ -#if NETSEC +#if NET_SECURITY void *request = NULL; int requestlen = 0; -#endif /* NETSEC */ +#endif /* NET_SECURITY */ static char *lockfile; /* name of lockfile */ static int querystatus; /* status of query */ @@ -146,9 +146,9 @@ int main (int argc, char **argv) #if INET6 printf("+INET6"); #endif /* INET6 */ -#if NETSEC +#if NET_SECURITY printf("+NETSEC"); -#endif /* NETSEC */ +#endif /* NET_SECURITY */ putchar('\n'); /* this is an attempt to help remote debugging */ @@ -952,7 +952,7 @@ void dump_params (struct query *ctl) if (ctl->server.service) printf(" (using service %s)", ctl->server.service); if (ctl->server.netsec) - printf(" (using IPsec options %s)", ctl->server.netsec); + printf(" (using network security options %s)", ctl->server.netsec); #else /* INET6 */ if (ctl->server.port) printf(" (using port %d)", ctl->server.port); diff --git a/options.c b/options.c index b4277867..c0adeff2 100644 --- a/options.c +++ b/options.c @@ -341,12 +341,12 @@ struct query *ctl; /* option record to be initialized */ case 'T': case LA_NETSEC: -#if NETSEC +#if NET_SECURITY ctl->server.ipsec = (void *)optarg; #else fprintf(stderr, "fetchmail: IPv6 support is disabled\n"); errflag++; -#endif /* NETSEC */ +#endif /* NET_SECURITY */ break; #if defined(linux) && !INET6 @@ -419,9 +419,9 @@ struct query *ctl; /* option record to be initialized */ fputs(" -n, --norewrite don't rewrite header addresses\n", stderr); fputs(" -l, --limit don't fetch messages over given size\n", stderr); -#if NETSEC +#if NET_SECURITY fputs(" -T, --netsec set IP security request\n", stderr); -#endif /* NETSEC */ +#endif /* NET_SECURITY */ fputs(" -S, --smtphost set SMTP forwarding host\n", stderr); fputs(" -D, --smtpaddress set SMTP delivery domain to use\n", stderr); fputs(" -b, --batchlimit set batch limit for SMTP connections\n", stderr); diff --git a/rcfile_y.y b/rcfile_y.y index c59d1798..fa56cb2c 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -164,12 +164,12 @@ serv_option : AKA alias_list | QVIRTUAL STRING {current.server.qvirtual=xstrdup($2);} | NETSEC STRING { -#ifdef INET6 +#ifdef NET_SECURITY current.server.netsec = xstrdup($2); #else - yyerror("IPV6 support disabled") -#endif /* INET6 */ + yyerror("Network-security support disabled") +#endif /* NET_SECURITY */ } | INTERFACE STRING { #if defined(linux) && !defined(INET6) diff --git a/socket.c b/socket.c index b06fd6e2..1f8733a9 100644 --- a/socket.c +++ b/socket.c @@ -28,9 +28,9 @@ #endif #include "socket.h" -#if NETSEC +#if NET_SECURITY #include -#endif /* NETSEC */ +#endif /* NET_SECURITY */ #if INET6 int SockOpen(const char *host, const char *service, const char *options) @@ -40,24 +40,24 @@ int SockOpen(const char *host, const char *service, const char *options) memset(&req, 0, sizeof(struct addrinfo)); req.ai_socktype = SOCK_STREAM; -#if NETSEC - net_security_operation request[32]; - int requestlen = 32; -#endif /* NETSEC */ +#if NET_SECURITY + net_security_operation request[NET_SECURITY_OPERATION_MAX]; + int requestlen = NET_SECURITY_OPERATION_MAX; +#endif /* NET_SECURITY */ if (i = getaddrinfo(host, service, &req, &ai)) { fprintf(stderr, "fetchmail: getaddrinfo(%s.%s): %s(%d)\n", host, service, gai_strerror(i), i); return -1; }; -#if NETSEC +#if NET_SECURITY if (net_security_strtorequest(options, request, &requestlen)) i = -1; else i = inner_connect(ai, request, requestlen, NULL,NULL, "fetchmail", NULL); -#else /* NETSEC */ +#else /* NET_SECURITY */ i = inner_connect(ai, NULL, 0, NULL, NULL, "fetchmail", NULL); -#endif /* NETSEC */ +#endif /* NET_SECURITY */ freeaddrinfo(ai); return i; -- cgit v1.2.3