summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/push
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/appl/push')
-rw-r--r--crypto/heimdal/appl/push/ChangeLog29
-rw-r--r--crypto/heimdal/appl/push/Makefile.am6
-rw-r--r--crypto/heimdal/appl/push/Makefile.in354
-rw-r--r--crypto/heimdal/appl/push/pfrom.125
-rw-r--r--crypto/heimdal/appl/push/push.825
-rw-r--r--crypto/heimdal/appl/push/push.c90
6 files changed, 291 insertions, 238 deletions
diff --git a/crypto/heimdal/appl/push/ChangeLog b/crypto/heimdal/appl/push/ChangeLog
index f013090..96a4a70 100644
--- a/crypto/heimdal/appl/push/ChangeLog
+++ b/crypto/heimdal/appl/push/ChangeLog
@@ -1,3 +1,32 @@
+2000-12-31 Assar Westerlund <assar@sics.se>
+
+ * push.c (main): handle krb5_init_context failure consistently
+
+2000-12-26 Assar Westerlund <assar@sics.se>
+
+ * push.c: support several headers, from <mattiasa@e.kth.se> use
+ estrdup, emalloc, erealloc
+
+2000-11-29 Johan Danielsson <joda@pdc.kth.se>
+
+ * pfrom.1: work around bug in grog that makes it think it needs
+ mdoc.old
+
+ * push.8: work around bug in grog that makes it think it needs
+ mdoc.old
+
+2000-11-27 Johan Danielsson <joda@pdc.kth.se>
+
+ * push.c: add space to usage
+
+2000-10-08 Assar Westerlund <assar@sics.se>
+
+ * push.c (doit): check that fds are not too large to select on
+
+2000-03-04 Assar Westerlund <assar@sics.se>
+
+ * add man-page for pfrom
+
1999-12-28 Assar Westerlund <assar@sics.se>
* push.c (main): call k_getportbyname with port number in
diff --git a/crypto/heimdal/appl/push/Makefile.am b/crypto/heimdal/appl/push/Makefile.am
index 07ecd0a..5999ec1 100644
--- a/crypto/heimdal/appl/push/Makefile.am
+++ b/crypto/heimdal/appl/push/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.15 1999/04/09 18:29:48 assar Exp $
+# $Id: Makefile.am,v 1.17 2000/11/15 22:51:09 assar Exp $
include $(top_srcdir)/Makefile.am.common
@@ -14,7 +14,7 @@ pfrom: pfrom.in
sed -e "s!%libexecdir%!$(libexecdir)!" $(srcdir)/pfrom.in > $@
chmod +x $@
-man_MANS = push.8
+man_MANS = push.8 pfrom.1
CLEANFILES = pfrom
@@ -22,6 +22,6 @@ EXTRA_DIST = pfrom.in $(man_MANS)
LDADD = $(LIB_krb5) \
$(LIB_krb4) \
- $(top_builddir)/lib/des/libdes.la \
+ $(LIB_des) \
$(LIB_roken) \
$(LIB_hesiod)
diff --git a/crypto/heimdal/appl/push/Makefile.in b/crypto/heimdal/appl/push/Makefile.in
index 6e9fef1..e677966 100644
--- a/crypto/heimdal/appl/push/Makefile.in
+++ b/crypto/heimdal/appl/push/Makefile.in
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
-# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-9, 2000 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.
@@ -10,15 +10,6 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# $Id: Makefile.am,v 1.15 1999/04/09 18:29:48 assar Exp $
-
-
-# $Id: Makefile.am.common,v 1.3 1999/04/01 14:58:43 joda Exp $
-
-
-# $Id: Makefile.am.common,v 1.13 1999/11/01 03:19:58 assar Exp $
-
-
SHELL = @SHELL@
srcdir = @srcdir@
@@ -40,8 +31,6 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
-DESTDIR =
-
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -54,9 +43,10 @@ AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
@@ -65,26 +55,39 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+
+@SET_MAKE@
host_alias = @host_alias@
host_triplet = @host@
-AFS_EXTRA_LD = @AFS_EXTRA_LD@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
+AMDEP = @AMDEP@
+AMTAR = @AMTAR@
+AS = @AS@
AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
DBLIB = @DBLIB@
+DEPDIR = @DEPDIR@
+DIR_des = @DIR_des@
+DIR_roken = @DIR_roken@
+DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
GROFF = @GROFF@
+INCLUDES_roken = @INCLUDES_roken@
INCLUDE_ = @INCLUDE_@
-LD = @LD@
LEX = @LEX@
LIBOBJS = @LIBOBJS@
LIBTOOL = @LIBTOOL@
LIB_ = @LIB_@
LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@
+LIB_des = @LIB_des@
+LIB_des_appl = @LIB_des_appl@
LIB_kdb = @LIB_kdb@
LIB_otp = @LIB_otp@
LIB_roken = @LIB_roken@
@@ -92,31 +95,43 @@ LIB_security = @LIB_security@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
-MAKE_X_PROGS_BIN_PROGS = @MAKE_X_PROGS_BIN_PROGS@
-MAKE_X_PROGS_BIN_SCRPTS = @MAKE_X_PROGS_BIN_SCRPTS@
-MAKE_X_PROGS_LIBEXEC_PROGS = @MAKE_X_PROGS_LIBEXEC_PROGS@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
-NM = @NM@
NROFF = @NROFF@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
+STRIP = @STRIP@
VERSION = @VERSION@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
YACC = @YACC@
+dpagaix_CFLAGS = @dpagaix_CFLAGS@
+dpagaix_LDADD = @dpagaix_LDADD@
+install_sh = @install_sh@
+
+# $Id: Makefile.am,v 1.17 2000/11/15 22:51:09 assar Exp $
+
+
+# $Id: Makefile.am.common,v 1.3 1999/04/01 14:58:43 joda Exp $
+
+
+# $Id: Makefile.am.common,v 1.23 2000/12/05 09:11:09 joda Exp $
+
AUTOMAKE_OPTIONS = foreign no-dependencies
SUFFIXES = .et .h .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .x
-INCLUDES = -I$(top_builddir)/include $(INCLUDE_krb4) $(INCLUDE_hesiod)
+INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4) $(INCLUDE_hesiod)
AM_CFLAGS = $(WFLAGS)
+CP = cp
+
COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
buildinclude = $(top_builddir)/include
@@ -136,6 +151,7 @@ LIB_getsockopt = @LIB_getsockopt@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
LIB_odm_initialize = @LIB_odm_initialize@
+LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_search = @LIB_res_search@
LIB_setpcred = @LIB_setpcred@
@@ -144,6 +160,8 @@ LIB_socket = @LIB_socket@
LIB_syslog = @LIB_syslog@
LIB_tgetent = @LIB_tgetent@
+LIBS = @LIBS@
+
HESIODLIB = @HESIODLIB@
HESIODINCLUDE = @HESIODINCLUDE@
INCLUDE_hesiod = @INCLUDE_hesiod@
@@ -152,24 +170,20 @@ LIB_hesiod = @LIB_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
LIB_krb4 = @LIB_krb4@
+INCLUDE_openldap = @INCLUDE_openldap@
+LIB_openldap = @LIB_openldap@
+
INCLUDE_readline = @INCLUDE_readline@
LEXLIB = @LEXLIB@
-cat1dir = $(mandir)/cat1
-cat3dir = $(mandir)/cat3
-cat5dir = $(mandir)/cat5
-cat8dir = $(mandir)/cat8
-
-MANRX = \(.*\)\.\([0-9]\)
-CATSUFFIX = @CATSUFFIX@
-
NROFF_MAN = groff -mandoc -Tascii
-@KRB4_TRUE@LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
+@KRB4_TRUE@LIB_kafs = @KRB4_TRUE@$(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
-@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/asn1/libasn1.la
-@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
+@KRB5_TRUE@LIB_krb5 = @KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
+@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
+@KRB5_TRUE@LIB_gssapi = @KRB5_TRUE@$(top_builddir)/lib/gssapi/libgssapi.la
CHECK_LOCAL = $(PROGRAMS)
@@ -179,14 +193,19 @@ libexec_PROGRAMS = push
push_SOURCES = push.c push_locl.h
-man_MANS = push.8
+man_MANS = push.8 pfrom.1
CLEANFILES = pfrom
EXTRA_DIST = pfrom.in $(man_MANS)
-LDADD = $(LIB_krb5) $(LIB_krb4) $(top_builddir)/lib/des/libdes.la $(LIB_roken) $(LIB_hesiod)
+LDADD = $(LIB_krb5) \
+ $(LIB_krb4) \
+ $(LIB_des) \
+ $(LIB_roken) \
+ $(LIB_hesiod)
+subdir = appl/push
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
@@ -197,40 +216,41 @@ PROGRAMS = $(libexec_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I../../include
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
-push_OBJECTS = push.$(OBJEXT)
+am_push_OBJECTS = push.$(OBJEXT)
+push_OBJECTS = $(am_push_OBJECTS)
push_LDADD = $(LDADD)
+@KRB5_FALSE@push_DEPENDENCIES =
@KRB5_TRUE@push_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
-@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
-@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
-@KRB5_FALSE@push_DEPENDENCIES = $(top_builddir)/lib/des/libdes.la
+@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
push_LDFLAGS =
SCRIPTS = $(bin_SCRIPTS)
-CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CFLAGS = @CFLAGS@
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(push_SOURCES)
+man1dir = $(mandir)/man1
man8dir = $(mandir)/man8
MANS = $(man_MANS)
+depcomp =
DIST_COMMON = ChangeLog Makefile.am Makefile.in
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
GZIP_ENV = --best
SOURCES = $(push_SOURCES)
-OBJECTS = $(push_OBJECTS)
+OBJECTS = $(am_push_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .1 .3 .5 .8 .S .c .cat1 .cat3 .cat5 .cat8 .et .h .lo .o .obj .s .x
+.SUFFIXES: .1 .3 .5 .8 .c .cat1 .cat3 .cat5 .cat8 .et .h .lo .o .obj .x
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common
cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/push/Makefile
@@ -253,31 +273,20 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(libexecdir)
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libexecdir)/$$f"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libexecdir)/$$f; \
else :; fi; \
done
uninstall-libexecPROGRAMS:
@$(NORMAL_UNINSTALL)
- list='$(libexec_PROGRAMS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ @list='$(libexec_PROGRAMS)'; for p in $$list; do \
+ f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
+ echo " rm -f $(DESTDIR)$(libexecdir)/$$f"; \
+ rm -f $(DESTDIR)$(libexecdir)/$$f; \
done
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
@@ -289,15 +298,6 @@ distclean-compile:
maintainer-clean-compile:
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
mostlyclean-libtool:
-rm -f *.lo
@@ -316,19 +316,63 @@ install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
if test -f $$p; then \
- echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
- $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
- else if test -f $(srcdir)/$$p; then \
- echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
- $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
- else :; fi; fi; \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \
+ elif test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
- list='$(bin_SCRIPTS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+.c.o:
+ $(COMPILE) -c $<
+.c.obj:
+ $(COMPILE) -c `cygpath -w $<`
+.c.lo:
+ $(LTCOMPILE) -c -o $@ $<
+
+install-man1:
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+
+uninstall-man1:
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
install-man8:
@@ -344,6 +388,7 @@ install-man8:
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
@@ -359,36 +404,41 @@ uninstall-man8:
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
rm -f $(DESTDIR)$(man8dir)/$$inst; \
done
install-man: $(MANS)
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-man8
+ $(MAKE) $(AM_MAKEFLAGS) install-man1 install-man8
uninstall-man:
@$(NORMAL_UNINSTALL)
- $(MAKE) $(AM_MAKEFLAGS) uninstall-man8
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 uninstall-man8
tags: TAGS
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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; } \
END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
+ mkid -fID $$unique $(LISP)
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
+ list='$(SOURCES) $(HEADERS) $(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; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
@@ -401,17 +451,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-subdir = appl/push
-
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
- cp -pr $$/$$file $(distdir)/$$file; \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
else \
test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
@@ -441,10 +490,10 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) all-local
all-redirect: all-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libexecdir) $(DESTDIR)$(bindir) \
- $(DESTDIR)$(mandir)/man8
+ $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man8
mostlyclean-generic:
@@ -457,6 +506,7 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
+ -rm -f Makefile.in
mostlyclean-am: mostlyclean-libexecPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@@ -490,13 +540,13 @@ uninstall-libexecPROGRAMS install-libexecPROGRAMS mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool uninstall-binSCRIPTS install-binSCRIPTS \
-install-man8 uninstall-man8 install-man uninstall-man tags \
-mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
-distdir info-am info dvi-am dvi check-local check check-am \
-installcheck-am installcheck install-exec-am install-exec \
+install-man1 uninstall-man1 install-man8 uninstall-man8 install-man \
+uninstall-man tags mostlyclean-tags distclean-tags clean-tags \
+maintainer-clean-tags distdir info-am info dvi-am dvi check-local check \
+check-am installcheck-am installcheck install-exec-am install-exec \
install-data-local install-data-am install-data install-am install \
-uninstall-am uninstall all-local all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
+uninstall-am uninstall all-local all-redirect all-am all install-strip \
+installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
@@ -505,7 +555,10 @@ install-suid-programs:
for file in $$foo; do \
x=$(DESTDIR)$(bindir)/$$file; \
if chown 0:0 $$x && chmod u+s $$x; then :; else \
- chmod 0 $$x; fi; done
+ echo "*"; \
+ echo "* Failed to install $$x setuid root"; \
+ echo "*"; \
+ fi; done
install-exec-hook: install-suid-programs
@@ -517,8 +570,8 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
else file="$$f"; fi; \
if cmp -s $$file $(buildinclude)/$$f 2> /dev/null ; then \
: ; else \
- echo " cp $$file $(buildinclude)/$$f"; \
- cp $$file $(buildinclude)/$$f; \
+ echo " $(CP) $$file $(buildinclude)/$$f"; \
+ $(CP) $$file $(buildinclude)/$$f; \
fi ; \
done
@@ -587,87 +640,8 @@ dist-cat8-mans:
dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans
-install-cat1-mans:
- @ext=1;\
- foo='$(man1_MANS)'; \
- bar='$(man_MANS)'; \
- for i in $$bar; do \
- case $$i in \
- *.1) foo="$$foo $$i";; \
- esac; done; \
- if test "$$foo"; then \
- $(mkinstalldirs) $(DESTDIR)$(cat1dir); \
- for x in $$foo; do \
- f=`echo $$x | sed 's/\.[^.]*$$/.cat1/'`; \
- if test -f "$(srcdir)/$$f"; then \
- b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
- echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat1dir)/$$b.$(CATSUFFIX)";\
- $(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat1dir)/$$b.$(CATSUFFIX);\
- fi; \
- done ;\
- fi
-
-install-cat3-mans:
- @ext=3;\
- foo='$(man3_MANS)'; \
- bar='$(man_MANS)'; \
- for i in $$bar; do \
- case $$i in \
- *.3) foo="$$foo $$i";; \
- esac; done; \
- if test "$$foo"; then \
- $(mkinstalldirs) $(DESTDIR)$(cat3dir); \
- for x in $$foo; do \
- f=`echo $$x | sed 's/\.[^.]*$$/.cat3/'`; \
- if test -f "$(srcdir)/$$f"; then \
- b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
- echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat3dir)/$$b.$(CATSUFFIX)";\
- $(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat3dir)/$$b.$(CATSUFFIX);\
- fi; \
- done ;\
- fi
-
-install-cat5-mans:
- @ext=5;\
- foo='$(man5_MANS)'; \
- bar='$(man_MANS)'; \
- for i in $$bar; do \
- case $$i in \
- *.5) foo="$$foo $$i";; \
- esac; done; \
- if test "$$foo"; then \
- $(mkinstalldirs) $(DESTDIR)$(cat5dir); \
- for x in $$foo; do \
- f=`echo $$x | sed 's/\.[^.]*$$/.cat5/'`; \
- if test -f "$(srcdir)/$$f"; then \
- b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
- echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat5dir)/$$b.$(CATSUFFIX)";\
- $(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat5dir)/$$b.$(CATSUFFIX);\
- fi; \
- done ;\
- fi
-
-install-cat8-mans:
- @ext=8;\
- foo='$(man8_MANS)'; \
- bar='$(man_MANS)'; \
- for i in $$bar; do \
- case $$i in \
- *.8) foo="$$foo $$i";; \
- esac; done; \
- if test "$$foo"; then \
- $(mkinstalldirs) $(DESTDIR)$(cat8dir); \
- for x in $$foo; do \
- f=`echo $$x | sed 's/\.[^.]*$$/.cat8/'`; \
- if test -f "$(srcdir)/$$f"; then \
- b=`echo $$x | sed 's!$(MANRX)!\1!'`; \
- echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(cat8dir)/$$b.$(CATSUFFIX)";\
- $(INSTALL_DATA) $(srcdir)/$$g $(DESTDIR)$(cat8dir)/$$b.$(CATSUFFIX);\
- fi; \
- done ;\
- fi
-
-install-cat-mans: install-cat1-mans install-cat3-mans install-cat5-mans install-cat8-mans
+install-cat-mans:
+ $(SHELL) $(top_srcdir)/cf/install-catman.sh "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-local: install-cat-mans
diff --git a/crypto/heimdal/appl/push/pfrom.1 b/crypto/heimdal/appl/push/pfrom.1
new file mode 100644
index 0000000..c04d1116c
--- /dev/null
+++ b/crypto/heimdal/appl/push/pfrom.1
@@ -0,0 +1,25 @@
+.\" $Id: pfrom.1,v 1.2 2000/11/29 18:26:27 joda Exp $
+.\"
+.Dd Mars 4, 2000
+.Dt PFROM 1
+.Os HEIMDAL
+.Sh NAME
+.Nm pfrom
+.Nd
+fetch a list of the current mail via POP
+.Sh SYNOPSIS
+.Nm
+.Op Fl 4 | Fl -krb4
+.Op Fl 5 | Fl -krb5
+.Op Fl v | Fl -verbose
+.Op Fl c | -count
+.Op Fl -header
+.Oo Fl p Ar port-spec \*(Ba Xo
+.Fl -port= Ns Ar port-spec
+.Xc
+.Oc
+.Sh DESCRIPTION
+.Nm
+is a script that does push --from.
+.Sh SEE ALSO
+.Xr push 8
diff --git a/crypto/heimdal/appl/push/push.8 b/crypto/heimdal/appl/push/push.8
index d8f4401..363eb92 100644
--- a/crypto/heimdal/appl/push/push.8
+++ b/crypto/heimdal/appl/push/push.8
@@ -1,4 +1,4 @@
-.\" $Id: push.8,v 1.4 1999/12/05 13:00:56 assar Exp $
+.\" $Id: push.8,v 1.8 2001/01/11 16:16:28 assar Exp $
.\"
.Dd May 31, 1998
.Dt PUSH 8
@@ -16,10 +16,11 @@ fetch mail via POP
.Op Fl l | -leave
.Op Fl -from
.Op Fl c | -count
-.Op Fl -header
+.Op Fl -headers= Ns Ar headers
.Oo Fl p Ar port-spec \*(Ba Xo
-.Fl -port= Ns Ar port-spec Oc
+.Fl -port= Ns Ar port-spec
.Xc
+.Oc
.Ar po-box
.Pa filename
.Sh DESCRIPTION
@@ -39,7 +40,7 @@ can have any of the following formats:
.It Ql hostname
.It Ql po:username
.El
-
+.Pp
If no username is specified,
.Nm
assumes that it's the same as on the local machine;
@@ -47,7 +48,7 @@ assumes that it's the same as on the local machine;
defaults to the value of the
.Ev MAILHOST
environment variable.
-
+.Pp
Supported options:
.Bl -tag -width Ds
.It Xo
@@ -80,9 +81,9 @@ behave like from.
.Xc
first print how many messages and bytes there are.
.It Xo
-.Fl -header
+.Fl -headers= Ns Ar headers
.Xc
-which header from should print.
+a list of comma-separated headers that should get printed.
.It Xo
.Fl p Ar port-spec Ns ,
.Fl -port= Ns Ar port-spec
@@ -92,11 +93,10 @@ use this port instead of the default
or
.Ql 1109 .
.El
-
+.Pp
The default is to first try Kerberos 5 authentication and then, if
that fails, Kerberos 4.
.Sh ENVIRONMENT
-
.Bl -tag -width Ds
.It Ev MAILHOST
points to the post office, if no other hostname is specified.
@@ -106,7 +106,7 @@ points to the post office, if no other hostname is specified.
.Bd -literal -offset indent
$ push cornfield:roosta ~/.gnus-crash-box
.Ed
-
+.Pp
tries to fetch mail for the user
.Ar roosta
from the post office at
@@ -117,7 +117,7 @@ and stores the mail in
.Bd -literal -offset indent
$ push --from -5 havregryn
.Ed
-
+.Pp
tries to fetch
.Nm From:
lines for current user at post office
@@ -127,7 +127,8 @@ using Kerberos 5.
.Sh SEE ALSO
.Xr movemail 8 ,
.Xr popper 8 ,
-.Xr from 1
+.Xr from 1 ,
+.Xr pfrom 1
.\".Sh STANDARDS
.Sh HISTORY
.Nm
diff --git a/crypto/heimdal/appl/push/push.c b/crypto/heimdal/appl/push/push.c
index 1689a83..4e9a7d1 100644
--- a/crypto/heimdal/appl/push/push.c
+++ b/crypto/heimdal/appl/push/push.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1999 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997-2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -32,7 +32,7 @@
*/
#include "push_locl.h"
-RCSID("$Id: push.c,v 1.38 1999/12/28 03:46:06 assar Exp $");
+RCSID("$Id: push.c,v 1.43 2000/12/31 07:35:59 assar Exp $");
#ifdef KRB4
static int use_v4 = -1;
@@ -72,7 +72,7 @@ struct getargs args[] = {
"number-or-service" },
{ "from", 0, arg_flag, &do_from, "Behave like from",
NULL },
- { "header", 0, arg_string, &header_str, "Header string to print", NULL },
+ { "headers", 0, arg_string, &header_str, "Headers to print", NULL },
{ "count", 'c', arg_flag, &do_count, "Print number of messages", NULL},
{ "version", 0, arg_flag, &do_version, "Print version",
NULL },
@@ -87,7 +87,7 @@ usage (int ret)
arg_printusage (args,
sizeof(args) / sizeof(args[0]),
NULL,
- "[[{po:username[@hostname] | hostname[:username]}] ...]"
+ "[[{po:username[@hostname] | hostname[:username]}] ...] "
"filename");
exit (ret);
}
@@ -98,7 +98,7 @@ do_connect (const char *hostname, int port, int nodelay)
struct addrinfo *ai, *a;
struct addrinfo hints;
int error;
- int s;
+ int s = -1;
char portstr[NI_MAXSERV];
memset (&hints, 0, sizeof(hints));
@@ -157,9 +157,7 @@ write_state_init (struct write_state *w, int fd)
#endif
w->allociovecs = min(STEP, w->maxiovecs);
w->niovecs = 0;
- w->iovecs = malloc(w->allociovecs * sizeof(*w->iovecs));
- if (w->iovecs == NULL)
- err (1, "malloc");
+ w->iovecs = emalloc(w->allociovecs * sizeof(*w->iovecs));
w->fd = fd;
}
@@ -173,10 +171,8 @@ write_state_add (struct write_state *w, void *v, size_t len)
w->niovecs = 0;
} else {
w->allociovecs = min(w->allociovecs + STEP, w->maxiovecs);
- w->iovecs = realloc (w->iovecs,
- w->allociovecs * sizeof(*w->iovecs));
- if (w->iovecs == NULL)
- errx (1, "realloc");
+ w->iovecs = erealloc (w->iovecs,
+ w->allociovecs * sizeof(*w->iovecs));
}
}
w->iovecs[w->niovecs].iov_base = v;
@@ -225,11 +221,32 @@ doit(int s,
size_t from_line_length;
time_t now;
struct write_state write_state;
+ int numheaders = 1;
+ char **headers = NULL;
+ int i;
+ char *tmp = NULL;
if (do_from) {
+ char *tmp2;
+
+ tmp2 = tmp = estrdup(header_str);
+
out_fd = -1;
if (verbose)
fprintf (stderr, "%s@%s\n", user, host);
+ while (*tmp != '\0') {
+ tmp = strchr(tmp, ',');
+ if (tmp == NULL)
+ break;
+ tmp++;
+ numheaders++;
+ }
+
+ headers = emalloc(sizeof(char *) * (numheaders + 1));
+ for (i = 0; i < numheaders; i++) {
+ headers[i] = strtok_r(tmp2, ",", &tmp2);
+ }
+ headers[numheaders] = NULL;
} else {
out_fd = open(outfilename, O_WRONLY | O_APPEND | O_CREAT, 0666);
if (out_fd < 0)
@@ -258,6 +275,8 @@ doit(int s,
FD_ZERO(&readset);
FD_ZERO(&writeset);
+ if (s >= FD_SETSIZE)
+ errx (1, "fd too large");
FD_SET(s,&readset);
if (((state == STAT || state == RETR || state == TOP)
&& asked_for < count)
@@ -294,12 +313,17 @@ doit(int s,
if (state == TOP) {
char *copy = beg;
- if (strncasecmp(copy,
- header_str,
- min(p - copy + 1, strlen(header_str))) == 0) {
- fprintf (stdout, "%.*s\n", (int)(p - copy), copy);
+ for (i = 0; i < numheaders; i++) {
+ size_t len;
+
+ len = min(p - copy + 1, strlen(headers[i]));
+ if (strncasecmp(copy, headers[i], len) == 0) {
+ fprintf (stdout, "%.*s\n", (int)(p - copy), copy);
+ }
}
if (beg[0] == '.' && beg[1] == '\r' && beg[2] == '\n') {
+ if (numheaders > 1)
+ fprintf (stdout, "\n");
state = STAT;
if (++retrieved == count) {
state = QUIT;
@@ -448,8 +472,12 @@ doit(int s,
}
if (verbose)
fprintf (stderr, "Done\n");
- if (!do_from)
+ if (do_from) {
+ free (tmp);
+ free (headers);
+ } else {
write_state_destroy (&write_state);
+ }
return 0;
}
@@ -570,12 +598,8 @@ hesiod_get_pobox (const char **user)
if (strcasecmp(hpo->hesiod_po_type, "pop") != 0)
errx (1, "Unsupported po type %s", hpo->hesiod_po_type);
- ret = strdup(hpo->hesiod_po_host);
- if(ret == NULL)
- errx (1, "strdup: out of memory");
- *user = strdup(hpo->hesiod_po_name);
- if (*user == NULL)
- errx (1, "strdup: out of memory");
+ ret = estrdup(hpo->hesiod_po_host);
+ *user = estrdup(hpo->hesiod_po_name);
hesiod_free_postoffice (context, hpo);
}
hesiod_end (context);
@@ -597,12 +621,8 @@ hesiod_get_pobox (const char **user)
if (strcasecmp(hpo->po_type, "pop") != 0)
errx (1, "Unsupported po type %s", hpo->po_type);
- ret = strdup(hpo->po_host);
- if(ret == NULL)
- errx (1, "strdup: out of memory");
- *user = strdup(hpo->po_name);
- if (*user == NULL)
- errx (1, "strdup: out of memory");
+ ret = estrdup(hpo->po_host);
+ *user = estrdup(hpo->po_name);
}
return ret;
}
@@ -642,9 +662,7 @@ parse_pobox (char *a0, const char **host, const char **user)
if (pwd == NULL)
errx (1, "Who are you?");
- *user = strdup (pwd->pw_name);
- if (*user == NULL)
- errx (1, "strdup: out of memory");
+ *user = estrdup (pwd->pw_name);
}
*host = get_pobox (user);
return;
@@ -699,7 +717,13 @@ main(int argc, char **argv)
set_progname (argv[0]);
#ifdef KRB5
- krb5_init_context (&context);
+ {
+ krb5_error_code ret;
+
+ ret = krb5_init_context (&context);
+ if (ret)
+ errx (1, "krb5_init_context failed: %d", ret);
+ }
#endif
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
OpenPOWER on IntegriCloud