# HG changeset patch # User markus schnalke # Date 1326573418 -3600 # Node ID 5781ba87df951b68440f062b0b5f02b6e21b736a # Parent 9bc3e47b0222ca5594e734f55de8a6a7451eab4e Removed ident. This had been discussed on the mailing list in Oct 2011. Ident is hardly useful in typical setups for masqmail. Probably Oliver had used it in his setup; that would make sense. Now, I know of nobody who needs it. diff -r 9bc3e47b0222 -r 5781ba87df95 AUTHORS --- a/AUTHORS Sat Jan 14 18:44:48 2012 +0100 +++ b/AUTHORS Sat Jan 14 21:36:58 2012 +0100 @@ -16,9 +16,6 @@ src/md5/md5.* by Solar Designer (in the Public Domain) -src/libident/* -by Peter Eriksson (in the Public Domain) - admin/rmail by luciano l. mannucci and Wietse Venema (no license applies) diff -r 9bc3e47b0222 -r 5781ba87df95 INSTALL --- a/INSTALL Sat Jan 14 18:44:48 2012 +0100 +++ b/INSTALL Sat Jan 14 21:36:58 2012 +0100 @@ -66,16 +66,6 @@ prefer another location than /etc/masqmail/. ---enable-ident -enables RFC 1413 support. If you have the libident dynamic library -installed, this will be linked, otherwise it will be statically linked -using the sources included in the package. Ident support brings few -advantages. If mail is received from machines that run identd, the -Received headers and log messages include a user name too. Additionally -a user can remove queued mail if it had been sent by himself from another -machine running identd. In any case: You cannot trust the ident -information more than you trust the specific remote machine. - --disable-resolver disables resolver support. Without the resolver functions, masqmail uses only gethostbyname() to resolve DNS names, and you cannot send diff -r 9bc3e47b0222 -r 5781ba87df95 Makefile.in --- a/Makefile.in Sat Jan 14 18:44:48 2012 +0100 +++ b/Makefile.in Sat Jan 14 21:36:58 2012 +0100 @@ -123,7 +123,6 @@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ -IDENT_LIBS = @IDENT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -174,7 +173,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -has_ident = @has_ident@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ diff -r 9bc3e47b0222 -r 5781ba87df95 acconfig.h --- a/acconfig.h Sat Jan 14 18:44:48 2012 +0100 +++ b/acconfig.h Sat Jan 14 21:36:58 2012 +0100 @@ -10,8 +10,6 @@ #undef ENABLE_AUTH -#undef ENABLE_IDENT - #undef CONF_DIR #undef DATA_DIR diff -r 9bc3e47b0222 -r 5781ba87df95 config.h.in --- a/config.h.in Sat Jan 14 18:44:48 2012 +0100 +++ b/config.h.in Sat Jan 14 21:36:58 2012 +0100 @@ -11,8 +11,6 @@ #undef ENABLE_AUTH -#undef ENABLE_IDENT - #undef CONF_DIR #undef DATA_DIR @@ -37,9 +35,6 @@ /* If debugging is enabled */ #undef ENABLE_DEBUG -/* If ident is enabled */ -#undef ENABLE_IDENT - /* If the resolver is to be used */ #undef ENABLE_RESOLVER diff -r 9bc3e47b0222 -r 5781ba87df95 configure --- a/configure Sat Jan 14 18:44:48 2012 +0100 +++ b/configure Sat Jan 14 21:36:58 2012 +0100 @@ -611,8 +611,6 @@ with_logdir USE_LIBLOCKFILE LOCKFILE_LIBS -IDENT_LIBS -has_ident MD5_LIBS BASE64_LIBS with_group @@ -713,7 +711,6 @@ with_group enable_debug enable_auth -enable_ident with_liblockfile with_logdir with_spooldir @@ -1354,7 +1351,6 @@ --disable-resolver disable resolver support --disable-debug disable debugging --disable-auth disable AUTH (RFC 2554) client support - --enable-ident enable ident (RFC 1413) support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -5179,64 +5175,6 @@ fi -IDENT_LIBS='' -# Check whether --enable-ident was given. -if test "${enable_ident+set}" = set; then : - enableval=$enable_ident; if test "x$enable_ident" != 'xno'; then - ident_enabled='yes' - fi -fi - - -if test "x$ident_enabled" = xyes; then - -$as_echo "#define ENABLE_IDENT 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ident_id in -lident" >&5 -$as_echo_n "checking for ident_id in -lident... " >&6; } -if ${ac_cv_lib_ident_ident_id+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lident $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char ident_id (); -int -main () -{ -return ident_id (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ident_ident_id=yes -else - ac_cv_lib_ident_ident_id=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ident_ident_id" >&5 -$as_echo "$ac_cv_lib_ident_ident_id" >&6; } -if test "x$ac_cv_lib_ident_ident_id" = xyes; then : - IDENT_LIBS='-lident' -else - IDENT_LIBS='libident/libident.a' -fi - -fi - - # Check whether --with-liblockfile was given. if test "${with_liblockfile+set}" = set; then : @@ -5378,7 +5316,7 @@ fi fi -ac_config_files="$ac_config_files Makefile src/Makefile src/base64/Makefile src/md5/Makefile src/libident/Makefile man/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile src/base64/Makefile src/md5/Makefile man/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6115,7 +6053,6 @@ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/base64/Makefile") CONFIG_FILES="$CONFIG_FILES src/base64/Makefile" ;; "src/md5/Makefile") CONFIG_FILES="$CONFIG_FILES src/md5/Makefile" ;; - "src/libident/Makefile") CONFIG_FILES="$CONFIG_FILES src/libident/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff -r 9bc3e47b0222 -r 5781ba87df95 configure.ac --- a/configure.ac Sat Jan 14 18:44:48 2012 +0100 +++ b/configure.ac Sat Jan 14 21:36:58 2012 +0100 @@ -142,21 +142,6 @@ fi AC_SUBST(MD5_LIBS) -dnl ident support (default is to not use it) -IDENT_LIBS='' -AC_ARG_ENABLE(ident, - [ --enable-ident enable ident (RFC 1413) support], - if test "x$enable_ident" != 'xno'; then - ident_enabled='yes' - fi, - ) -AC_SUBST(has_ident) -if test "x$ident_enabled" = xyes; then - AC_DEFINE(ENABLE_IDENT, 1, [If ident is enabled]) - AC_CHECK_LIB(ident, ident_id, IDENT_LIBS='-lident', IDENT_LIBS='libident/libident.a') -fi -AC_SUBST(IDENT_LIBS) - dnl liblockfile AC_ARG_WITH(liblockfile, [ --with-liblockfile use liblock (for Debian)], @@ -226,6 +211,5 @@ src/Makefile \ src/base64/Makefile \ src/md5/Makefile \ - src/libident/Makefile \ man/Makefile ) diff -r 9bc3e47b0222 -r 5781ba87df95 docs/INSTALL.linux --- a/docs/INSTALL.linux Sat Jan 14 18:44:48 2012 +0100 +++ b/docs/INSTALL.linux Sat Jan 14 21:36:58 2012 +0100 @@ -8,8 +8,6 @@ ./configure --with-liblockfile -(You might like to add `--enable-ident'.) - You can also build your own Debian package with dpkg-buildpackage -rfakeroot diff -r 9bc3e47b0222 -r 5781ba87df95 docs/simple-local-setup --- a/docs/simple-local-setup Sat Jan 14 18:44:48 2012 +0100 +++ b/docs/simple-local-setup Sat Jan 14 21:36:58 2012 +0100 @@ -16,9 +16,9 @@ Follow the description in INSTALL. -A common configure call would be: +Most times it's simply: - ./configure --enable-ident + ./configure Configuration diff -r 9bc3e47b0222 -r 5781ba87df95 docs/simple-relay-setup --- a/docs/simple-relay-setup Sat Jan 14 18:44:48 2012 +0100 +++ b/docs/simple-relay-setup Sat Jan 14 21:36:58 2012 +0100 @@ -17,9 +17,9 @@ Follow the description in INSTALL. -A common configure call would be: +Most times it's simply: - ./configure --enable-ident + ./configure Configuration diff -r 9bc3e47b0222 -r 5781ba87df95 man/Makefile.in --- a/man/Makefile.in Sat Jan 14 18:44:48 2012 +0100 +++ b/man/Makefile.in Sat Jan 14 21:36:58 2012 +0100 @@ -95,7 +95,6 @@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ -IDENT_LIBS = @IDENT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -146,7 +145,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -has_ident = @has_ident@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ diff -r 9bc3e47b0222 -r 5781ba87df95 man/masqmail.conf.5 --- a/man/masqmail.conf.5 Sat Jan 14 18:44:48 2012 +0100 +++ b/man/masqmail.conf.5 Sat Jan 14 21:36:58 2012 +0100 @@ -335,8 +335,7 @@ received_host - the host the mail was received from -ident - the ident, this is either the ident delivered by the ident protocol -or the user id of the sender if the message was received locally. +ident - the user id of the sender if the message was received locally. return_path_local - the local part of the return path (sender). @@ -413,14 +412,6 @@ use: \fI/usr/bin/mservdetect localhost 224\fP - -.TP -\fBident_trusted_nets = \fIlist\fR - -\fIlist\fR is a list of networks of the form a.b.c.d/e (e.g. 192.168.1.0/24), -from which the ident given by the ident protocol will be trusted, -so a user can delete his mail from the queue if the ident is identical to his login name. - .TP \fBerrmsg_file = \fIfile\fR diff -r 9bc3e47b0222 -r 5781ba87df95 src/Makefile.am --- a/src/Makefile.am Sat Jan 14 18:44:48 2012 +0100 +++ b/src/Makefile.am Sat Jan 14 21:36:58 2012 +0100 @@ -1,4 +1,4 @@ -SUBDIRS=base64 md5 libident +SUBDIRS=base64 md5 AM_CFLAGS=@CFLAGS@ @GLIB_CFLAGS@ -D_GNU_SOURCE -DG_DISABLE_DEPRECATED @@ -80,8 +80,8 @@ resolvtest.c\ lookup.c -masqmail_LDADD=@RESOLV_LIBS@ @GLIB_LIBS@ @LOCKFILE_LIBS@ @MD5_LIBS@ @BASE64_LIBS@ @IDENT_LIBS@ +masqmail_LDADD=@RESOLV_LIBS@ @GLIB_LIBS@ @LOCKFILE_LIBS@ @MD5_LIBS@ @BASE64_LIBS@ smtpsend_LDADD=@RESOLV_LIBS@ @GLIB_LIBS@ @MD5_LIBS@ @BASE64_LIBS@ mservdetect_LDADD=@GLIB_LIBS@ readtest_LDADD=@GLIB_LIBS@ -resolvtest_LDADD=@RESOLV_LIBS@ @GLIB_LIBS@ @IDENT_LIBS@ +resolvtest_LDADD=@RESOLV_LIBS@ @GLIB_LIBS@ diff -r 9bc3e47b0222 -r 5781ba87df95 src/Makefile.in --- a/src/Makefile.in Sat Jan 14 18:44:48 2012 +0100 +++ b/src/Makefile.in Sat Jan 14 21:36:58 2012 +0100 @@ -154,7 +154,6 @@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ -IDENT_LIBS = @IDENT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -205,7 +204,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -has_ident = @has_ident@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ @@ -235,7 +233,7 @@ with_logdir = @with_logdir@ with_spooldir = @with_spooldir@ with_user = @with_user@ -SUBDIRS = base64 md5 libident +SUBDIRS = base64 md5 AM_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ -D_GNU_SOURCE -DG_DISABLE_DEPRECATED masqmail_SOURCES = \ dotlock.h\ @@ -311,11 +309,11 @@ resolvtest.c\ lookup.c -masqmail_LDADD = @RESOLV_LIBS@ @GLIB_LIBS@ @LOCKFILE_LIBS@ @MD5_LIBS@ @BASE64_LIBS@ @IDENT_LIBS@ +masqmail_LDADD = @RESOLV_LIBS@ @GLIB_LIBS@ @LOCKFILE_LIBS@ @MD5_LIBS@ @BASE64_LIBS@ smtpsend_LDADD = @RESOLV_LIBS@ @GLIB_LIBS@ @MD5_LIBS@ @BASE64_LIBS@ mservdetect_LDADD = @GLIB_LIBS@ readtest_LDADD = @GLIB_LIBS@ -resolvtest_LDADD = @RESOLV_LIBS@ @GLIB_LIBS@ @IDENT_LIBS@ +resolvtest_LDADD = @RESOLV_LIBS@ @GLIB_LIBS@ all: all-recursive .SUFFIXES: diff -r 9bc3e47b0222 -r 5781ba87df95 src/accept.c --- a/src/accept.c Sat Jan 14 18:44:48 2012 +0100 +++ b/src/accept.c Sat Jan 14 21:36:58 2012 +0100 @@ -375,13 +375,8 @@ /* received from remote */ DEBUG(5) debugf("adding 'Received:' header (5)\n"); hdr = create_header(HEAD_RECEIVED, -#ifdef ENABLE_IDENT - "Received: from %s (ident=%s)\n\tby %s with %s (%s %s)\n\tid %s%s; %s\n", - msg->received_host, msg->ident ? msg->ident : "unknown", -#else "Received: from %s\n\tby %s with %s (%s %s)\n\tid %s%s; %s\n", msg->received_host, -#endif conf.host_name, prot_names[msg->received_prot], PACKAGE, VERSION, msg->uid, for_string ? for_string : "", rec_timestamp()); diff -r 9bc3e47b0222 -r 5781ba87df95 src/base64/Makefile.in --- a/src/base64/Makefile.in Sat Jan 14 18:44:48 2012 +0100 +++ b/src/base64/Makefile.in Sat Jan 14 21:36:58 2012 +0100 @@ -96,7 +96,6 @@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ -IDENT_LIBS = @IDENT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -147,7 +146,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -has_ident = @has_ident@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ diff -r 9bc3e47b0222 -r 5781ba87df95 src/conf.c --- a/src/conf.c Sat Jan 14 18:44:48 2012 +0100 +++ b/src/conf.c Sat Jan 14 21:36:58 2012 +0100 @@ -249,50 +249,6 @@ return iface; } -#ifdef ENABLE_IDENT /* so far used for that only */ -static struct in_addr* -parse_network(gchar *line, gint def_port) -{ - gchar buf[256]; - gchar *p, *q; - struct in_addr addr, mask_addr, net_addr, *p_net_addr; - guint n; - - DEBUG(9) fprintf(stderr, "parse_network: %s\n", line); - - p = line; - q = buf; - while (*p && (*p != '/') && (q < buf + 255)) - *(q++) = *(p++); - *q = '\0'; - - if ((addr.s_addr = inet_addr(buf)) == INADDR_NONE) { - fprintf(stderr, "'%s' is not a valid address (must be ip)\n", buf); - exit(1); - } - - if (*p) { - guint i; - p++; - i = atoi(p); - if ((i >= 0) && (i <= 32)) - n = i ? ~((1 << (32 - i)) - 1) : 0; - else { - fprintf(stderr, "'%d' is not a valid net mask (must be >= 0 and <= 32)\n", i); - exit(1); - } - } else - n = 0; - - mask_addr.s_addr = htonl(n); - net_addr.s_addr = mask_addr.s_addr & addr.s_addr; - - p_net_addr = g_malloc(sizeof(struct in_addr)); - p_net_addr->s_addr = net_addr.s_addr; - return p_net_addr; -} -#endif - static gboolean eat_comments(FILE *in) { @@ -544,20 +500,6 @@ g_free(node->data); } g_list_free(tmp_list); - } else if (strcmp(lval, "ident_trusted_nets") == 0) { -#ifdef ENABLE_IDENT - GList *node; - GList *tmp_list = parse_list(rval, FALSE); - - conf.ident_trusted_nets = NULL; - foreach(tmp_list, node) { - conf.ident_trusted_nets = g_list_append(conf.ident_trusted_nets, parse_network((gchar *) (node->data), 25)); - g_free(node->data); - } - g_list_free(tmp_list); -#else - logwrite(LOG_WARNING, "%s ignored: not compiled with ident support\n", lval); -#endif } else if (strncmp(lval, "query_routes.", 13) == 0) { GList *file_list = parse_list(rval, FALSE); table_pair *pair = create_pair(lval+13, file_list); diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/INSTALL --- a/src/libident/INSTALL Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -To build the libident library for a supported target, just type: - - make - -where target can be one of: - - sunos5, sunos4, svr4, bsd, linux, nextstep3.0 or nextstep3.1 - -For other systems you'll need to hack the Makefile (please do send -me any patches you make so I can include them into the next version!) - - - Peter Eriksson , 18 Oct 1994 - - diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/Makefile.am --- a/src/libident/Makefile.am Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -EXTRA_DIST=README_MASQMAIL - -AM_CFLAGS=@CFLAGS@ -D_GNU_SOURCE -DHAVE_ANSIHEADERS - -noinst_LIBRARIES=libident.a - -libident_a_SOURCES=\ - ident.h\ - ident.c\ - id_open.c\ - id_close.c\ - id_query.c\ - id_parse.c\ - support.c\ - version.c diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/Makefile.in --- a/src/libident/Makefile.in Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,453 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = src/libident -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - INSTALL -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -AR = ar -ARFLAGS = cru -libident_a_AR = $(AR) $(ARFLAGS) -libident_a_LIBADD = -am_libident_a_OBJECTS = ident.$(OBJEXT) id_open.$(OBJEXT) \ - id_close.$(OBJEXT) id_query.$(OBJEXT) id_parse.$(OBJEXT) \ - support.$(OBJEXT) version.$(OBJEXT) -libident_a_OBJECTS = $(am_libident_a_OBJECTS) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libident_a_SOURCES) -DIST_SOURCES = $(libident_a_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BASE64_LIBS = @BASE64_LIBS@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ -GREP = @GREP@ -IDENT_LIBS = @IDENT_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LOCKFILE_LIBS = @LOCKFILE_LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MD5_LIBS = @MD5_LIBS@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -RANLIB = @RANLIB@ -RESOLV_LIBS = @RESOLV_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -USE_LIBLOCKFILE = @USE_LIBLOCKFILE@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -has_ident = @has_ident@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -with_confdir = @with_confdir@ -with_group = @with_group@ -with_logdir = @with_logdir@ -with_spooldir = @with_spooldir@ -with_user = @with_user@ -EXTRA_DIST = README_MASQMAIL -AM_CFLAGS = @CFLAGS@ -D_GNU_SOURCE -DHAVE_ANSIHEADERS -noinst_LIBRARIES = libident.a -libident_a_SOURCES = \ - ident.h\ - ident.c\ - id_open.c\ - id_close.c\ - id_query.c\ - id_parse.c\ - support.c\ - version.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libident/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/libident/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libident.a: $(libident_a_OBJECTS) $(libident_a_DEPENDENCIES) - -rm -f libident.a - $(libident_a_AR) libident.a $(libident_a_OBJECTS) $(libident_a_LIBADD) - $(RANLIB) libident.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id_close.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id_open.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id_parse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id_query.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ident.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LIBRARIES) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ - distclean-generic distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/README --- a/src/libident/README Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -COPYRIGHT ISSUES: - - This version of 'libident' is hereby released into the - Public Domain. It may be distributed for a fee or without - a fee. We only ask you not to pretend you wrote it. - -If you make any changes, please send sources or a diff of it to -us (pen@lysator.liu.se or pell@lysator.liu.se), so we can keep -_one_ unified version of libident available... - - -FTP SITE: - -The official FTP site and location for libident is: - - ftp://ftp.lysator.liu.se/pub/ident/libs - - -COMMENTS: - -This is the second stab at a small library to interface to the Ident -protocol server. Maybe this will work correctly on some machines.. :-) - -The ident-tester.c file is a small daemon (to be started from Inetd) -that does an ident lookup on you if you telnet into it. Can be used -to verify that your Ident server is working correctly. - -I'm currently running this "ident-tester" on port 114 at lysator.liu.se -(130.236.254.1) if you wish to test your server. - -/Peter Eriksson , 1 Aug 1992 - - -This library now contains some higher-level routines, as well as a -similar test program to test these (lookup-tester). - -/Pär Emanuelsson , 4 April 1993 - - -Support for NextStep 3.1 added. - -/Michael Kuch , 13 Aug 1993 - - -Updated the ident.h header file to work with Linux, and reorganized the -Makefile for easier compilation... - -/Peter Eriksson, 18 Oct 1994 - - -Added the copyright notice at the top. - -/Peter Eriksson, 29 Nov 1994 - - -For release 0.18: - -Added some bug fixes and improvements from Jean-Philippe Martin-Flatin -(syj@ecmwf.int). - -/Peter Eriksson, 5 Oct 1995 - - -For release 0.20: - -Some cleanup of the distribution, and some bug fixes in the -ident-tester.c source. Perhaps it should be called 1.0? (Perhaps -it should use GNU Autoconf...) - -/Peter Eriksson, 13 Nov 1996 - - -For release 0.21: - -A couple of minor fixes (mainly support for 2.11BSD). - -/Peter Eriksson, 17 Jan 1997 diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/README_MASQMAIL --- a/src/libident/README_MASQMAIL Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -This is from libident 0.22 (though the version string says 0.21?). I -have not changed it, except that I replaced the Makefile with a -Makefile.am. - -I also did not include the example programs and the man page in the -masqmail source tarball. - -Oliver Kurth, Fri Oct 6 15:11:07 CEST 2000 diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/id_close.c --- a/src/libident/id_close.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -** id_close.c Close a connection to an IDENT server -** -** Author: Peter Eriksson -*/ - -#ifdef NeXT3 -# include -#endif - -#ifdef HAVE_ANSIHEADERS -# include -# include -#endif - -#define IN_LIBIDENT_SRC -#include "ident.h" - -int -id_close __P1(ident_t *, id) -{ - int res; - - res = close(id->fd); - free(id); - - return res; -} diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/id_open.c --- a/src/libident/id_open.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -/* -** id_open.c Establish/initiate a connection to an IDENT server -** -** Author: Peter Eriksson -** Fixes: Pär Emanuelsson -*/ - -#ifdef NeXT3 -# include -#endif - -#include -#include -#include - -#ifdef HAVE_ANSIHEADERS -# include -# include -# include -# if !defined(__sgi) && !defined(VMS) -# define bzero(p,l) memset(p, 0, l) -# endif -#endif - -#include -#include -#include -#include -#include - -#define IN_LIBIDENT_SRC -#include "ident.h" - -#include - -#ifdef _AIX -# include -#endif - - -/* -ident_t *id_open __P3(struct in_addr *, laddr, struct in_addr *, faddr, struct timeval *, timeout) -*/ - -ident_t* -id_open __P((__STRUCT_IN_ADDR_P laddr, __STRUCT_IN_ADDR_P faddr, __STRUCT_TIMEVAL_P timeout)) -{ - ident_t *id; - int res, tmperrno; - struct sockaddr_in sin_laddr, sin_faddr; - fd_set rs, ws, es; -#ifndef OLD_SETSOCKOPT - int on = 1; - struct linger linger; -#endif - - if ((id = (ident_t *) malloc(sizeof(*id))) == 0) - return 0; - - if ((id->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - free(id); - return 0; - } - - if (timeout) { - if ((res = fcntl(id->fd, F_GETFL, 0)) < 0) - goto ERROR; - -#ifndef VMS - if (fcntl(id->fd, F_SETFL, res | FNDELAY) < 0) - goto ERROR; -#endif - } - - /* We silently ignore errors if we can't change LINGER */ -#ifdef OLD_SETSOCKOPT - /* Old style setsockopt() */ - (void) setsockopt(id->fd, SOL_SOCKET, SO_DONTLINGER); - (void) setsockopt(id->fd, SOL_SOCKET, SO_REUSEADDR); -#else - /* New style setsockopt() */ - linger.l_onoff = 0; - linger.l_linger = 0; - - (void) setsockopt(id->fd, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger)); - (void) setsockopt(id->fd, SOL_SOCKET, SO_REUSEADDR, (void *) &on, sizeof(on)); -#endif - - id->buf[0] = '\0'; - - bzero((char *) &sin_laddr, sizeof(sin_laddr)); - sin_laddr.sin_family = AF_INET; - sin_laddr.sin_addr = *laddr; - sin_laddr.sin_port = 0; - - if (bind(id->fd, (struct sockaddr *) &sin_laddr, sizeof(sin_laddr)) < 0) { -#ifdef DEBUG - perror("libident: bind"); -#endif - goto ERROR; - } - - bzero((char *) &sin_faddr, sizeof(sin_faddr)); - sin_faddr.sin_family = AF_INET; - sin_faddr.sin_addr = *faddr; - sin_faddr.sin_port = htons(IDPORT); - - errno = 0; - res = connect(id->fd, (struct sockaddr *) &sin_faddr, sizeof(sin_faddr)); - if (res < 0 && errno != EINPROGRESS) { -#ifdef DEBUG - perror("libident: connect"); -#endif - goto ERROR; - } - - if (timeout) { - FD_ZERO(&rs); - FD_ZERO(&ws); - FD_ZERO(&es); - - FD_SET(id->fd, &rs); - FD_SET(id->fd, &ws); - FD_SET(id->fd, &es); - -#ifdef __hpux - if ((res = select(FD_SETSIZE, (int *) &rs, (int *) &ws, (int *) &es, timeout)) < 0) -#else - if ((res = select(FD_SETSIZE, &rs, &ws, &es, timeout)) < 0) -#endif - { -#ifdef DEBUG - perror("libident: select"); -#endif - goto ERROR; - } - - if (res == 0) { - errno = ETIMEDOUT; - goto ERROR; - } - - if (FD_ISSET(id->fd, &es)) - goto ERROR; - - if (!FD_ISSET(id->fd, &rs) && !FD_ISSET(id->fd, &ws)) - goto ERROR; - } - - return id; - - ERROR: - tmperrno = errno; /* Save, so close() won't erase it */ - close(id->fd); - free(id); - errno = tmperrno; - return 0; -} diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/id_parse.c --- a/src/libident/id_parse.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,215 +0,0 @@ -/* -** id_parse.c Receive and parse a reply from an IDENT server -** -** Author: Peter Eriksson -** Fiddling: Pär Emanuelsson -*/ - -#ifdef NeXT3 -# include -#endif - -#include -#include -#include -#include - -#ifdef HAVE_ANSIHEADERS -# include -# include -# include -#endif - -#include -#include -#include - -#ifdef _AIX -# include -#endif - -#ifdef _AIX -# include -#endif -#ifdef VMS -# include /* for fd_set */ -#endif -#define IN_LIBIDENT_SRC -#include "ident.h" - - -/* -int -id_parse __P7(ident_t *, id, - struct timeval *, timeout, - int *, lport, - int *, fport, - char **, identifier, - char **, opsys, - char **, charset) -*/ - -int -id_parse __P((ident_t * id, - __STRUCT_TIMEVAL_P timeout, - int *lport, - int *fport, - char **identifier, - char **opsys, - char **charset)) -{ - char c, *cp, *tmp_charset; - fd_set rs; - int pos, res = 0, lp, fp; - - errno = 0; - - tmp_charset = 0; - - if (!id) - return -1; - if (lport) - *lport = 0; - if (fport) - *fport = 0; - if (identifier) - *identifier = 0; - if (opsys) - *opsys = 0; - if (charset) - *charset = 0; - - pos = strlen(id->buf); - - if (timeout) { - FD_ZERO(&rs); - FD_SET(id->fd, &rs); - -#ifdef __hpux - if ((res = select(FD_SETSIZE, (int *) &rs, (int *) 0, (int *) 0, timeout)) < 0) -#else - if ((res = select(FD_SETSIZE, &rs, (fd_set *) 0, (fd_set *) 0, timeout)) < 0) -#endif - return -1; - - if (res == 0) { - errno = ETIMEDOUT; - return -1; - } - } - - /* Every octal value is allowed except 0, \n and \r */ - while (pos < sizeof(id->buf) - && (res = read(id->fd, id->buf + pos, 1)) == 1 - && id->buf[pos] != '\n' && id->buf[pos] != '\r') - pos++; - - if (res < 0) - return -1; - - if (res == 0) { - errno = ENOTCONN; - return -1; - } - - if (id->buf[pos] != '\n' && id->buf[pos] != '\r') - return 0; /* Not properly terminated string */ - - id->buf[pos++] = '\0'; - - /* - ** Get first field ( , ) - */ - cp = id_strtok(id->buf, ":", &c); - if (!cp) - return -2; - - if (sscanf(cp, " %d , %d", &lp, &fp) != 2) { - if (identifier) { - *identifier = id_strdup(cp); - if (*identifier == NULL) - return -4; - } - return -2; - } - - if (lport) - *lport = lp; - if (fport) - *fport = fp; - - /* - ** Get second field (USERID or ERROR) - */ - cp = id_strtok((char *) 0, ":", &c); - if (!cp) - return -2; - - if (strcmp(cp, "ERROR") == 0) { - cp = id_strtok((char *) 0, "\n\r", &c); - if (!cp) - return -2; - - if (identifier) { - *identifier = id_strdup(cp); - if (*identifier == NULL) - return -4; - } - - return 2; - } else if (strcmp(cp, "USERID") == 0) { - /* - ** Get first subfield of third field - */ - cp = id_strtok((char *) 0, ",:", &c); - if (!cp) - return -2; - - if (opsys) { - *opsys = id_strdup(cp); - if (*opsys == NULL) - return -4; - } - - /* - ** We have a second subfield () - */ - if (c == ',') { - cp = id_strtok((char *) 0, ":", &c); - if (!cp) - return -2; - - tmp_charset = cp; - if (charset) { - *charset = id_strdup(cp); - if (*charset == NULL) - return -4; - } - - /* - ** We have even more subfields - ignore them - */ - if (c == ',') - id_strtok((char *) 0, ":", &c); - } - - if (tmp_charset && strcmp(tmp_charset, "OCTET") == 0) - cp = id_strtok((char *) 0, (char *) 0, &c); - else - cp = id_strtok((char *) 0, "\n\r", &c); - - if (identifier) { - *identifier = id_strdup(cp); - if (*identifier == NULL) - return -4; - } - return 1; - } else { - if (identifier) { - *identifier = id_strdup(cp); - if (*identifier == NULL) - return -4; - } - return -3; - } -} diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/id_query.c --- a/src/libident/id_query.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -** id_query.c Transmit a query to an IDENT server -** -** Author: Peter Eriksson -*/ - -#ifdef NeXT3 -# include -#endif - -#include -#include -#include - -#ifdef HAVE_ANSIHEADERS -# include -# include -# include -#endif - -#include -#include -#include - -#ifdef _AIX -# include -#endif - -#ifdef _AIX -# include -#endif -#ifdef VMS -# include /* for fd_set */ -#endif -#define IN_LIBIDENT_SRC -#include "ident.h" - - -/* -int -id_query __P4(ident_t *, id, int, lport, int, fport, struct timeval *, timeout) -*/ - -int -id_query __P((ident_t * id, int lport, int fport, __STRUCT_TIMEVAL_P timeout)) -{ -#ifdef SIGRETURNTYPE - SIGRETURNTYPE(*old_sig) (); -#else - void (*old_sig) __P((int)); -#endif - int res; - char buf[80]; - fd_set ws; - - sprintf(buf, "%d , %d\r\n", lport, fport); - - if (timeout) { - FD_ZERO(&ws); - FD_SET(id->fd, &ws); - -#ifdef __hpux - if ((res = select(FD_SETSIZE, (int *) 0, (int *) &ws, (int *) 0, timeout)) < 0) -#else - if ((res = select(FD_SETSIZE, (fd_set *) 0, &ws, (fd_set *) 0, timeout)) < 0) -#endif - return -1; - - if (res == 0) { - errno = ETIMEDOUT; - return -1; - } - } - - old_sig = signal(SIGPIPE, SIG_IGN); - - res = write(id->fd, buf, strlen(buf)); - - signal(SIGPIPE, old_sig); - - return res; -} diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/ident.c --- a/src/libident/ident.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,136 +0,0 @@ -/* -** ident.c High-level calls to the ident lib -** -** Author: Pär Emanuelsson -** Hacked by: Peter Eriksson -*/ - -#ifdef NeXT3 -# include -#endif - -#include - -#ifdef HAVE_ANSIHEADERS -# include -# include -#endif - -#include - -#include -#include - -#define IN_LIBIDENT_SRC -#include "ident.h" - -#include - - - - -/* Do a complete ident query and return result */ - -IDENT* -ident_lookup __P2(int, fd, int, timeout) -{ - struct sockaddr_in localaddr, remoteaddr; - int len; - - len = sizeof(remoteaddr); - if (getpeername(fd, (struct sockaddr *) &remoteaddr, &len) < 0) - return 0; - - len = sizeof(localaddr); - if (getsockname(fd, (struct sockaddr *) &localaddr, &len) < 0) - return 0; - - return ident_query(&localaddr.sin_addr, &remoteaddr.sin_addr, ntohs(localaddr.sin_port), ntohs(remoteaddr.sin_port), timeout); -} - - -IDENT* -ident_query __P5(struct in_addr *, laddr, struct in_addr *, raddr, int, lport, int, rport, int, timeout) -{ - int res; - ident_t *id; - struct timeval timout; - IDENT *ident = 0; - - - timout.tv_sec = timeout; - timout.tv_usec = 0; - - if (timeout) - id = id_open(laddr, raddr, &timout); - else - id = id_open(laddr, raddr, (struct timeval *) 0); - - if (!id) { - errno = EINVAL; - return 0; - } - - if (timeout) - res = id_query(id, rport, lport, &timout); - else - res = id_query(id, rport, lport, (struct timeval *) 0); - - if (res < 0) { - id_close(id); - return 0; - } - - ident = (IDENT *) malloc(sizeof(IDENT)); - if (!ident) { - id_close(id); - return 0; - } - - if (timeout) - res = id_parse(id, &timout, &ident->lport, &ident->fport, &ident->identifier, &ident->opsys, &ident->charset); - else - res = id_parse(id, (struct timeval *) 0, &ident->lport, &ident->fport, &ident->identifier, &ident->opsys, &ident->charset); - - if (res != 1) { - free(ident); - id_close(id); - return 0; - } - - id_close(id); - return ident; /* At last! */ -} - - -char* -ident_id __P2(int, fd, int, timeout) -{ - IDENT *ident; - char *id = 0; - - ident = ident_lookup(fd, timeout); - if (ident && ident->identifier && *ident->identifier) { - id = id_strdup(ident->identifier); - if (id == NULL) - return NULL; - } - - ident_free(ident); - return id; -} - - -void -ident_free __P1(IDENT *, id) -{ - if (!id) - return; - if (id->identifier) - free(id->identifier); - if (id->opsys) - free(id->opsys); - if (id->charset) - free(id->charset); - free(id); -} diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/ident.h --- a/src/libident/ident.h Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -/* -** ident.h -** -** Author: Peter Eriksson -** Intruder: Pär Emanuelsson -*/ - -#ifndef __IDENT_H__ -#define __IDENT_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Sigh */ -#ifdef __STDC__ -# if __STDC__ == 1 -# define IS_STDC 1 -# endif -#endif - -#ifdef __P -# undef __P -#endif - -#ifdef IS_STDC -# define __P(AL) AL - -#ifdef IN_LIBIDENT_SRC - -# define __P1(t1,a1) \ - (t1 a1) - -# define __P2(t1,a1,t2,a2) \ - (t1 a1, t2 a2) - -# define __P3(t1,a1,t2,a2,t3,a3) \ - (t1 a1, t2 a2, t3 a3) - -# define __P4(t1,a1,t2,a2,t3,a3,t4,a4) \ - (t1 a1, t2 a2, t3 a3, t4 a4) - -# define __P5(t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) \ - (t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) - -# define __P7(t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \ - (t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7 a7) -#endif - -#else - -# define __P(AL) () - -#ifdef IN_LIBIDENT_SRC - -# define __P1(t1,a1) (a1) \ - t1 a1; -# define __P2(t1,a1,t2,a2) (a1, a2) \ - t1 a1; \ - t2 a2; -# define __P3(t1,a1,t2,a2,t3,a3) (a1, a2, a3) \ - t1 a1; \ - t2 a2; \ - t3 a3; -# define __P4(t1,a1,t2,a2,t3,a3,t4,a4) (a1, a2, a3, a4) \ - t1 a1; \ - t2 a2; \ - t3 a3; \ - t4 a4; -# define __P5(t1,a1,t2,a2,t3,a3,t4,a4,t5,a5) (a1, a2, a3, a4, a5) \ - t1 a1; \ - t2 a2; \ - t3 a3; \ - t4 a4; \ - t5 a5; -# define __P7(t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7) \ - (a1, a2, a3, a4, a5, a6, a7) \ - t1 a1; \ - t2 a2; \ - t3 a3; \ - t4 a4; \ - t5 a5; \ - t6 a6; \ - t7 a7; -#endif -#endif - -#ifdef IS_STDC -# undef IS_STDC -#endif - -#ifdef _AIX -# include -#endif -#ifdef __sgi -# include -#endif -#include -#include -#include - -#if defined(VMS) && !defined(FD_SETSIZE) -# define FD_SETSIZE 64 -#endif - -/* - * Sigh, GCC v2 complains when using undefined struct tags - * in function prototypes... - */ -#if defined(__GNUC__) && !defined(INADDR_ANY) -# define __STRUCT_IN_ADDR_P void * -#else -# define __STRUCT_IN_ADDR_P struct in_addr * -#endif - -#if defined(__GNUC__) && !defined(DST_NONE) -# define __STRUCT_TIMEVAL_P void * -#else -# define __STRUCT_TIMEVAL_P struct timeval * -#endif - -#if defined(__sgi) && defined(_POSIX_SOURCE) -# undef __STRUCT_TIMEVAL_P -# define __STRUCT_TIMEVAL_P void * -#endif - -#ifndef IDBUFSIZE -# define IDBUFSIZE 2048 -#endif - -#ifndef IDPORT -# define IDPORT 113 -#endif - - typedef struct { - int fd; - char buf[IDBUFSIZE]; - } ident_t; - - typedef struct { - int lport; /* Local port */ - int fport; /* Far (remote) port */ - char *identifier; /* Normally user name */ - char *opsys; /* OS */ - char *charset; /* Charset (what did you expect?) */ - } IDENT; /* For higher-level routines */ - -/* Low-level calls and macros */ -#define id_fileno(ID) ((ID)->fd) - - extern ident_t *id_open __P((__STRUCT_IN_ADDR_P laddr, __STRUCT_IN_ADDR_P faddr, __STRUCT_TIMEVAL_P timeout)); - - extern int id_close __P((ident_t * id)); - - extern int id_query __P((ident_t * id, int lport, int fport, __STRUCT_TIMEVAL_P timeout)); - - extern int id_parse __P((ident_t * id, __STRUCT_TIMEVAL_P timeout, int *lport, int *fport, char **identifier, char **opsys, char **charset)); - -/* High-level calls */ - - extern IDENT *ident_lookup __P((int fd, int timeout)); - - extern char *ident_id __P((int fd, int timeout)); - - extern IDENT *ident_query __P((__STRUCT_IN_ADDR_P laddr, __STRUCT_IN_ADDR_P raddr, int lport, int rport, int timeout)); - - extern void ident_free __P((IDENT * id)); - - extern char id_version[]; - -#ifdef IN_LIBIDENT_SRC - - extern char *id_strdup __P((char *str)); - extern char *id_strtok __P((char *cp, char *cs, char *dc)); - -#endif - -#ifdef __cplusplus -} -#endif -#endif diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/support.c --- a/src/libident/support.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/* -** support.c -** -** Author: Pr Emanuelsson -** Hacked by: Peter Eriksson -*/ -#include -#include - -#ifdef HAVE_ANSIHEADERS -# include -# include -#else -# define strchr(str, c) index(str, c) -#endif - -#define IN_LIBIDENT_SRC -#include "ident.h" - - -char* -id_strdup __P1(char *, str) -{ - char *cp; - - cp = (char *) malloc(strlen(str) + 1); - if (cp == NULL) { -#ifdef DEBUG - perror("libident: malloc"); -#endif - return NULL; - } - - strcpy(cp, str); - - return cp; -} - - -char* -id_strtok __P3(char *, cp, char *, cs, char *, dc) -{ - static char *bp = 0; - - if (cp) - bp = cp; - - /* - ** No delimitor cs - return whole buffer and point at end - */ - if (!cs) { - while (*bp) - bp++; - return cs; - } - - /* - ** Skip leading spaces - */ - while (isspace(*bp)) - bp++; - - /* - ** No token found? - */ - if (!*bp) - return 0; - - cp = bp; - while (*bp && !strchr(cs, *bp)) - bp++; - - /* - ** Remove trailing spaces - */ - *dc = *bp; - for (dc = bp - 1; dc > cp && isspace(*dc); dc--); - *++dc = '\0'; - - bp++; - - return cp; -} diff -r 9bc3e47b0222 -r 5781ba87df95 src/libident/version.c --- a/src/libident/version.c Sat Jan 14 18:44:48 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -char id_version[] = "0.21"; diff -r 9bc3e47b0222 -r 5781ba87df95 src/listen.c --- a/src/listen.c Sat Jan 14 18:44:48 2012 +0100 +++ b/src/listen.c Sat Jan 14 21:36:58 2012 +0100 @@ -57,18 +57,7 @@ gchar *ident = NULL; rem_host = g_strdup(inet_ntoa(sock_addr->sin_addr)); -#ifdef ENABLE_IDENT - { - gchar *id = NULL; - if ((id = (gchar *) ident_id(sock, 60))) { - ident = g_strdup(id); - } - logwrite(LOG_NOTICE, "connect from host %s, port %hd ident=%s\n", rem_host, - ntohs(sock_addr->sin_port), ident ? ident : "(unknown)"); - } -#else logwrite(LOG_NOTICE, "connect from host %s, port %hd\n", rem_host, ntohs(sock_addr->sin_port)); -#endif /* start child for connection: */ signal(SIGCHLD, sigchld_handler); @@ -84,10 +73,6 @@ } else if (pid < 0) { logwrite(LOG_WARNING, "could not fork for incoming smtp connection: %s\n", strerror(errno)); } -#ifdef ENABLE_IDENT - if (ident != NULL) - g_free(ident); -#endif close(sock); close(dup_sock); diff -r 9bc3e47b0222 -r 5781ba87df95 src/masqmail.c --- a/src/masqmail.c Sat Jan 14 18:44:48 2012 +0100 +++ b/src/masqmail.c Sat Jan 14 21:36:58 2012 +0100 @@ -77,26 +77,6 @@ raise(sig); } -#ifdef ENABLE_IDENT /* so far used for that only */ -static gboolean -is_in_netlist(gchar *host, GList *netlist) -{ - guint hostip = inet_addr(host); - struct in_addr addr; - - addr.s_addr = hostip; - if (addr.s_addr != INADDR_NONE) { - GList *node; - foreach(netlist, node) { - struct in_addr *net = (struct in_addr *) (node->data); - if ((addr.s_addr & net->s_addr) == net->s_addr) - return TRUE; - } - } - return FALSE; -} -#endif - /* ** argv: the original argv ** argp: number of arg (may get modified!) @@ -361,12 +341,8 @@ continue; } - if ( (msg->received_host || (msg->received_prot != PROT_LOCAL)) -#ifdef ENABLE_IDENT - && !is_in_netlist(msg->received_host, conf.ident_trusted_nets) -#endif - ) { - fprintf(stderr, "message %s was not received locally or from a trusted network\n", *id); + if (msg->received_host || (msg->received_prot != PROT_LOCAL)) { + fprintf(stderr, "message %s was not received locally\n", *id); continue; } @@ -407,7 +383,6 @@ { gchar *with_resolver = ""; gchar *with_auth = ""; - gchar *with_ident = ""; #ifdef ENABLE_RESOLVER with_resolver = " +resolver"; @@ -415,12 +390,8 @@ #ifdef ENABLE_AUTH with_auth = " +auth"; #endif -#ifdef ENABLE_IDENT - with_ident = " +ident"; -#endif - printf("%s %s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth, - with_ident); + printf("%s %s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth); } void diff -r 9bc3e47b0222 -r 5781ba87df95 src/masqmail.h --- a/src/masqmail.h Sat Jan 14 18:44:48 2012 +0100 +++ b/src/masqmail.h Sat Jan 14 21:36:58 2012 +0100 @@ -41,10 +41,6 @@ #include -#ifdef ENABLE_IDENT -#include "libident/ident.h" -#endif - #include "lookup.h" typedef struct _interface { @@ -152,8 +148,6 @@ gboolean defer_all; gboolean do_relay; - GList *ident_trusted_nets; - gboolean do_queue; gboolean do_verbose; diff -r 9bc3e47b0222 -r 5781ba87df95 src/md5/Makefile.in --- a/src/md5/Makefile.in Sat Jan 14 18:44:48 2012 +0100 +++ b/src/md5/Makefile.in Sat Jan 14 21:36:58 2012 +0100 @@ -92,7 +92,6 @@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ -IDENT_LIBS = @IDENT_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -143,7 +142,6 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ -has_ident = @has_ident@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@