import of heimdal 0.3e

This commit is contained in:
Assar Westerlund 2001-02-13 16:46:19 +00:00
parent b904de74b0
commit 5e9cd1ae3e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor-crypto/heimdal/dist/; revision=72445
585 changed files with 98414 additions and 32152 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,10 @@
# $Id: Makefile.am,v 1.14 1999/08/12 02:21:43 assar Exp $
# $Id: Makefile.am,v 1.16 2000/11/15 22:54:15 assar Exp $
include $(top_srcdir)/Makefile.am.common
SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc
SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc tools
ACLOCAL = @ACLOCAL@ -I cf
## ACLOCAL = @ACLOCAL@ -I cf
ACLOCAL_AMFLAGS = -I cf
EXTRA_DIST = Makefile.am.common krb5.conf

View file

@ -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.14 1999/08/12 02:21:43 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,21 +31,22 @@ mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
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 = :
@ -63,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@
@ -90,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.16 2000/11/15 22:54:15 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
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
AM_CFLAGS = $(WFLAGS)
CP = cp
COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
buildinclude = $(top_builddir)/include
@ -134,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@
@ -142,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@
@ -150,32 +170,29 @@ 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)
SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc
SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc tools
ACLOCAL = @ACLOCAL@ -I cf
ACLOCAL_AMFLAGS = -I cf
EXTRA_DIST = Makefile.am.common krb5.conf
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ./include/config.h
@ -184,15 +201,16 @@ 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)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = ChangeLog Makefile.am Makefile.in NEWS TODO acinclude.m4 \
aclocal.m4 config.guess config.sub configure configure.in install-sh \
ltconfig ltmain.sh missing mkinstalldirs
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES =
depcomp =
DIST_COMMON = README ChangeLog Makefile.am Makefile.in NEWS TODO \
acconfig.h acinclude.m4 aclocal.m4 config.guess config.sub configure \
configure.in install-sh ltconfig ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
@ -204,8 +222,30 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
$(ACLOCAL_M4): configure.in acinclude.m4 cf/aix.m4 cf/auth-modules.m4 \
cf/broken-getnameinfo.m4 cf/broken-glob.m4 \
cf/broken-realloc.m4 cf/broken-snprintf.m4 cf/broken.m4 \
cf/broken2.m4 cf/c-attribute.m4 cf/c-function.m4 \
cf/capabilities.m4 cf/check-declaration.m4 \
cf/check-getpwnam_r-posix.m4 cf/check-man.m4 \
cf/check-netinet-ip-and-tcp.m4 cf/check-type-extra.m4 \
cf/check-var.m4 cf/check-x.m4 cf/check-xau.m4 cf/db.m4 \
cf/find-func-no-libs.m4 cf/find-func-no-libs2.m4 \
cf/find-func.m4 cf/find-if-not-broken.m4 \
cf/grok-type.m4 cf/have-pragma-weak.m4 \
cf/have-struct-field.m4 cf/have-type.m4 \
cf/have-types.m4 cf/krb-bigendian.m4 cf/krb-find-db.m4 \
cf/krb-func-getcwd-broken.m4 cf/krb-func-getlogin.m4 \
cf/krb-ipv6.m4 cf/krb-irix.m4 cf/krb-prog-ln-s.m4 \
cf/krb-prog-ranlib.m4 cf/krb-prog-yacc.m4 \
cf/krb-readline.m4 cf/krb-struct-spwd.m4 \
cf/krb-struct-winsize.m4 cf/krb-sys-aix.m4 \
cf/krb-sys-nextstep.m4 cf/krb-version.m4 cf/mips-abi.m4 \
cf/misc.m4 cf/need-proto.m4 cf/osfc2.m4 \
cf/proto-compat.m4 cf/retsigtype.m4 cf/roken-frag.m4 \
cf/roken.m4 cf/shared-libs.m4 cf/test-package.m4 \
cf/wflags.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@ -219,8 +259,6 @@ $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCI
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@ -248,7 +286,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@ -269,15 +307,17 @@ tags-recursive:
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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -285,12 +325,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
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:
@ -304,49 +346,65 @@ maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
chmod a-w $(distdir)
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& test `find $$dc_install_base -type f -print | wc -l` -le 1 \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
&& rm -f $(distdir).tar.gz \
&& test `find . -type f -print | wc -l` -eq 0
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@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
for subdir in $(SUBDIRS); do \
@ -354,7 +412,6 @@ distdir: $(DISTFILES)
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
@ -385,7 +442,7 @@ uninstall: uninstall-recursive
all-am: Makefile all-local
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs: installdirs-recursive
installdirs-am:
@ -399,6 +456,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-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
@ -421,19 +479,19 @@ maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
.PHONY: install-recursive uninstall-recursive install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive 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-am installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
all-redirect all-am all install-strip installdirs-am installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-suid-programs:
@ -441,7 +499,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
@ -453,8 +514,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
@ -523,87 +584,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

View file

@ -1,3 +1,142 @@
Changes in release 0.3e
* rcp program included
* fix buffer overrun in ftpd
* handle omitted sequence numbers as zeroes to handle MIT krb5 that
cannot generate zero sequence numbers
* handle v4 /.k files better
* configure/portability fixes
* fixes in parsing of options to kadmin (sub-)commands
* handle errors in kadmin load better
* bug fixes
Changes in release 0.3d
* add krb5-config
* fix a bug in 3des gss-api mechanism, making it compatible with the
specification and the MIT implementation
* make telnetd only allow a specific list of environment variables to
stop it from setting `sensitive' variables
* try to use an existing libdes
* lib/krb5, kdc: use correct usage type for ap-req messages. This
should improve compatability with MIT krb5 when using 3DES
encryption types
* kdc: fix memory allocation problem
* update config.guess and config.sub
* lib/roken: more stuff implemented
* bug fixes and portability enhancements
Changes in release 0.3c
* lib/krb5: memory caches now support the resolve operation
* appl/login: set PATH to some sane default
* kadmind: handle several realms
* bug fixes (including memory leaks)
Changes in release 0.3b
* kdc: prefer default-salted keys on v5 requests
* kdc: lowercase hostnames in v4 mode
* hprop: handle more types of MIT salts
* lib/krb5: fix memory leak
* bug fixes
Changes in release 0.3a:
* implement arcfour-hmac-md5 to interoperate with W2K
* modularise the handling of the master key, and allow for other
encryption types. This makes it easier to import a database from
some other source without having to re-encrypt all keys.
* allow for better control over which encryption types are created
* make kinit fallback to v4 if given a v4 KDC
* make klist work better with v4 and v5, and add some more MIT
compatibility options
* make the kdc listen on the krb524 (4444) port for compatibility
with MIT krb5 clients
* implement more DCE/DFS support, enabled with --enable-dce, see
lib/kdfs and appl/dceutils
* make the sequence numbers work correctly
* bug fixes
Changes in release 0.2t:
* bug fixes
Changes in release 0.2s:
* add OpenLDAP support in hdb
* login will get v4 tickets when it receives forwarded tickets
* xnlock supports both v5 and v4
* repair source routing for telnet
* fix building problems with krb4 (krb_mk_req)
* bug fixes
Changes in release 0.2r:
* fix realloc memory corruption bug in kdc
* `add --key' and `cpw --key' in kadmin
* klist supports listing v4 tickets
* update config.guess and config.sub
* make v4 -> v5 principal name conversion more robust
* support for anonymous tickets
* new man-pages
* telnetd: do not negotiate KERBEROS5 authentication if there's no keytab.
* use and set expiration and not password expiration when dumping
to/from ka server databases / krb4 databases
* make the code happier with 64-bit time_t
* follow RFC2782 and by default do not look for non-underscore SRV names
Changes in release 0.2q:
* bug fix in tcp-handling in kdc
* bug fix in expand_hostname
Changes in release 0.2p:
* bug fix in `kadmin load/merge'

19
crypto/heimdal/README Normal file
View file

@ -0,0 +1,19 @@
$Id: README,v 1.1 2000/07/27 02:33:54 assar Exp $
Heimdal is a Kerberos 5 implementation.
Please see the manual in doc, by default installed in
/usr/heimdal/info/heimdal.info for information on how to install.
There are also briefer man pages for most of the commands.
Bug reports and bugs are appreciated, see more under Bug reports in
the manual on how we prefer them.
For more information see the web-page at
<http://www.pdc.kth.se/heimdal/> or the mailing lists:
heimdal-announce@sics.se low-volume announcement
heimdal-discuss@sics.se high-volume discussion
send a mail to heimdal-announce-request@sics.se and
heimdal-discuss-request@sics.se respectively to subscribe.

View file

@ -1,6 +1,6 @@
-*- indented-text -*-
$Id: TODO,v 1.40 2000/01/28 04:10:56 assar Exp $
$Id: TODO,v 1.55 2001/01/30 22:51:32 assar Exp $
* configure
@ -8,70 +8,58 @@ use more careful checking before starting to use berkeley db. it only
makes sense to do so if we have the appropriate library and the header
file.
handle readline hiding in readline/readline.h
* appl
more programs here
** appl/login
/etc/environment etc.
** appl/popper
Implement RFC1731 and 1734, pop over GSS-API
** appl/test
should test more stuff
** appl/rsh
add rcp program
** appl/ftp
* doc
there's some room for improvement here.
* kdc
* kadmin
make it happy with reading and parsing kdc.conf
is in need of a major cleanup
* kpasswdd
figure out what's the deal with do_sequence and the MIT client
* lib
** lib/asn1
prepend a prefix on all generated symbols
make asn1_compile use enum types where applicable
** lib/auth
PAM
** lib/com_err
write a man-page
** lib/des
make everything work with openssl and make prototypes compatible
** lib/gssapi
process_context_token, display_status, add_cred, inquire_cred_by_mech,
export_sec_context, import_sec_context, inquire_names_for_mech, and
process_context_token, add_cred, inquire_cred_by_mech,
inquire_names_for_mech, and
inquire_mechs_for_name not implemented.
only DES MAC MD5 and DES implemented.
set minor_status in all functions
init_sec_context: `initiator_cred_handle' and `time_req' ignored.
input channel bindings are not supported
delegation not implemented
anonymous credentials not implemented
add rc4
** lib/hdb
** lib/kadm5
@ -88,20 +76,15 @@ using krb5_get_krbhst.
the replay cache is, in its current state, not very useful
the following encryption types have been implemented: DES-CBC-CRC,
DES-CBC-MD4, DES-CBC-MD5, DES3-CBC-MD5, DES3-CBC-SHA1
supports the following checksums: CRC32, RSA-MD4, RSA-MD5,
RSA-MD4-DES, RSA-MD5-DES, RSA-MD5-DES3, SHA1, HMAC-SHA1-DES3
always generates a new subkey in an authenticator
should the sequence numbers be XORed?
fix pre-authentication with pa-afs3-salt
OTP?
** lib/roken
make checksum/encryption type configuration more realm-specific. make
some simple way of handling the w2k situtation
** lib/sl
crypto: allow scather/gather creation of checksums
** lib/roken

View file

@ -13,6 +13,10 @@
#undef HAVE_U_INT16_T
#undef HAVE_U_INT32_T
#undef HAVE_U_INT64_T
#undef HAVE_UINT8_T
#undef HAVE_UINT16_T
#undef HAVE_UINT32_T
#undef HAVE_UINT64_T
#if defined(HAVE_FOUR_VALUED_KRB_PUT_INT) || !defined(KRB4)
#define KRB_PUT_INT(F, T, L, S) krb_put_int((F), (T), (L), (S))

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.30 2000/01/06 08:02:37 assar Exp $
# $Id: Makefile.am,v 1.33 2000/12/16 00:16:45 joda Exp $
include $(top_srcdir)/Makefile.am.common
@ -15,14 +15,12 @@ ktutil_SOURCES = add.c \
ktutil.c \
list.c \
purge.c \
remove.c \
srvconvert.c \
srvcreate.c
remove.c
LDADD = \
$(top_builddir)/lib/kadm5/libkadm5clnt.la \
$(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/sl/libsl.la \
$(LIB_readline) \

View file

@ -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.30 2000/01/06 08:02:37 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.33 2000/12/16 00:16:45 joda 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_readline)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_readline)
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)
@ -177,11 +191,26 @@ man_MANS = ktutil.8
sbin_PROGRAMS = ktutil
ktutil_SOURCES = add.c change.c copy.c get.c ktutil.c list.c purge.c remove.c srvconvert.c srvcreate.c
ktutil_SOURCES = add.c \
change.c \
copy.c \
get.c \
ktutil.c \
list.c \
purge.c \
remove.c
LDADD = $(top_builddir)/lib/kadm5/libkadm5clnt.la $(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/des/libdes.la $(top_builddir)/lib/asn1/libasn1.la $(top_builddir)/lib/sl/libsl.la $(LIB_readline) $(LIB_roken)
LDADD = \
$(top_builddir)/lib/kadm5/libkadm5clnt.la \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/sl/libsl.la \
$(LIB_readline) \
$(LIB_roken)
subdir = admin
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../include/config.h
CONFIG_CLEAN_FILES =
@ -192,39 +221,40 @@ PROGRAMS = $(sbin_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@
ktutil_OBJECTS = add.$(OBJEXT) change.$(OBJEXT) copy.$(OBJEXT) \
am_ktutil_OBJECTS = add.$(OBJEXT) change.$(OBJEXT) copy.$(OBJEXT) \
get.$(OBJEXT) ktutil.$(OBJEXT) list.$(OBJEXT) purge.$(OBJEXT) \
remove.$(OBJEXT) srvconvert.$(OBJEXT) srvcreate.$(OBJEXT)
remove.$(OBJEXT)
ktutil_OBJECTS = $(am_ktutil_OBJECTS)
ktutil_LDADD = $(LDADD)
ktutil_DEPENDENCIES = $(top_builddir)/lib/kadm5/libkadm5clnt.la \
$(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/des/libdes.la \
$(top_builddir)/lib/asn1/libasn1.la $(top_builddir)/lib/sl/libsl.la
$(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/sl/libsl.la
ktutil_LDFLAGS =
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 = $(ktutil_SOURCES)
man8dir = $(mandir)/man8
MANS = $(man_MANS)
depcomp =
DIST_COMMON = 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 = $(ktutil_SOURCES)
OBJECTS = $(ktutil_OBJECTS)
OBJECTS = $(am_ktutil_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 admin/Makefile
@ -247,31 +277,20 @@ install-sbinPROGRAMS: $(sbin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(sbindir)
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`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)$(sbindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/$$f; \
else :; fi; \
done
uninstall-sbinPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(sbin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(sbindir)/$$f"; \
rm -f $(DESTDIR)$(sbindir)/$$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)
@ -283,15 +302,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
@ -305,6 +315,12 @@ maintainer-clean-libtool:
ktutil$(EXEEXT): $(ktutil_OBJECTS) $(ktutil_DEPENDENCIES)
@rm -f ktutil$(EXEEXT)
$(LINK) $(ktutil_LDFLAGS) $(ktutil_OBJECTS) $(ktutil_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
install-man8:
$(mkinstalldirs) $(DESTDIR)$(man8dir)
@ -319,6 +335,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; \
@ -334,6 +351,7 @@ 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; \
@ -347,23 +365,27 @@ uninstall-man:
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:
@ -376,17 +398,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = admin
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
@ -415,7 +436,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(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)$(sbindir) $(DESTDIR)$(mandir)/man8
@ -429,6 +450,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-sbinPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -466,7 +488,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -476,7 +498,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
@ -488,8 +513,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
@ -558,87 +583,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

View file

@ -33,7 +33,7 @@
#include "ktutil_locl.h"
RCSID("$Id: change.c,v 1.1 2000/01/02 04:41:00 assar Exp $");
RCSID("$Id: change.c,v 1.2 2000/06/03 12:24:03 assar Exp $");
static void
change_entry (krb5_context context, krb5_keytab_entry *entry,
@ -158,7 +158,7 @@ kt_change (int argc, char **argv)
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
if(ret){
krb5_warn(context, ret, "krb5_kt_start_seq_get");
krb5_warn(context, ret, "krb5_kt_start_seq_get %s", keytab_string);
return 1;
}

View file

@ -33,17 +33,105 @@
#include "ktutil_locl.h"
RCSID("$Id: copy.c,v 1.1 2000/01/02 04:41:01 assar Exp $");
RCSID("$Id: copy.c,v 1.5 2000/12/16 00:45:29 joda Exp $");
static krb5_boolean
compare_keyblock(const krb5_keyblock *a, const krb5_keyblock *b)
{
if(a->keytype != b->keytype ||
a->keyvalue.length != b->keyvalue.length ||
memcmp(a->keyvalue.data, b->keyvalue.data, a->keyvalue.length) != 0)
return FALSE;
return TRUE;
}
static int
kt_copy_int (const char *from, const char *to)
{
krb5_error_code ret;
krb5_keytab src_keytab, dst_keytab;
krb5_kt_cursor cursor;
krb5_keytab_entry entry, dummy;
ret = krb5_kt_resolve (context, from, &src_keytab);
if (ret) {
krb5_warn (context, ret, "resolving src keytab `%s'", from);
return 0;
}
ret = krb5_kt_resolve (context, to, &dst_keytab);
if (ret) {
krb5_kt_close (context, src_keytab);
krb5_warn (context, ret, "resolving dst keytab `%s'", to);
return 0;
}
ret = krb5_kt_start_seq_get (context, src_keytab, &cursor);
if (ret) {
krb5_warn (context, ret, "krb5_kt_start_seq_get %s", keytab_string);
goto fail;
}
while((ret = krb5_kt_next_entry(context, src_keytab,
&entry, &cursor)) == 0) {
char *name_str;
char *etype_str;
krb5_unparse_name (context, entry.principal, &name_str);
krb5_enctype_to_string(context, entry.keyblock.keytype, &etype_str);
ret = krb5_kt_get_entry(context, dst_keytab,
entry.principal,
entry.vno,
entry.keyblock.keytype,
&dummy);
if(ret == 0) {
/* this entry is already in the new keytab, so no need to
copy it; if the keyblocks are not the same, something
is weird, so complain about that */
if(!compare_keyblock(&entry.keyblock, &dummy.keyblock)) {
krb5_warnx(context, "entry with different keyvalue "
"already exists for %s, keytype %s, kvno %d",
name_str, etype_str, entry.vno);
}
krb5_kt_free_entry(context, &dummy);
krb5_kt_free_entry (context, &entry);
free(name_str);
free(etype_str);
continue;
} else if(ret != KRB5_KT_NOTFOUND) {
krb5_warn(context, ret, "krb5_kt_get_entry(%s)", name_str);
krb5_kt_free_entry (context, &entry);
free(name_str);
free(etype_str);
break;
}
if (verbose_flag)
fprintf (stderr, "copying %s, keytype %s, kvno %d\n", name_str,
etype_str, entry.vno);
ret = krb5_kt_add_entry (context, dst_keytab, &entry);
krb5_kt_free_entry (context, &entry);
if (ret) {
krb5_warn (context, ret, "krb5_kt_add_entry(%s)", name_str);
free(name_str);
free(etype_str);
break;
}
free(name_str);
free(etype_str);
}
krb5_kt_end_seq_get (context, src_keytab, &cursor);
fail:
krb5_kt_close (context, src_keytab);
krb5_kt_close (context, dst_keytab);
return 0;
}
int
kt_copy (int argc, char **argv)
{
krb5_error_code ret;
int help_flag = 0;
int optind = 0;
krb5_keytab src_keytab, dst_keytab;
krb5_kt_cursor cursor;
krb5_keytab_entry entry;
struct getargs args[] = {
{ "help", 'h', arg_flag, NULL}
@ -53,6 +141,7 @@ kt_copy (int argc, char **argv)
int i = 0;
args[i++].value = &help_flag;
args[i++].value = &verbose_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
arg_printusage(args, num_args, "ktutil copy",
@ -74,46 +163,83 @@ kt_copy (int argc, char **argv)
return 0;
}
ret = krb5_kt_resolve (context, argv[0], &src_keytab);
if (ret) {
krb5_warn (context, ret, "resolving src keytab `%s'", argv[0]);
return 0;
}
ret = krb5_kt_resolve (context, argv[1], &dst_keytab);
if (ret) {
krb5_kt_close (context, src_keytab);
krb5_warn (context, ret, "resolving dst keytab `%s'", argv[1]);
return 0;
}
ret = krb5_kt_start_seq_get (context, src_keytab, &cursor);
if (ret) {
krb5_warn (context, ret, "krb5_kt_start_seq_get");
goto fail;
}
while((ret = krb5_kt_next_entry(context, src_keytab,
&entry, &cursor)) == 0) {
ret = krb5_kt_add_entry (context, dst_keytab, &entry);
if (verbose_flag) {
char *name_str;
krb5_unparse_name (context, entry.principal, &name_str);
printf ("copying %s\n", name_str);
free (name_str);
}
krb5_kt_free_entry (context, &entry);
if (ret) {
krb5_warn (context, ret, "krb5_kt_add_entry");
break;
}
}
krb5_kt_end_seq_get (context, src_keytab, &cursor);
fail:
krb5_kt_close (context, src_keytab);
krb5_kt_close (context, dst_keytab);
return 0;
return kt_copy_int(argv[0], argv[1]);
}
#ifndef KEYFILE
#define KEYFILE "/etc/srvtab"
#endif
/* copy to from v4 srvtab, just short for copy */
static int
conv(int srvconv, int argc, char **argv)
{
int help_flag = 0;
char *srvtab = KEYFILE;
int optind = 0;
char kt4[1024], kt5[1024];
char *name;
struct getargs args[] = {
{ "srvtab", 's', arg_string, NULL},
{ "help", 'h', arg_flag, NULL}
};
int num_args = sizeof(args) / sizeof(args[0]);
int i = 0;
args[i++].value = &srvtab;
args[i++].value = &help_flag;
if(srvconv)
name = "ktutil srvconvert";
else
name = "ktutil srvcreate";
if(getarg(args, num_args, argc, argv, &optind)){
arg_printusage(args, num_args, name, "");
return 1;
}
if(help_flag){
arg_printusage(args, num_args, name, "");
return 0;
}
argc -= optind;
argv += optind;
if (argc != 0) {
arg_printusage(args, num_args, name, "");
return 1;
}
snprintf(kt4, sizeof(kt4), "krb4:%s", srvtab);
if(srvconv) {
if(keytab_string != NULL)
return kt_copy_int(kt4, keytab_string);
else {
krb5_kt_default_name(context, kt5, sizeof(kt5));
return kt_copy_int(kt4, kt5);
}
} else {
if(keytab_string != NULL)
return kt_copy_int(keytab_string, kt4);
krb5_kt_default_name(context, kt5, sizeof(kt5));
return kt_copy_int(kt5, kt4);
}
}
int
srvconv(int argc, char **argv)
{
return conv(1, argc, argv);
}
int
srvcreate(int argc, char **argv)
{
return conv(0, argc, argv);
}

View file

@ -33,7 +33,7 @@
#include "ktutil_locl.h"
RCSID("$Id: get.c,v 1.15 2000/01/02 04:41:01 assar Exp $");
RCSID("$Id: get.c,v 1.16 2000/12/31 02:51:43 assar Exp $");
int
kt_get(int argc, char **argv)
@ -131,13 +131,26 @@ kt_get(int argc, char **argv)
if(ret == 0)
created++;
else if(ret != KADM5_DUP) {
krb5_warn(context, ret, "kadm5_create_principal(%s)", argv[i]);
krb5_free_principal(context, princ_ent);
continue;
}
ret = kadm5_randkey_principal(kadm_handle, princ_ent, &keys, &n_keys);
if (ret) {
krb5_warn(context, ret, "kadm5_randkey_principal(%s)", argv[i]);
krb5_free_principal(context, princ_ent);
continue;
}
ret = kadm5_get_principal(kadm_handle, princ_ent, &princ,
KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES);
if (ret) {
krb5_warn(context, ret, "kadm5_get_principal(%s)", argv[i]);
for (j = 0; j < n_keys; j++)
krb5_free_keyblock_contents(context, &keys[j]);
krb5_free_principal(context, princ_ent);
continue;
}
princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX);
mask = KADM5_ATTRIBUTES;
if(created) {
@ -145,6 +158,13 @@ kt_get(int argc, char **argv)
mask |= KADM5_KVNO;
}
ret = kadm5_modify_principal(kadm_handle, &princ, mask);
if (ret) {
krb5_warn(context, ret, "kadm5_modify_principal(%s)", argv[i]);
for (j = 0; j < n_keys; j++)
krb5_free_keyblock_contents(context, &keys[j]);
krb5_free_principal(context, princ_ent);
continue;
}
for(j = 0; j < n_keys; j++) {
entry.principal = princ_ent;
entry.vno = princ.kvno;

View file

@ -1,22 +1,23 @@
.\" $Id: ktutil.8,v 1.6 2000/01/02 05:07:50 assar Exp $
.\" $Id: ktutil.8,v 1.9 2000/12/16 00:58:49 joda Exp $
.\"
.Dd Aug 27, 1997
.Dd December 16, 2000
.Dt KTUTIL 8
.Os HEIMDAL
.Sh NAME
.Nm ktutil
.Ar command
.Nd
handle a keytab
manage Kerberos keytabs
.Sh SYNOPSIS
.Nm
.Op Fl k Ar keytab
.Op Fl -keytab= Ns Ar keytab
.Op Fl v
.Oo Fl k Ar keytab \*(Ba Xo
.Fl -keytab= Ns Ar keytab
.Xc
.Oc
.Op Fl v | Fl -verbose
.Op Fl -version
.Op Fl h
.Op Fl -help
.Ar command
.Op Fl h | Fl -help
.Ar command
.Op Ar args
.Sh DESCRIPTION
.Nm
is a program for managing keytabs.
@ -43,7 +44,7 @@ prompted for.
.Op Fl r Ar realm
.Op Fl -realm= Ns Ar realm
.Op Fl -a Ar host
.Op Fl -admin-server= Ns Ar hots
.Op Fl -admin-server= Ns Ar host
.Op Fl -s Ar port
.Op Fl -server-port= Ns Ar port
.Xc
@ -74,7 +75,10 @@ to
Get a key for
.Nm principal
and store it in a keytab.
.It list
.It list Xo
.Op Fl -keys
.Op Fl -timestamp
.Xc
List the keys stored in the keytab.
.It remove Xo
.Op Fl p Ar principal
@ -94,8 +98,8 @@ removes keys of any type.
.Xc
Removes all old entries (for which there is a newer version) that are
older than
.Ar age
seconds.
.Ar age
(default one week).
.It srvconvert
.It srv2keytab Xo
.Op Fl s Ar srvtab
@ -104,7 +108,13 @@ seconds.
Converts the version 4 srvtab in
.Ar srvtab
to a version 5 keytab and stores it in
.Ar keytab .
.Ar keytab .
Identical to:
.Bd -ragged -offset indent
.Li ktutil copy
.Li krb4: Ns Ar srvtab
.Ar keytab
.Ed
.It srvcreate
.It key2srvtab Xo
.Op Fl s Ar srvtab
@ -114,6 +124,12 @@ Converts the version 5 keytab in
.Ar keytab
to a version 4 srvtab and stores it in
.Ar srvtab .
Identical to:
.Bd -ragged -offset indent
.Li ktutil copy
.Ar keytab
.Li krb4: Ns Ar srvtab
.Ed
.El
.Sh SEE ALSO
.Xr kadmin 8

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,14 +32,17 @@
*/
#include "ktutil_locl.h"
#include <err.h>
RCSID("$Id: ktutil.c,v 1.26 2000/02/07 04:29:25 assar Exp $");
RCSID("$Id: ktutil.c,v 1.30 2001/01/25 12:44:37 assar Exp $");
static int help_flag;
static int version_flag;
int verbose_flag;
char *keytab_string;
static char keytab_buf[256];
static int help(int argc, char **argv);
static SL_cmd cmds[] = {
@ -127,7 +130,9 @@ main(int argc, char **argv)
int optind = 0;
krb5_error_code ret;
set_progname(argv[0]);
krb5_init_context(&context);
ret = krb5_init_context(&context);
if (ret)
errx (1, "krb5_init_context failed: %d", ret);
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
if(help_flag)
@ -143,6 +148,10 @@ main(int argc, char **argv)
if(keytab_string) {
ret = krb5_kt_resolve(context, keytab_string, &keytab);
} else {
if(krb5_kt_default_name (context, keytab_buf, sizeof(keytab_buf)))
strlcpy (keytab_buf, "unknown", sizeof(keytab_buf));
keytab_string = keytab_buf;
ret = krb5_kt_default(context, &keytab);
}
if(ret)

View file

@ -32,7 +32,7 @@
*/
/*
* $Id: ktutil_locl.h,v 1.11 2000/02/07 04:26:37 assar Exp $
* $Id: ktutil_locl.h,v 1.12 2000/07/19 13:58:19 assar Exp $
*/
#ifndef __KTUTIL_LOCL_H__
@ -51,6 +51,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <parse_time.h>
#include <roken.h>
#include <des.h>

View file

@ -33,7 +33,28 @@
#include "ktutil_locl.h"
RCSID("$Id: list.c,v 1.1 2000/01/02 04:41:02 assar Exp $");
RCSID("$Id: list.c,v 1.3 2000/06/29 08:21:40 joda Exp $");
static int help_flag;
static int list_keys;
static int list_timestamp;
static struct getargs args[] = {
{ "help", 'h', arg_flag, &help_flag },
{ "keys", 0, arg_flag, &list_keys, "show key value" },
{ "timestamp", 0, arg_flag, &list_timestamp, "show timestamp" },
};
static int num_args = sizeof(args) / sizeof(args[0]);
struct key_info {
char *version;
char *etype;
char *principal;
char *timestamp;
char *key;
struct key_info *next;
};
int
kt_list(int argc, char **argv)
@ -41,43 +62,102 @@ kt_list(int argc, char **argv)
krb5_error_code ret;
krb5_kt_cursor cursor;
krb5_keytab_entry entry;
int optind = 0;
struct key_info *ki, **kie = &ki, *kp;
int max_version = sizeof("Vno") - 1;
int max_etype = sizeof("Type") - 1;
int max_principal = sizeof("Principal") - 1;
int max_timestamp = sizeof("Date") - 1;
int max_key = sizeof("Key") - 1;
if(verbose_flag)
list_timestamp = 1;
if(getarg(args, num_args, argc, argv, &optind)){
arg_printusage(args, num_args, "ktutil list", "");
return 1;
}
if(help_flag){
arg_printusage(args, num_args, "ktutil list", "");
return 0;
}
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
if(ret){
krb5_warn(context, ret, "krb5_kt_start_seq_get");
krb5_warn(context, ret, "krb5_kt_start_seq_get %s", keytab_string);
return 1;
}
printf("%s", "Version");
printf(" ");
printf("%-15s", "Type");
printf(" ");
printf("%s", "Principal");
printf("\n");
while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){
char *p;
printf(" %3d ", entry.vno);
printf(" ");
ret = krb5_enctype_to_string(context, entry.keyblock.keytype, &p);
if (ret != 0)
asprintf(&p, "unknown (%d)", entry.keyblock.keytype);
printf("%-15s", p);
free(p);
printf(" ");
krb5_unparse_name(context, entry.principal, &p);
printf("%s ", p);
free(p);
printf("\n");
if (verbose_flag) {
char tstamp[256];
struct tm *tm;
time_t ts = entry.timestamp;
#define CHECK_MAX(F) if(max_##F < strlen(kp->F)) max_##F = strlen(kp->F)
tm = gmtime (&ts);
strftime (tstamp, sizeof(tstamp), "%Y-%m-%d %H:%M:%S UTC", tm);
printf(" Timestamp: %s\n", tstamp);
kp = malloc(sizeof(*kp));
asprintf(&kp->version, "%d", entry.vno);
CHECK_MAX(version);
ret = krb5_enctype_to_string(context,
entry.keyblock.keytype, &kp->etype);
if (ret != 0)
asprintf(&kp->etype, "unknown (%d)", entry.keyblock.keytype);
CHECK_MAX(etype);
krb5_unparse_name_short(context, entry.principal, &kp->principal);
CHECK_MAX(principal);
if (list_timestamp) {
char tstamp[256];
krb5_format_time(context, entry.timestamp,
tstamp, sizeof(tstamp), FALSE);
kp->timestamp = strdup(tstamp);
CHECK_MAX(timestamp);
}
if(list_keys) {
int i;
kp->key = malloc(2 * entry.keyblock.keyvalue.length + 1);
for(i = 0; i < entry.keyblock.keyvalue.length; i++)
snprintf(kp->key + 2 * i, 3, "%02x",
((unsigned char*)entry.keyblock.keyvalue.data)[i]);
CHECK_MAX(key);
}
kp->next = NULL;
*kie = kp;
kie = &kp->next;
krb5_kt_free_entry(context, &entry);
}
ret = krb5_kt_end_seq_get(context, keytab, &cursor);
printf("%-*s %-*s %-*s", max_version, "Vno",
max_etype, "Type",
max_principal, "Principal");
if(list_timestamp)
printf(" %-*s", max_timestamp, "Date");
if(list_keys)
printf(" %s", "Key");
printf("\n");
for(kp = ki; kp; ) {
printf("%*s %-*s %-*s", max_version, kp->version,
max_etype, kp->etype,
max_principal, kp->principal);
if(list_timestamp)
printf(" %-*s", max_timestamp, kp->timestamp);
if(list_keys)
printf(" %s", kp->key);
printf("\n");
/* free entries */
free(kp->version);
free(kp->etype);
free(kp->principal);
if(list_timestamp)
free(kp->timestamp);
if(list_keys) {
memset(kp->key, 0, strlen(kp->key));
free(kp->key);
}
ki = kp;
kp = kp->next;
free(ki);
}
return 0;
}

View file

@ -33,7 +33,7 @@
#include "ktutil_locl.h"
RCSID("$Id: purge.c,v 1.1 2000/01/02 05:06:50 assar Exp $");
RCSID("$Id: purge.c,v 1.3 2000/06/29 08:31:47 joda Exp $");
/*
* keep track of the highest version for every principal.
@ -101,9 +101,10 @@ kt_purge(int argc, char **argv)
krb5_kt_cursor cursor;
krb5_keytab_entry entry;
int help_flag = 0;
int age = 7 * 24 * 60 * 60;
char *age_str = "1 week";
int age;
struct getargs args[] = {
{ "age", 0, arg_integer, NULL, "age to retire" },
{ "age", 0, arg_string, NULL, "age to retire" },
{ "help", 'h', arg_flag, NULL }
};
int num_args = sizeof(args) / sizeof(args[0]);
@ -112,7 +113,7 @@ kt_purge(int argc, char **argv)
struct e *head = NULL;
time_t judgement_day;
args[i++].value = &age;
args[i++].value = &age_str;
args[i++].value = &help_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
@ -124,9 +125,15 @@ kt_purge(int argc, char **argv)
return 0;
}
age = parse_time(age_str, "s");
if(age < 0) {
krb5_warnx(context, "unparasable time `%s'", age_str);
return 0;
}
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
if(ret){
krb5_warn(context, ret, "krb5_kt_start_seq_get");
krb5_warn(context, ret, "krb5_kt_start_seq_get %s", keytab_string);
return 1;
}
@ -140,7 +147,7 @@ kt_purge(int argc, char **argv)
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
if(ret){
krb5_warn(context, ret, "krb5_kt_start_seq_get");
krb5_warn(context, ret, "krb5_kt_start_seq_get, %s", keytab_string);
return 1;
}

View file

@ -1,10 +1,13 @@
# $Id: Makefile.am,v 1.19 1999/10/17 10:51:26 assar Exp $
# $Id: Makefile.am,v 1.24 2001/01/27 18:34:39 assar Exp $
include $(top_srcdir)/Makefile.am.common
if OTP
dir_otp = otp
endif
if DCE
dir_dce = dceutils
endif
SUBDIRS = \
afsutil \
ftp \
@ -13,10 +16,11 @@ SUBDIRS = \
popper \
push \
rsh \
rcp \
su \
xnlock \
telnet \
test \
kx \
kf \
# kauth
$(dir_dce)

View file

@ -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.19 1999/10/17 10:51:26 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.24 2001/01/27 18:34:39 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
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
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,30 +170,43 @@ 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)
@OTP_TRUE@dir_otp = otp
SUBDIRS = afsutil ftp login $(dir_otp) popper push rsh su xnlock telnet test kx kf # kauth
@OTP_TRUE@dir_otp = @OTP_TRUE@otp
@DCE_TRUE@dir_dce = @DCE_TRUE@dceutils
SUBDIRS = \
afsutil \
ftp \
login \
$(dir_otp) \
popper \
push \
rsh \
rcp \
su \
xnlock \
telnet \
test \
kx \
kf \
$(dir_dce)
subdir = appl
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../include/config.h
CONFIG_CLEAN_FILES =
@ -183,16 +214,17 @@ 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)
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 =
depcomp =
DIST_COMMON = 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
DIST_SUBDIRS = afsutil ftp login otp popper push rsh su xnlock telnet \
test kx kf
DIST_SUBDIRS = afsutil ftp login otp popper push rsh rcp su xnlock \
telnet test kx kf dceutils
all: all-redirect
.SUFFIXES:
.SUFFIXES: .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .et .h .x
@ -211,8 +243,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@ -240,7 +270,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@ -261,15 +291,17 @@ tags-recursive:
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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -277,12 +309,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
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:
@ -295,17 +329,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl
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
for subdir in $(DIST_SUBDIRS); do \
@ -313,7 +346,6 @@ distdir: $(DISTFILES)
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
@ -344,7 +376,7 @@ uninstall: uninstall-recursive
all-am: Makefile all-local
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs: installdirs-recursive
installdirs-am:
@ -358,6 +390,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-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
@ -378,19 +411,19 @@ maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
maintainer-clean: maintainer-clean-recursive
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
.PHONY: install-recursive uninstall-recursive install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive 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-am installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
all-redirect all-am all install-strip installdirs-am installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-suid-programs:
@ -398,7 +431,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
@ -410,8 +446,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
@ -480,87 +516,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

View file

@ -1,3 +1,11 @@
2000-12-31 Assar Westerlund <assar@sics.se>
* afslog.c (main): handle krb5_init_context failure consistently
2000-12-25 Assar Westerlund <assar@sics.se>
* afslog.c: clarify usage strings
1999-08-04 Assar Westerlund <assar@sics.se>
* pagsh.c (main): use mkstemp to generate temporary file names.

View file

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.11 1999/06/27 00:45:26 assar Exp $
# $Id: Makefile.am,v 1.12 2000/11/15 22:51:07 assar Exp $
include $(top_srcdir)/Makefile.am.common
@ -17,5 +17,5 @@ LDADD = $(LIB_kafs) \
$(LIB_krb4) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(LIB_roken)

View file

@ -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.11 1999/06/27 00:45:26 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.12 2000/11/15 22:51:07 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)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
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,90 +170,90 @@ 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)
@KRB4_TRUE@AFSPROGS = afslog pagsh
@KRB4_TRUE@AFSPROGS = @KRB4_TRUE@afslog pagsh
bin_PROGRAMS = $(AFSPROGS)
afslog_SOURCES = afslog.c
pagsh_SOURCES = pagsh.c
LDADD = $(LIB_kafs) $(LIB_krb4) $(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/asn1/libasn1.la $(top_builddir)/lib/des/libdes.la $(LIB_roken)
LDADD = $(LIB_kafs) \
$(LIB_krb4) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_des) \
$(LIB_roken)
subdir = appl/afsutil
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
@KRB4_TRUE@bin_PROGRAMS = afslog$(EXEEXT) pagsh$(EXEEXT)
@KRB4_FALSE@bin_PROGRAMS =
@KRB4_TRUE@bin_PROGRAMS = afslog$(EXEEXT) pagsh$(EXEEXT)
PROGRAMS = $(bin_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@
afslog_OBJECTS = afslog.$(OBJEXT)
am_afslog_OBJECTS = afslog.$(OBJEXT)
afslog_OBJECTS = $(am_afslog_OBJECTS)
afslog_LDADD = $(LDADD)
@KRB4_FALSE@afslog_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@afslog_DEPENDENCIES = $(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@afslog_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_TRUE@$(top_builddir)/lib/asn1/libasn1.la
afslog_LDFLAGS =
pagsh_OBJECTS = pagsh.$(OBJEXT)
am_pagsh_OBJECTS = pagsh.$(OBJEXT)
pagsh_OBJECTS = $(am_pagsh_OBJECTS)
pagsh_LDADD = $(LDADD)
@KRB4_FALSE@pagsh_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@pagsh_DEPENDENCIES = $(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@pagsh_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_TRUE@$(top_builddir)/lib/asn1/libasn1.la
pagsh_LDFLAGS =
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 = $(afslog_SOURCES) $(pagsh_SOURCES)
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 = $(afslog_SOURCES) $(pagsh_SOURCES)
OBJECTS = $(afslog_OBJECTS) $(pagsh_OBJECTS)
OBJECTS = $(am_afslog_OBJECTS) $(am_pagsh_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/afsutil/Makefile
@ -258,31 +276,20 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`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)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$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)
@ -294,15 +301,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
@ -320,26 +318,36 @@ afslog$(EXEEXT): $(afslog_OBJECTS) $(afslog_DEPENDENCIES)
pagsh$(EXEEXT): $(pagsh_OBJECTS) $(pagsh_DEPENDENCIES)
@rm -f pagsh$(EXEEXT)
$(LINK) $(pagsh_LDFLAGS) $(pagsh_OBJECTS) $(pagsh_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
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:
@ -352,17 +360,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/afsutil
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
@ -391,7 +398,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) 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)$(bindir)
@ -405,6 +412,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-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -440,7 +448,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -450,7 +458,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
@ -462,8 +473,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
@ -532,87 +543,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

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1999 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,14 +33,14 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: afslog.c,v 1.11 1999/07/04 23:50:39 assar Exp $");
RCSID("$Id: afslog.c,v 1.14 2001/01/25 12:44:46 assar Exp $");
#endif
#include <ctype.h>
#include <krb5.h>
#include <kafs.h>
#include <roken.h>
#include <getarg.h>
#include <err.h>
static int help_flag;
static int version_flag;
@ -54,8 +54,8 @@ static int unlog_flag;
static int verbose;
struct getargs args[] = {
{ "cell", 'c', arg_strings, &cells, "cell to get tokens for", "cell" },
{ "file", 'p', arg_strings, &files, "file to get tokens for", "path" },
{ "cell", 'c', arg_strings, &cells, "cells to get tokens for", "cells" },
{ "file", 'p', arg_strings, &files, "files to get tokens for", "paths" },
{ "realm", 'k', arg_string, &realm, "realm for afs cell", "realm" },
{ "unlog", 'u', arg_flag, &unlog_flag, "remove tokens" },
#if 0
@ -190,7 +190,9 @@ main(int argc, char **argv)
exit(0);
}
krb5_init_context(&context);
ret = krb5_init_context(&context);
if (ret)
errx (1, "krb5_init_context failed: %d", ret);
if(!k_hasafs())
krb5_errx(context, 1,
"AFS doesn't seem to be present on this machine");

View file

@ -35,7 +35,7 @@
#include <config.h>
#endif
RCSID("$Id: pagsh.c,v 1.3 1999/12/02 17:04:55 joda Exp $");
RCSID("$Id: pagsh.c,v 1.4 2000/10/02 05:05:53 assar Exp $");
#include <stdio.h>
#include <stdlib.h>
@ -83,7 +83,7 @@ main(int argc, char **argv)
f = mkstemp (tf + 5);
close (f);
unlink (tf + 5);
setenv("KRB5CCNAME", tf, 1);
esetenv("KRB5CCNAME", tf, 1);
#endif
#ifdef KRB4
@ -91,7 +91,7 @@ main(int argc, char **argv)
f = mkstemp (tf);
close (f);
unlink (tf);
setenv("KRBTKFILE", tf, 1);
esetenv("KRBTKFILE", tf, 1);
#endif
i = 0;

View file

@ -1,3 +1,156 @@
2001-02-05 Assar Westerlund <assar@sics.se>
* ftpd/popen.c (ftpd_popen): avoid overwriting the bounds of argv
and gargv
2001-01-30 Assar Westerlund <assar@sics.se>
* ftpd/gss_userok.c: use gss_krb5_copy_ccache
2001-01-29 Assar Westerlund <assar@sics.se>
* ftpd/Makefile.am: move up LIB_otp so we do not end up picking
one from /usr/athena
2001-01-25 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ls.c: fix bug in previous; make it easier to build test
version
2001-01-19 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ls.c (lstat_file): handle case where file lives in `/'
2001-01-18 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.c (pasv): close already open passive port
2000-12-14 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ls.c: reverse time and size sort order (pointed out by
tege)
2000-12-11 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.c: make it possible to set list of good filename
characters from command line
2000-12-10 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.c: some spec-violating mirror software assumes that
you can do things like `LIST -CF'; don't pass `--' to ls so this
actually works
* ftpd/ls.c: implement -1CFx flags
2000-12-08 Assar Westerlund <assar@sics.se>
* ftpd/gss_userok.c (gss_userok): handle getpwnam failing
* ftp/gssapi.c (gss_auth): be more explicit in error message
2000-11-29 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.8: close list
2000-11-15 Assar Westerlund <assar@sics.se>
* ftp/main.c: add `-l' for no line-editing
* ftp/globals.c (readline): add
* ftp/ftp_var.h (lineedit): add variable indicated if we should
use readline
2000-11-09 Johan Danielsson <joda@pdc.kth.se>
* ftp/security.c (sec_read): fix bug in previous (from Jacques A.
Vidrine <n@nectar.com>)
2000-11-05 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpcmd.y: only allow pasv if logged in
2000-10-23 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.c: change bad filename message slightly
* common/buffer.c: HAVE_ST_BLKSIZE -> HAVE_STRUCT_STAT_ST_BLKSIZE
2000-10-08 Assar Westerlund <assar@sics.se>
* ftp/ftp.c (*): check that fds are not too large to select on
* ftp/main.c (cmdscanner): print a newline upon EOF
2000-09-19 Assar Westerlund <assar@sics.se>
* ftp/security.h: add some attributes to prototypes of sec*
* ftp/extern.h (command): add attributes
2000-08-31 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.c: change redundant password message to something
people can understand
2000-07-27 Assar Westerlund <assar@sics.se>
* ftpd/gss_userok.c (gss_userok): only do AFS iff KRB4
* ftpd/ftpd.c (krb5_verify): only do AFS stuff if KRB4
2000-07-07 Assar Westerlund <assar@sics.se>
* ftpd/ftpd.c: do not call setproctitle with a variable as the
format string
2000-07-01 Assar Westerlund <assar@sics.se>
* ftpd/ftpd_locl.h: krb5.h before kafs.h
* ftpd/ftpd.c (krb5_verify): static-ize
* ftpd/ftpd.c (krb5_verify): conditionalize on KRB5
2000-06-21 Assar Westerlund <assar@sics.se>
* ftpd: support for authenticating passwords with krb5, by Daniel
Kouril <kouril@ics.muni.cz>
2000-06-06 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpcmd.y: change unix test to be negative
2000-05-18 Assar Westerlund <assar@sics.se>
* ftpd/ftpd.c (args): should use `debug'. From Onno van der
Linden <onno@simplex.nl>.
2000-04-25 Assar Westerlund <assar@sics.se>
* ftp/ftp.c (login): re-structure code so that we prompt for
password for ftp/anonymous
2000-04-11 Assar Westerlund <assar@sics.se>
* ftp/ftp.c (login): initialize tmp before calling fgets
2000-04-02 Assar Westerlund <assar@sics.se>
* ftpd/ls.c: rename all st_mtime variables to avoid conflict with
#define.
* ftpd/ftpcmd.y: rename all st_mtime variables to avoid conflict
with #define.
* ftp/cmds.c: rename all st_mtime variables to avoid conflict with
#define.
2000-03-26 Assar Westerlund <assar@sics.se>
* ftpd/ls.c, ftpd/ftpcmd.y, ftp/cmds.c: make sure to always call
time, ctime, and gmtime with `time_t's. there were some types
(like in lastlog) that we believed to always be time_t. this has
proven wrong on Solaris 8 in 64-bit mode, where they are stored as
32-bit quantities but time_t has gone up to 64 bits
2000-03-09 Johan Danielsson <joda@pdc.kth.se>
* call list_file for broken usages of nlst too
* ftpd/ftpd.c: call list_file for broken usages of nlst too
2000-02-07 Assar Westerlund <assar@sics.se>
* ftp/security.c (sec_read): more paranoia with return value from

View file

@ -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.5 1999/03/20 13:58:14 joda 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.5 1999/03/20 13:58:14 joda 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
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
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,28 +170,25 @@ 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)
SUBDIRS = common ftp ftpd
subdir = appl/ftp
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
@ -181,13 +196,14 @@ 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)
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 =
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
all: all-redirect
.SUFFIXES:
@ -207,8 +223,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@ -236,7 +250,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@ -257,15 +271,17 @@ tags-recursive:
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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -273,12 +289,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
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:
@ -291,17 +309,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/ftp
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
for subdir in $(SUBDIRS); do \
@ -309,7 +326,6 @@ distdir: $(DISTFILES)
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
@ -340,7 +356,7 @@ uninstall: uninstall-recursive
all-am: Makefile all-local
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs: installdirs-recursive
installdirs-am:
@ -354,6 +370,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-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
@ -374,19 +391,19 @@ maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
maintainer-clean: maintainer-clean-recursive
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
.PHONY: install-recursive uninstall-recursive install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive 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-am installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
all-redirect all-am all install-strip installdirs-am installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-suid-programs:
@ -394,7 +411,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
@ -406,8 +426,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
@ -476,87 +496,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

View file

@ -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.9 1999/07/28 21:15:06 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.9 1999/07/28 21:15:06 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)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
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,31 +170,31 @@ 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)
noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = sockbuf.c buffer.c common.h
libcommon_a_SOURCES = \
sockbuf.c \
buffer.c \
common.h
subdir = appl/ftp/common
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../../include/config.h
CONFIG_CLEAN_FILES =
@ -186,32 +204,34 @@ LIBRARIES = $(noinst_LIBRARIES)
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@
libcommon_a_AR = $(AR) cru
libcommon_a_LIBADD =
libcommon_a_OBJECTS = sockbuf.$(OBJEXT) buffer.$(OBJEXT)
am_libcommon_a_OBJECTS = sockbuf.$(OBJEXT) buffer.$(OBJEXT)
libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS)
AR = ar
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 = $(libcommon_a_SOURCES)
depcomp =
DIST_COMMON = 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 = $(libcommon_a_SOURCES)
OBJECTS = $(libcommon_a_OBJECTS)
OBJECTS = $(am_libcommon_a_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/ftp/common/Makefile
@ -229,20 +249,6 @@ distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.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)
@ -254,15 +260,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
@ -275,28 +272,38 @@ maintainer-clean-libtool:
libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES)
-rm -f libcommon.a
$(AR) cru libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD)
$(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD)
$(RANLIB) libcommon.a
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
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:
@ -309,17 +316,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/ftp/common
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
@ -348,7 +354,7 @@ uninstall: uninstall-am
all-am: Makefile $(LIBRARIES) 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:
@ -361,6 +367,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-noinstLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -397,7 +404,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -407,7 +414,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
@ -419,8 +429,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
@ -489,87 +499,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

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
* Copyright (c) 1995-2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -36,7 +36,7 @@
#include <err.h>
#include "roken.h"
RCSID("$Id: buffer.c,v 1.3 1999/12/02 16:58:29 joda Exp $");
RCSID("$Id: buffer.c,v 1.4 2000/10/23 04:49:25 joda Exp $");
/*
* Allocate a buffer enough to handle st->st_blksize, if
@ -49,7 +49,7 @@ alloc_buffer (void *oldbuf, size_t *sz, struct stat *st)
size_t new_sz;
new_sz = BUFSIZ;
#ifdef HAVE_ST_BLKSIZE
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
if (st)
new_sz = max(BUFSIZ, st->st_blksize);
#endif

View file

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.13 2000/01/06 15:11:43 assar Exp $
# $Id: Makefile.am,v 1.14 2000/11/15 22:51:07 assar Exp $
include $(top_srcdir)/Makefile.am.common
@ -41,6 +41,6 @@ LDADD = \
$(LIB_gssapi) \
$(LIB_krb5) \
$(LIB_krb4) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(LIB_roken) \
$(LIB_readline)

View file

@ -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.13 2000/01/06 15:11:43 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.14 2000/11/15 22:51:07 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 -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4)
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,41 +170,60 @@ 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 =
bin_PROGRAMS = ftp
@KRB4_TRUE@krb4_sources = krb4.c kauth.c
@KRB5_TRUE@krb5_sources = gssapi.c
@KRB4_TRUE@krb4_sources = @KRB4_TRUE@krb4.c kauth.c
@KRB5_TRUE@krb5_sources = @KRB5_TRUE@gssapi.c
ftp_SOURCES = cmds.c cmdtab.c extern.h ftp.c ftp_locl.h ftp_var.h main.c pathnames.h ruserpass.c domacro.c globals.c security.c security.h $(krb4_sources) $(krb5_sources)
ftp_SOURCES = \
cmds.c \
cmdtab.c \
extern.h \
ftp.c \
ftp_locl.h \
ftp_var.h \
main.c \
pathnames.h \
ruserpass.c \
domacro.c \
globals.c \
security.c \
security.h \
$(krb4_sources) \
$(krb5_sources)
EXTRA_ftp_SOURCES = krb4.c kauth.c gssapi.c
man_MANS = ftp.1
LDADD = ../common/libcommon.a $(LIB_gssapi) $(LIB_krb5) $(LIB_krb4) $(top_builddir)/lib/des/libdes.la $(LIB_roken) $(LIB_readline)
LDADD = \
../common/libcommon.a \
$(LIB_gssapi) \
$(LIB_krb5) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_roken) \
$(LIB_readline)
subdir = appl/ftp/ftp
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../../include/config.h
CONFIG_CLEAN_FILES =
@ -197,58 +234,57 @@ PROGRAMS = $(bin_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@
@KRB4_TRUE@@KRB5_FALSE@ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@am_ftp_OBJECTS = cmds.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@cmdtab.$(OBJEXT) ftp.$(OBJEXT) main.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@ruserpass.$(OBJEXT) domacro.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@globals.$(OBJEXT) security.$(OBJEXT)
@KRB4_FALSE@@KRB5_TRUE@am_ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@ftp.$(OBJEXT) main.$(OBJEXT) ruserpass.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@domacro.$(OBJEXT) globals.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@security.$(OBJEXT) gssapi.$(OBJEXT)
@KRB4_TRUE@@KRB5_FALSE@am_ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@ftp.$(OBJEXT) main.$(OBJEXT) ruserpass.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@domacro.$(OBJEXT) globals.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@security.$(OBJEXT) krb4.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@kauth.$(OBJEXT)
@KRB4_FALSE@@KRB5_TRUE@ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@ftp.$(OBJEXT) main.$(OBJEXT) ruserpass.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@domacro.$(OBJEXT) globals.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@security.$(OBJEXT) gssapi.$(OBJEXT)
@KRB4_FALSE@@KRB5_FALSE@ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@ftp.$(OBJEXT) main.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@ruserpass.$(OBJEXT) domacro.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@globals.$(OBJEXT) security.$(OBJEXT)
@KRB4_TRUE@@KRB5_TRUE@ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@am_ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@ftp.$(OBJEXT) main.$(OBJEXT) ruserpass.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@domacro.$(OBJEXT) globals.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@security.$(OBJEXT) krb4.$(OBJEXT) kauth.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@gssapi.$(OBJEXT)
ftp_OBJECTS = $(am_ftp_OBJECTS)
ftp_LDADD = $(LDADD)
@KRB5_FALSE@ftp_DEPENDENCIES = ../common/libcommon.a
@KRB5_TRUE@ftp_DEPENDENCIES = ../common/libcommon.a \
@KRB5_TRUE@$(top_builddir)/lib/gssapi/libgssapi.la \
@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB5_FALSE@ftp_DEPENDENCIES = ../common/libcommon.a \
@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
ftp_LDFLAGS =
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 = $(ftp_SOURCES) $(EXTRA_ftp_SOURCES)
man1dir = $(mandir)/man1
MANS = $(man_MANS)
depcomp =
DIST_COMMON = 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 = $(ftp_SOURCES) $(EXTRA_ftp_SOURCES)
OBJECTS = $(ftp_OBJECTS)
OBJECTS = $(am_ftp_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/ftp/ftp/Makefile
@ -271,31 +307,20 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`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)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$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)
@ -307,15 +332,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
@ -329,6 +345,12 @@ maintainer-clean-libtool:
ftp$(EXEEXT): $(ftp_OBJECTS) $(ftp_DEPENDENCIES)
@rm -f ftp$(EXEEXT)
$(LINK) $(ftp_LDFLAGS) $(ftp_OBJECTS) $(ftp_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
install-man1:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@ -343,6 +365,7 @@ install-man1:
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; \
@ -358,6 +381,7 @@ uninstall-man1:
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; \
@ -371,23 +395,27 @@ uninstall-man:
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:
@ -400,17 +428,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/ftp/ftp
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
@ -439,7 +466,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(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)$(bindir) $(DESTDIR)$(mandir)/man1
@ -453,6 +480,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-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -489,8 +517,9 @@ 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 \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-strip installdirs mostlyclean-generic distclean-generic \
clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
install-suid-programs:
@ -498,7 +527,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
@ -510,8 +542,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
@ -580,87 +612,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

View file

@ -36,7 +36,7 @@
*/
#include "ftp_locl.h"
RCSID("$Id: cmds.c,v 1.36 1999/09/16 20:37:28 assar Exp $");
RCSID("$Id: cmds.c,v 1.41 2000/07/18 10:00:31 joda Exp $");
typedef void (*sighand)(int);
@ -435,7 +435,7 @@ void
mput(int argc, char **argv)
{
int i;
RETSIGTYPE (*oldintr)();
RETSIGTYPE (*oldintr)(int);
int ointer;
char *tp;
@ -566,16 +566,17 @@ get(int argc, char **argv)
{
char *mode;
if (restart_point)
if (restart_point) {
if (curtype == TYPE_I)
mode = "r+wb";
else
mode = "r+w";
else
} else {
if (curtype == TYPE_I)
mode = "wb";
else
mode = "w";
}
getit(argc, argv, 0, mode);
}
@ -647,6 +648,7 @@ getit(int argc, char **argv, int restartit, char *mode)
int cmdret;
int yy, mo, day, hour, min, sec;
struct tm *tm;
time_t mtime = stbuf.st_mtime;
overbose = verbose;
if (debug == 0)
@ -665,7 +667,7 @@ getit(int argc, char **argv, int restartit, char *mode)
return (0);
}
tm = gmtime(&stbuf.st_mtime);
tm = gmtime(&mtime);
tm->tm_mon++;
tm->tm_year += 1900;
@ -1223,7 +1225,7 @@ void
shell(int argc, char **argv)
{
pid_t pid;
RETSIGTYPE (*old1)(), (*old2)();
RETSIGTYPE (*old1)(int), (*old2)(int);
char shellnam[40], *shell, *namep;
int status;
@ -1611,7 +1613,7 @@ void
doproxy(int argc, char **argv)
{
struct cmd *c;
RETSIGTYPE (*oldintr)();
RETSIGTYPE (*oldintr)(int);
if (argc < 2 && !another(&argc, &argv, "command")) {
printf("usage: %s command\n", argv[0]);

View file

@ -33,7 +33,7 @@
* @(#)extern.h 8.3 (Berkeley) 10/9/94
*/
/* $Id: extern.h,v 1.18 1999/10/28 20:49:10 assar Exp $ */
/* $Id: extern.h,v 1.19 2000/09/19 13:15:12 assar Exp $ */
#include <setjmp.h>
#include <stdlib.h>
@ -60,7 +60,8 @@ void cdup (int, char **);
void changetype (int, int);
void cmdabort (int);
void cmdscanner (int);
int command (char *fmt, ...);
int command (char *fmt, ...)
__attribute__ ((format (printf, 1,2)));
int confirm (char *, char *);
FILE *dataconn (const char *);
void delete (int, char **);

View file

@ -50,6 +50,7 @@ file transfer program
.Op Fl n
.Op Fl g
.Op Fl p
.Op Fl l
.Op Ar host
.Sh DESCRIPTION
.Nm Ftp
@ -96,6 +97,8 @@ Turn on passive mode.
Enables debugging.
.It Fl g
Disables file name globbing.
.It Fl l
Disables command line editing.
.El
.Pp
The client host with which
@ -913,7 +916,7 @@ if verbose is on, when a file transfer completes, statistics
regarding the efficiency of the transfer are reported.
By default,
verbose is on.
.It Ic ? Op Ar command
.It Ic \&? Op Ar command
A synonym for help.
.El
.Pp

View file

@ -32,7 +32,7 @@
*/
#include "ftp_locl.h"
RCSID ("$Id: ftp.c,v 1.63 2000/01/08 07:43:47 assar Exp $");
RCSID ("$Id: ftp.c,v 1.69 2000/10/08 13:15:33 assar Exp $");
struct sockaddr_storage hisctladdr_ss;
struct sockaddr *hisctladdr = (struct sockaddr *)&hisctladdr_ss;
@ -60,7 +60,7 @@ hookup (const char *host, int port)
struct addrinfo hints;
int error;
char portstr[NI_MAXSERV];
int len;
socklen_t len;
int s;
memset (&hints, 0, sizeof(hints));
@ -190,8 +190,9 @@ login (char *host)
printf ("Name (%s:%s): ", host, myname);
else
printf ("Name (%s): ", host);
fgets (tmp, sizeof (tmp) - 1, stdin);
tmp[strlen (tmp) - 1] = '\0';
*tmp = '\0';
if (fgets (tmp, sizeof (tmp) - 1, stdin) != NULL)
tmp[strlen (tmp) - 1] = '\0';
if (*tmp == '\0')
user = myname;
else
@ -199,25 +200,29 @@ login (char *host)
}
strlcpy(username, user, sizeof(username));
n = command("USER %s", user);
if (n == CONTINUE) {
if(sec_complete)
pass = myname;
else if (pass == NULL) {
if (n == COMPLETE)
n = command("PASS dummy"); /* DK: Compatibility with gssftp daemon */
else if(n == CONTINUE) {
if (pass == NULL) {
char prompt[128];
if(myname &&
(!strcmp(user, "ftp") || !strcmp(user, "anonymous"))){
(!strcmp(user, "ftp") || !strcmp(user, "anonymous"))) {
snprintf(defaultpass, sizeof(defaultpass),
"%s@%s", myname, mydomain);
snprintf(prompt, sizeof(prompt),
"Password (%s): ", defaultpass);
}else{
} else if (sec_complete) {
pass = myname;
} else {
*defaultpass = '\0';
snprintf(prompt, sizeof(prompt), "Password: ");
}
pass = defaultpass;
des_read_pw_string (tmp, sizeof (tmp), prompt, 0);
if (tmp[0])
pass = tmp;
if (pass == NULL) {
pass = defaultpass;
des_read_pw_string (tmp, sizeof (tmp), prompt, 0);
if (tmp[0])
pass = tmp;
}
}
n = command ("PASS %s", pass);
}
@ -525,9 +530,9 @@ empty (fd_set * mask, int sec)
{
struct timeval t;
t.tv_sec = (long) sec;
t.tv_sec = sec;
t.tv_usec = 0;
return (select (32, mask, NULL, NULL, &t));
return (select (FD_SETSIZE, mask, NULL, NULL, &t));
}
jmp_buf sendabort;
@ -617,7 +622,7 @@ sendrequest (char *cmd, char *local, char *remote, char *lmode, int printnames)
int c, d;
FILE *fin, *dout = 0;
int (*closefunc) (FILE *);
RETSIGTYPE (*oldintr)(), (*oldintp)();
RETSIGTYPE (*oldintr)(int), (*oldintp)(int);
long bytes = 0, hashbytes = HASHBYTES;
char *rmode = "w";
@ -1235,7 +1240,7 @@ static int
active_mode (void)
{
int tmpno = 0;
int len;
socklen_t len;
int result;
noport:
@ -1361,7 +1366,8 @@ dataconn (const char *lmode)
{
struct sockaddr_storage from_ss;
struct sockaddr *from = (struct sockaddr *)&from_ss;
int s, fromlen = sizeof (from_ss);
socklen_t fromlen = sizeof(from_ss);
int s;
if (passivemode)
return (fdopen (data, lmode));
@ -1621,6 +1627,8 @@ proxtrans (char *cmd, char *local, char *remote)
pswitch (!proxy);
if (cpend) {
FD_ZERO (&mask);
if (fileno(cin) >= FD_SETSIZE)
errx (1, "fd too large");
FD_SET (fileno (cin), &mask);
if ((nfnd = empty (&mask, 10)) <= 0) {
if (nfnd < 0) {
@ -1649,6 +1657,8 @@ reset (int argc, char **argv)
FD_ZERO (&mask);
while (nfnd > 0) {
if (fileno (cin) >= FD_SETSIZE)
errx (1, "fd too large");
FD_SET (fileno (cin), &mask);
if ((nfnd = empty (&mask, 0)) < 0) {
warn ("reset");
@ -1722,8 +1732,12 @@ abort_remote (FILE * din)
fprintf (cout, "%cABOR\r\n", DM);
fflush (cout);
FD_ZERO (&mask);
if (fileno (cin) >= FD_SETSIZE)
errx (1, "fd too large");
FD_SET (fileno (cin), &mask);
if (din) {
if (fileno (din) >= FD_SETSIZE)
errx (1, "fd too large");
FD_SET (fileno (din), &mask);
}
if ((nfnd = empty (&mask, 10)) <= 0) {

View file

@ -52,6 +52,7 @@ extern int verbose; /* print messages coming back from server */
extern int connected; /* connected to server */
extern int fromatty; /* input is from a terminal */
extern int interactive; /* interactively prompt on m* cmds */
extern int lineedit; /* use line-editing */
extern int debug; /* debugging level */
extern int bell; /* ring bell on cmd completion */
extern int doglob; /* glob local file names */
@ -101,6 +102,7 @@ extern int cpend; /* flag: if != 0, then pending server rep
extern int mflag; /* flag: if != 0, then active multi command */
extern int options; /* used during socket creation */
extern int use_kerberos; /* use Kerberos authentication */
/*
* Format of command table.

View file

@ -1,5 +1,5 @@
#include "ftp_locl.h"
RCSID("$Id: globals.c,v 1.6 1996/08/26 22:46:26 assar Exp $");
RCSID("$Id: globals.c,v 1.8 2000/11/15 22:56:08 assar Exp $");
/*
* Options and other state info.
@ -11,6 +11,7 @@ int verbose; /* print messages coming back from server */
int connected; /* connected to server */
int fromatty; /* input is from a terminal */
int interactive; /* interactively prompt on m* cmds */
int lineedit; /* use line-editing */
int debug; /* debugging level */
int bell; /* ring bell on cmd completion */
int doglob; /* glob local file names */
@ -60,6 +61,7 @@ int cpend; /* flag: if != 0, then pending server reply */
int mflag; /* flag: if != 0, then active multi command */
int options; /* used during socket creation */
int use_kerberos; /* use Kerberos authentication */
/*
* Format of command table.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -38,11 +38,12 @@
#endif
#include <gssapi.h>
RCSID("$Id: gssapi.c,v 1.13 1999/12/02 16:58:29 joda Exp $");
RCSID("$Id: gssapi.c,v 1.15 2000/12/08 05:07:49 assar Exp $");
struct gss_data {
gss_ctx_id_t context_hdl;
char *client_name;
gss_cred_id_t delegated_cred_handle;
};
static int
@ -50,7 +51,17 @@ gss_init(void *app_data)
{
struct gss_data *d = app_data;
d->context_hdl = GSS_C_NO_CONTEXT;
d->delegated_cred_handle = NULL;
#if defined(FTP_SERVER)
return 0;
#else
/* XXX Check the gss mechanism; with gss_indicate_mechs() ? */
#ifdef KRB5
return !use_kerberos;
#else
return 0
#endif /* KRB5 */
#endif /* FTP_SERVER */
}
static int
@ -168,6 +179,15 @@ gss_adat(void *app_data, void *buf, size_t len)
input_token.value = buf;
input_token.length = len;
d->delegated_cred_handle = malloc(sizeof(*d->delegated_cred_handle));
if (d->delegated_cred_handle == NULL) {
reply(500, "Out of memory");
goto out;
}
memset ((char*)d->delegated_cred_handle, 0,
sizeof(*d->delegated_cred_handle));
maj_stat = gss_accept_sec_context (&min_stat,
&d->context_hdl,
@ -179,7 +199,7 @@ gss_adat(void *app_data, void *buf, size_t len)
&output_token,
NULL,
NULL,
NULL);
&d->delegated_cred_handle);
if(output_token.length) {
if(base64_encode(output_token.value, output_token.length, &p) < 0) {
@ -304,7 +324,8 @@ gss_auth(void *app_data, char *host)
&d->context_hdl,
target_name,
GSS_C_NO_OID,
GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG,
GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG
| GSS_C_DELEG_FLAG,
0,
bindings,
&input,
@ -346,7 +367,8 @@ gss_auth(void *app_data, char *host)
if (maj_stat & GSS_S_CONTINUE_NEEDED) {
p = strstr(reply_string, "ADAT=");
if(p == NULL){
printf("Error: expected ADAT in reply.\n");
printf("Error: expected ADAT in reply. got: %s\n",
reply_string);
return AUTH_ERROR;
} else {
p+=5;

View file

@ -38,7 +38,7 @@
#endif
#include <krb.h>
RCSID("$Id: krb4.c,v 1.37 1999/12/06 17:10:13 assar Exp $");
RCSID("$Id: krb4.c,v 1.38 2000/06/21 02:46:09 assar Exp $");
#ifdef FTP_SERVER
#define LOCAL_ADDR ctrl_addr
@ -201,6 +201,12 @@ struct sec_server_mech krb4_server_mech = {
#else /* FTP_SERVER */
static int
krb4_init(void *app_data)
{
return !use_kerberos;
}
static int
mk_auth(struct krb4_data *d, KTEXT adat,
char *service, char *host, int checksum)
@ -322,7 +328,7 @@ krb4_auth(void *app_data, char *host)
struct sec_client_mech krb4_client_mech = {
"KERBEROS_V4",
sizeof(struct krb4_data),
NULL, /* init */
krb4_init, /* init */
krb4_auth,
NULL, /* end */
krb4_check_prot,

View file

@ -36,7 +36,7 @@
*/
#include "ftp_locl.h"
RCSID("$Id: main.c,v 1.27 1999/11/13 06:18:02 assar Exp $");
RCSID("$Id: main.c,v 1.30 2000/11/15 22:56:35 assar Exp $");
int
main(int argc, char **argv)
@ -54,9 +54,11 @@ main(int argc, char **argv)
doglob = 1;
interactive = 1;
autologin = 1;
lineedit = 1;
passivemode = 0; /* passive mode not active */
use_kerberos = 1;
while ((ch = getopt(argc, argv, "dginptv")) != -1) {
while ((ch = getopt(argc, argv, "dgilnptvK")) != -1) {
switch (ch) {
case 'd':
options |= SO_DEBUG;
@ -71,6 +73,9 @@ main(int argc, char **argv)
interactive = 0;
break;
case 'l':
lineedit = 0;
break;
case 'n':
autologin = 0;
break;
@ -86,9 +91,14 @@ main(int argc, char **argv)
verbose++;
break;
case 'K':
/* Disable Kerberos authentication */
use_kerberos = 0;
break;
default:
fprintf(stderr,
"usage: ftp [-dginptv] [host [port]]\n");
"usage: ftp [-dgilnptvK] [host [port]]\n");
exit(1);
}
}
@ -200,10 +210,8 @@ tail(filename)
}
*/
#ifndef HAVE_READLINE
static char *
readline(char *prompt)
simple_readline(char *prompt)
{
char buf[BUFSIZ];
printf ("%s", prompt);
@ -215,6 +223,14 @@ readline(char *prompt)
return strdup(buf);
}
#ifndef HAVE_READLINE
static char *
readline(char *prompt)
{
return simple_readline (prompt);
}
static void
add_history(char *p)
{
@ -243,11 +259,17 @@ cmdscanner(int top)
for (;;) {
if (fromatty) {
char *p;
p = readline("ftp> ");
if(p == NULL)
if (lineedit)
p = readline("ftp> ");
else
p = simple_readline("ftp> ");
if(p == NULL) {
printf("\n");
quit(0, 0);
}
strlcpy(line, p, sizeof(line));
add_history(p);
if (lineedit)
add_history(p);
free(p);
} else{
if (fgets(line, sizeof line, stdin) == NULL)

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
* Copyright (c) 1998-2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -37,7 +37,7 @@
#include "ftp_locl.h"
#endif
RCSID("$Id: security.c,v 1.16 2000/02/07 03:11:43 assar Exp $");
RCSID("$Id: security.c,v 1.17 2000/11/08 23:30:32 joda Exp $");
static enum protection_level command_prot;
static enum protection_level data_prot;
@ -237,7 +237,7 @@ sec_read(int fd, void *data, int length)
ret = sec_get_data(fd, &in_buffer, data_prot);
if (ret < 0)
return -1;
if(ret == 0 || in_buffer.size == 0) {
if(ret == 0 && in_buffer.size == 0) {
if(rx)
in_buffer.eof_flag = 1;
return rx;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: security.h,v 1.7 1999/12/02 16:58:30 joda Exp $ */
/* $Id: security.h,v 1.9 2000/10/04 06:07:52 assar Exp $ */
#ifndef __security_h__
#define __security_h__
@ -94,14 +94,18 @@ void delete_ftp_command(void);
int sec_fflush (FILE *);
int sec_fprintf (FILE *, const char *, ...);
int sec_fprintf (FILE *, const char *, ...)
__attribute__ ((format (printf, 2,3)));
int sec_getc (FILE *);
int sec_putc (int, FILE *);
int sec_read (int, void *, int);
int sec_read_msg (char *, int);
int sec_vfprintf (FILE *, const char *, va_list);
int sec_fprintf2(FILE *f, const char *fmt, ...);
int sec_vfprintf2(FILE *, const char *, va_list);
int sec_vfprintf (FILE *, const char *, va_list)
__attribute__ ((format (printf, 2,0)));
int sec_fprintf2(FILE *f, const char *fmt, ...)
__attribute__ ((format (printf, 2,3)));
int sec_vfprintf2(FILE *, const char *, va_list)
__attribute__ ((format (printf, 2,0)));
int sec_write (int, char *, int);
#ifdef FTP_SERVER

View file

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.21 2000/01/06 15:10:57 assar Exp $
# $Id: Makefile.am,v 1.23 2001/01/28 23:17:36 assar Exp $
include $(top_srcdir)/Makefile.am.common
@ -48,9 +48,9 @@ man_MANS = ftpd.8 ftpusers.5
LDADD = ../common/libcommon.a \
$(LIB_kafs) \
$(LIB_gssapi) \
$(LIB_otp) \
$(LIB_krb5) \
$(LIB_krb4) \
$(LIB_otp) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(LIB_roken) \
$(DBLIB)

View file

@ -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.21 2000/01/06 15:10:57 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.23 2001/01/28 23:17:36 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 -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
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,33 +170,40 @@ 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 =
libexec_PROGRAMS = ftpd
@KRB4_TRUE@krb4_sources = krb4.c kauth.c
@KRB5_TRUE@krb5_sources = gssapi.c gss_userok.c
@KRB4_TRUE@krb4_sources = @KRB4_TRUE@krb4.c kauth.c
@KRB5_TRUE@krb5_sources = @KRB5_TRUE@gssapi.c gss_userok.c
ftpd_SOURCES = extern.h ftpcmd.y ftpd.c ftpd_locl.h logwtmp.c ls.c pathnames.h popen.c security.c $(krb4_sources) $(krb5_sources)
ftpd_SOURCES = \
extern.h \
ftpcmd.y \
ftpd.c \
ftpd_locl.h \
logwtmp.c \
ls.c \
pathnames.h \
popen.c \
security.c \
$(krb4_sources) \
$(krb5_sources)
EXTRA_ftpd_SOURCES = krb4.c kauth.c gssapi.c gss_userok.c
@ -187,8 +212,17 @@ CLEANFILES = security.c security.h krb4.c gssapi.c ftpcmd.c
man_MANS = ftpd.8 ftpusers.5
LDADD = ../common/libcommon.a $(LIB_kafs) $(LIB_gssapi) $(LIB_krb5) $(LIB_krb4) $(LIB_otp) $(top_builddir)/lib/des/libdes.la $(LIB_roken) $(DBLIB)
LDADD = ../common/libcommon.a \
$(LIB_kafs) \
$(LIB_gssapi) \
$(LIB_otp) \
$(LIB_krb5) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_roken) \
$(DBLIB)
subdir = appl/ftp/ftpd
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../../include/config.h
CONFIG_CLEAN_FILES =
@ -199,65 +233,62 @@ 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@
@KRB4_TRUE@@KRB5_FALSE@ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@logwtmp.$(OBJEXT) ls.$(OBJEXT) popen.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@security.$(OBJEXT) krb4.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@kauth.$(OBJEXT)
@KRB4_FALSE@@KRB5_TRUE@ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@logwtmp.$(OBJEXT) ls.$(OBJEXT) popen.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@security.$(OBJEXT) gssapi.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@gss_userok.$(OBJEXT)
@KRB4_FALSE@@KRB5_FALSE@ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@logwtmp.$(OBJEXT) ls.$(OBJEXT) popen.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@security.$(OBJEXT)
@KRB4_TRUE@@KRB5_TRUE@ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@ftpd.$(OBJEXT) logwtmp.$(OBJEXT) ls.$(OBJEXT) \
@KRB4_FALSE@@KRB5_FALSE@popen.$(OBJEXT) security.$(OBJEXT)
@KRB4_FALSE@@KRB5_TRUE@am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@ftpd.$(OBJEXT) logwtmp.$(OBJEXT) ls.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@popen.$(OBJEXT) security.$(OBJEXT) \
@KRB4_FALSE@@KRB5_TRUE@gssapi.$(OBJEXT) gss_userok.$(OBJEXT)
@KRB4_TRUE@@KRB5_FALSE@am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@ftpd.$(OBJEXT) logwtmp.$(OBJEXT) ls.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@popen.$(OBJEXT) security.$(OBJEXT) \
@KRB4_TRUE@@KRB5_FALSE@krb4.$(OBJEXT) kauth.$(OBJEXT)
@KRB4_TRUE@@KRB5_TRUE@am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@logwtmp.$(OBJEXT) ls.$(OBJEXT) popen.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@security.$(OBJEXT) krb4.$(OBJEXT) kauth.$(OBJEXT) \
@KRB4_TRUE@@KRB5_TRUE@gssapi.$(OBJEXT) gss_userok.$(OBJEXT)
ftpd_OBJECTS = $(am_ftpd_OBJECTS)
ftpd_LDADD = $(LDADD)
@KRB4_TRUE@@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a
@KRB4_FALSE@@KRB5_TRUE@ftpd_DEPENDENCIES = ../common/libcommon.a \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/gssapi/libgssapi.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a \
@KRB4_FALSE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/kafs/libkafs.la
@KRB4_TRUE@@KRB5_TRUE@ftpd_DEPENDENCIES = ../common/libcommon.a \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/gssapi/libgssapi.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
ftpd_LDFLAGS =
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 = $(ftpd_SOURCES) $(EXTRA_ftpd_SOURCES)
man5dir = $(mandir)/man5
man8dir = $(mandir)/man8
MANS = $(man_MANS)
depcomp =
DIST_COMMON = Makefile.am Makefile.in ftpcmd.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
SOURCES = $(ftpd_SOURCES) $(EXTRA_ftpd_SOURCES)
OBJECTS = $(ftpd_OBJECTS)
OBJECTS = $(am_ftpd_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .1 .3 .5 .8 .S .c .cat1 .cat3 .cat5 .cat8 .et .h .lo .o .obj .s .x .y
.SUFFIXES: .1 .3 .5 .8 .c .cat1 .cat3 .cat5 .cat8 .et .h .lo .o .obj .x .y
$(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/ftp/ftpd/Makefile
@ -280,31 +311,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)
@ -316,15 +336,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
@ -338,12 +349,17 @@ maintainer-clean-libtool:
ftpd$(EXEEXT): $(ftpd_OBJECTS) $(ftpd_DEPENDENCIES)
@rm -f ftpd$(EXEEXT)
$(LINK) $(ftpd_LDFLAGS) $(ftpd_OBJECTS) $(ftpd_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
ftpcmd.h: ftpcmd.c
install-man5:
@ -359,6 +375,7 @@ install-man5:
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)$(man5dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \
@ -374,6 +391,7 @@ uninstall-man5:
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)$(man5dir)/$$inst"; \
rm -f $(DESTDIR)$(man5dir)/$$inst; \
@ -392,6 +410,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; \
@ -407,6 +426,7 @@ 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; \
@ -420,23 +440,27 @@ uninstall-man:
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:
@ -449,17 +473,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/ftp/ftpd
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
@ -488,7 +511,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(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)$(mandir)/man5 \
$(DESTDIR)$(mandir)/man8
@ -504,7 +527,8 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "ftpcmdhftpcmdc" || rm -f ftpcmdh ftpcmdc
-rm -f Makefile.in
-test -z "ftpcmd.c" || rm -f ftpcmd.c
mostlyclean-am: mostlyclean-libexecPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -543,7 +567,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -553,7 +577,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
@ -565,8 +592,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
@ -635,87 +662,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

View file

@ -76,17 +76,11 @@ FILE *ftpd_popen(char *, char *, int, int);
char *ftpd_getline(char *, int);
void ftpd_logwtmp(char *, char *, char *);
void lreply(int, const char *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
__attribute__ ((format (printf, 2, 3)));
void makedir(char *);
void nack(char *);
void nreply(const char *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
__attribute__ ((format (printf, 1, 2)));
void pass(char *);
void pasv(void);
void perror_reply(int, const char *);
@ -95,17 +89,11 @@ void removedir(char *);
void renamecmd(char *, char *);
char *renamefrom(char *);
void reply(int, const char *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)))
#endif
;
__attribute__ ((format (printf, 2, 3)));
void retrieve(const char *, char *);
void send_file_list(char *);
void setproctitle(const char *, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
__attribute__ ((format (printf, 1, 2)));
void statcmd(void);
void statfilecmd(char *);
void do_store(char *, char *, int);

View file

@ -43,7 +43,7 @@
%{
#include "ftpd_locl.h"
RCSID("$Id: ftpcmd.y,v 1.56 1999/10/26 11:56:23 assar Exp $");
RCSID("$Id: ftpcmd.y,v 1.60 2000/11/05 16:53:20 joda Exp $");
off_t restart_point;
@ -159,18 +159,21 @@ cmd
eprt ($3);
free ($3);
}
| PASV CRLF
| PASV CRLF check_login
{
if($3)
pasv ();
}
| EPSV CRLF
| EPSV CRLF check_login
{
if($3)
epsv (NULL);
}
| EPSV SP STRING CRLF
| EPSV SP STRING CRLF check_login
{
if($5)
epsv ($3);
free ($3);
free ($3);
}
| TYPE SP type_code CRLF
{
@ -577,7 +580,7 @@ cmd
}
| SYST CRLF
{
#if defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(_CRAY)
#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__)
reply(215, "UNIX Type: L%d", NBBY);
#else
reply(215, "UNKNOWN Type: L%d", NBBY);
@ -620,7 +623,9 @@ cmd
"%s: not a plain file.", $3);
} else {
struct tm *t;
t = gmtime(&stbuf.st_mtime);
time_t mtime = stbuf.st_mtime;
t = gmtime(&mtime);
reply(213,
"%04d%02d%02d%02d%02d%02d",
t->tm_year + 1900,

View file

@ -81,7 +81,7 @@ but only OTP is allowed.
.It Ar ftp
Allow anonymous login.
.El
.Pp
The following combination modes exists for backwards compatibility:
.Bl -tag -width plain
.It Ar none
@ -319,7 +319,7 @@ that the
.Dq ftp
subtree be constructed with care, consider following these guidelines
for anonymous ftp.
.Pp
In general all files should be owned by
.Dq root ,
and have non-write permissions (644 or 755 depending on the kind of
@ -377,7 +377,7 @@ and
.Xr group 5
files here, ls will be able to produce owner names rather than
numbers. Remember to remove any passwords from these files.
.Pp
The file
.Pa motd ,
if present, will be printed after a successful login.
@ -388,7 +388,7 @@ here.
.It Pa ~ftp/pub
Traditional place to put whatever you want to make public.
.El
.Pp
If you want guests to be able to upload files, create a
.Pa ~ftp/incoming
directory owned by
@ -459,6 +459,7 @@ FTP PROTOCOL SPECIFICATION
OTP Specification
.It Cm RFC 2228
FTP Security Extensions.
.El
.Sh BUGS
The server must run as the super-user
to create sockets with privileged port numbers. It maintains

View file

@ -38,7 +38,7 @@
#endif
#include "getarg.h"
RCSID("$Id: ftpd.c,v 1.137 2000/01/05 13:46:04 joda Exp $");
RCSID("$Id: ftpd.c,v 1.153 2001/01/18 09:14:59 joda Exp $");
static char version[] = "Version 6.00";
@ -195,7 +195,6 @@ parse_auth_level(char *str)
* Print usage and die.
*/
static int debug_flag;
static int interactive_flag;
static char *guest_umask_string;
static char *port_string;
@ -207,6 +206,8 @@ int use_builtin_ls = -1;
static int help_flag;
static int version_flag;
static const char *good_chars = "+-=_,.";
struct getargs args[] = {
{ NULL, 'a', arg_string, &auth_string, "required authentication" },
{ NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket" },
@ -216,9 +217,10 @@ struct getargs args[] = {
{ NULL, 't', arg_integer, &ftpd_timeout, "initial timeout" },
{ NULL, 'T', arg_integer, &maxtimeout, "max timeout" },
{ NULL, 'u', arg_string, &umask_string, "umask for user logins" },
{ NULL, 'd', arg_flag, &debug_flag, "enable debugging" },
{ NULL, 'v', arg_flag, &debug_flag, "enable debugging" },
{ NULL, 'd', arg_flag, &debug, "enable debugging" },
{ NULL, 'v', arg_flag, &debug, "enable debugging" },
{ "builtin-ls", 'B', arg_flag, &use_builtin_ls, "use built-in ls to list files" },
{ "good-chars", 0, arg_string, &good_chars, "allowed anonymous upload filename chars" },
{ "version", 0, arg_flag, &version_flag },
{ "help", 'h', arg_flag, &help_flag }
};
@ -253,9 +255,8 @@ show_file(const char *file, int code)
int
main(int argc, char **argv)
{
int his_addr_len, ctrl_addr_len, on = 1, tos;
char *cp, line[LINE_MAX];
FILE *fd;
socklen_t his_addr_len, ctrl_addr_len;
int on = 1;
int port;
struct servent *sp;
@ -263,17 +264,20 @@ main(int argc, char **argv)
set_progname (argv[0]);
#ifdef KRB4
/* detach from any tickets and tokens */
{
#ifdef KRB4
char tkfile[1024];
snprintf(tkfile, sizeof(tkfile),
"/tmp/ftp_%u", (unsigned)getpid());
krb_set_tkt_string(tkfile);
#endif
#if defined(KRB4) && defined(KRB5)
if(k_hasafs())
k_setpag();
}
#endif
}
if(getarg(args, num_args, argc, argv, &optind))
usage(1);
@ -350,10 +354,13 @@ main(int argc, char **argv)
exit(1);
}
#if defined(IP_TOS) && defined(HAVE_SETSOCKOPT)
tos = IPTOS_LOWDELAY;
if (setsockopt(STDIN_FILENO, IPPROTO_IP, IP_TOS,
(void *)&tos, sizeof(int)) < 0)
syslog(LOG_WARNING, "setsockopt (IP_TOS): %m");
{
int tos = IPTOS_LOWDELAY;
if (setsockopt(STDIN_FILENO, IPPROTO_IP, IP_TOS,
(void *)&tos, sizeof(int)) < 0)
syslog(LOG_WARNING, "setsockopt (IP_TOS): %m");
}
#endif
data_source->sa_family = ctrl_addr->sa_family;
socket_set_port (data_source,
@ -709,7 +716,6 @@ checkaccess(char *name)
int do_login(int code, char *passwd)
{
FILE *fd;
login_attempts = 0; /* this time successful */
if (setegid((gid_t)pw->pw_gid) < 0) {
reply(550, "Can't set gid.");
@ -833,6 +839,51 @@ end_login(void)
dochroot = 0;
}
#ifdef KRB5
static int
krb5_verify(struct passwd *pwd, char *passwd)
{
krb5_context context;
krb5_ccache id;
krb5_principal princ;
krb5_error_code ret;
ret = krb5_init_context(&context);
if(ret)
return ret;
ret = krb5_parse_name(context, pwd->pw_name, &princ);
if(ret){
krb5_free_context(context);
return ret;
}
ret = krb5_cc_gen_new(context, &krb5_mcc_ops, &id);
if(ret){
krb5_free_principal(context, princ);
krb5_free_context(context);
return ret;
}
ret = krb5_verify_user(context,
princ,
id,
passwd,
1,
NULL);
krb5_free_principal(context, princ);
#ifdef KRB4
if (k_hasafs()) {
k_setpag();
krb5_afslog_uid_home(context, id,NULL, NULL,pwd->pw_uid, pwd->pw_dir);
}
#endif /* KRB4 */
krb5_cc_destroy(context, id);
krb5_free_context (context);
if(ret)
return ret;
return 0;
}
#endif /* KRB5 */
void
pass(char *passwd)
{
@ -840,8 +891,8 @@ pass(char *passwd)
/* some clients insists on sending a password */
if (logged_in && askpasswd == 0){
reply(230, "Dumpucko!");
return;
reply(230, "Password not necessary");
return;
}
if (logged_in || askpasswd == 0) {
@ -859,19 +910,25 @@ pass(char *passwd)
}
#endif
else if((auth_level & AUTH_OTP) == 0) {
#ifdef KRB4
char realm[REALM_SZ];
if((rval = krb_get_lrealm(realm, 1)) == KSUCCESS)
rval = krb_verify_user(pw->pw_name,
"", realm,
passwd,
KRB_VERIFY_SECURE, NULL);
if (rval == KSUCCESS ) {
chown (tkt_string(), pw->pw_uid, pw->pw_gid);
if(k_hasafs())
krb_afslog(0, 0);
} else
#ifdef KRB5
rval = krb5_verify(pw, passwd);
#endif
#ifdef KRB4
if (rval) {
char realm[REALM_SZ];
if((rval = krb_get_lrealm(realm, 1)) == KSUCCESS)
rval = krb_verify_user(pw->pw_name,
"", realm,
passwd,
KRB_VERIFY_SECURE, NULL);
if (rval == KSUCCESS ) {
chown (tkt_string(), pw->pw_uid, pw->pw_gid);
if(k_hasafs())
krb_afslog(0, 0);
}
}
#endif
if (rval)
rval = unix_verify_user(pw->pw_name, passwd);
} else {
char *s;
@ -1048,7 +1105,6 @@ retrieve(const char *cmd, char *name)
int
filename_check(char *filename)
{
static const char good_chars[] = "+-=_,.";
char *p;
p = strrchr(filename, '/');
@ -1064,7 +1120,7 @@ filename_check(char *filename)
if(*p == '\0')
return 0;
}
lreply(553, "\"%s\" is an illegal filename.", filename);
lreply(553, "\"%s\" is not an acceptable filename.", filename);
lreply(553, "The filename must start with an alphanumeric "
"character and must only");
reply(553, "consist of alphanumeric characters or any of the following: %s",
@ -1201,7 +1257,7 @@ dataconn(const char *name, off_t size, const char *mode)
struct sockaddr_storage from_ss;
struct sockaddr *from = (struct sockaddr *)&from_ss;
int s;
int fromlen = sizeof(from_ss);
socklen_t fromlen = sizeof(from_ss);
s = accept(pdata, from, &fromlen);
if (s < 0) {
@ -1869,7 +1925,7 @@ myoob(int signo)
void
pasv(void)
{
int len;
socklen_t len;
char *p, *a;
struct sockaddr_in *sin;
@ -1879,6 +1935,9 @@ pasv(void)
return;
}
if(pdata != -1)
close(pdata);
pdata = socket(ctrl_addr->sa_family, SOCK_STREAM, 0);
if (pdata < 0) {
perror_reply(425, "Can't open passive connection");
@ -1919,7 +1978,7 @@ pasv(void)
void
epsv(char *proto)
{
int len;
socklen_t len;
pdata = socket(ctrl_addr->sa_family, SOCK_STREAM, 0);
if (pdata < 0) {
@ -2080,9 +2139,9 @@ list_file(char *file)
pdata = -1;
} else {
#ifdef HAVE_LS_A
const char *cmd = "/bin/ls -lA -- %s";
const char *cmd = "/bin/ls -lA %s";
#else
const char *cmd = "/bin/ls -la -- %s";
const char *cmd = "/bin/ls -la %s";
#endif
retrieve(cmd, file);
}
@ -2133,8 +2192,8 @@ send_file_list(char *whichf)
*/
if (dirname[0] == '-' && *dirlist == NULL &&
transflag == 0) {
retrieve("/bin/ls -- %s", dirname);
goto out;
list_file(dirname);
goto out;
}
perror_reply(550, whichf);
if (dout != NULL) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: ftpd_locl.h,v 1.9 1999/12/02 16:58:30 joda Exp $ */
/* $Id: ftpd_locl.h,v 1.12 2000/09/19 13:16:44 assar Exp $ */
#ifndef __ftpd_locl_h__
#define __ftpd_locl_h__
@ -134,6 +134,7 @@
#endif
#include <err.h>
#include "roken.h"
#include "pathnames.h"
#include "extern.h"
@ -141,13 +142,15 @@
#include "security.h"
#include "roken.h"
#ifdef KRB5
#include <krb5.h>
#endif /* KRB5 */
#ifdef KRB4
#include <krb.h>
#include <kafs.h>
#endif
#ifdef OTP
#include <otp.h>
#endif

View file

@ -1,4 +1,4 @@
.\" $Id: ftpusers.5,v 1.2 1997/05/07 20:11:11 joda Exp $
.\" $Id: ftpusers.5,v 1.3 2001/01/11 16:16:26 assar Exp $
.\"
.Dd May 7, 1997
.Dt FTPUSERS 5
@ -20,7 +20,7 @@ matches any user. Users that has an explicit
.Dq allow ,
or that does not match any line, are allowed access. Anyone else is
denied access.
.Pp
Note that this is compatible with the old format, where this file
contained a list of users that should be denied access.
.Sh EXAMPLES

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998 Kungliga Tekniska Högskolan
* Copyright (c) 1998 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -35,7 +35,7 @@
#include <gssapi.h>
#include <krb5.h>
RCSID("$Id: gss_userok.c,v 1.2 1999/12/02 16:58:31 joda Exp $");
RCSID("$Id: gss_userok.c,v 1.7 2001/01/30 00:36:58 assar Exp $");
/* XXX a bit too much of krb5 dependency here...
What is the correct way to do this?
@ -47,6 +47,7 @@ extern krb5_context gssapi_krb5_context;
struct gss_data {
gss_ctx_id_t context_hdl;
char *client_name;
gss_cred_id_t delegated_cred_handle;
};
int gss_userok(void*, char*); /* to keep gcc happy */
@ -58,12 +59,67 @@ gss_userok(void *app_data, char *username)
if(gssapi_krb5_context) {
krb5_principal client;
krb5_error_code ret;
ret = krb5_parse_name(gssapi_krb5_context, data->client_name, &client);
if(ret)
return 1;
ret = krb5_kuserok(gssapi_krb5_context, client, username);
if (!ret) {
krb5_free_principal(gssapi_krb5_context, client);
return 1;
}
ret = 0;
/* more of krb-depend stuff :-( */
/* gss_add_cred() ? */
if (data->delegated_cred_handle &&
data->delegated_cred_handle->ccache ) {
krb5_ccache ccache = NULL;
char* ticketfile;
struct passwd *pw;
OM_uint32 minor_status;
pw = getpwnam(username);
if (pw == NULL) {
ret = 1;
goto fail;
}
asprintf (&ticketfile, "%s%u", KRB5_DEFAULT_CCROOT, pw->pw_uid);
ret = krb5_cc_resolve(gssapi_krb5_context, ticketfile, &ccache);
if (ret)
goto fail;
ret = gss_krb5_copy_ccache(&minor_status,
data->delegated_cred_handle,
ccache);
if (ret)
goto fail;
chown (ticketfile+5, pw->pw_uid, pw->pw_gid);
#ifdef KRB4
if (k_hasafs()) {
krb5_afslog(gssapi_krb5_context, ccache, 0, 0);
}
#endif
esetenv ("KRB5CCNAME", ticketfile, 1);
fail:
if (ccache)
krb5_cc_close(gssapi_krb5_context, ccache);
krb5_cc_destroy(gssapi_krb5_context,
data->delegated_cred_handle->ccache);
data->delegated_cred_handle->ccache = NULL;
free(ticketfile);
}
krb5_free_principal(gssapi_krb5_context, client);
return !ret;
return ret;
}
return 1;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: logwtmp.c,v 1.14 1999/12/02 16:58:31 joda Exp $");
RCSID("$Id: logwtmp.c,v 1.15 2000/09/19 13:17:05 assar Exp $");
#endif
#include <stdio.h>
@ -58,6 +58,7 @@ RCSID("$Id: logwtmp.c,v 1.14 1999/12/02 16:58:31 joda Exp $");
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#endif
#include <roken.h>
#include "extern.h"
#ifndef WTMP_FILE

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -30,9 +30,36 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#ifndef TEST
#include "ftpd_locl.h"
RCSID("$Id: ls.c,v 1.14 2000/01/05 13:48:58 joda Exp $");
RCSID("$Id: ls.c,v 1.20 2001/01/25 01:33:15 joda Exp $");
#else
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
#include <errno.h>
#define sec_fprintf2 fprintf
#define sec_fflush fflush
void
builtin_ls(FILE *out, const char *file);
int
main(int argc, char **argv)
{
int i;
for(i = 1; i < argc; i++)
builtin_ls(stdout, argv[i]);
return 0;
}
#endif
struct fileinfo {
struct stat st;
@ -63,17 +90,23 @@ free_fileinfo(struct fileinfo *f)
free(f->link);
}
#define LS_DIRS 1
#define LS_IGNORE_DOT 2
#define LS_SORT_MODE 12
#define LS_DIRS (1 << 0)
#define LS_IGNORE_DOT (1 << 1)
#define LS_SORT_MODE (3 << 2)
#define SORT_MODE(f) ((f) & LS_SORT_MODE)
#define LS_SORT_NAME 4
#define LS_SORT_MTIME 8
#define LS_SORT_SIZE 12
#define LS_SORT_REVERSE 16
#define LS_SORT_NAME (1 << 2)
#define LS_SORT_MTIME (2 << 2)
#define LS_SORT_SIZE (3 << 2)
#define LS_SORT_REVERSE (1 << 4)
#define LS_SIZE 32
#define LS_INODE 64
#define LS_SIZE (1 << 5)
#define LS_INODE (1 << 6)
#define LS_TYPE (1 << 7)
#define LS_DISP_MODE (3 << 8)
#define DISP_MODE(f) ((f) & LS_DISP_MODE)
#define LS_DISP_LONG (1 << 8)
#define LS_DISP_COLUMN (2 << 8)
#define LS_DISP_CROSS (3 << 8)
#ifndef S_ISTXT
#define S_ISTXT S_ISVTX
@ -91,6 +124,7 @@ static void
make_fileinfo(const char *filename, struct fileinfo *file, int flags)
{
char buf[128];
int file_type = 0;
struct stat *st = &file->st;
file->inode = st->st_ino;
@ -100,23 +134,36 @@ make_fileinfo(const char *filename, struct fileinfo *file, int flags)
file->bsize = st->st_blocks * 512 / 1024;
#endif
if(S_ISDIR(st->st_mode))
if(S_ISDIR(st->st_mode)) {
file->mode[0] = 'd';
file_type = '/';
}
else if(S_ISCHR(st->st_mode))
file->mode[0] = 'c';
else if(S_ISBLK(st->st_mode))
file->mode[0] = 'b';
else if(S_ISREG(st->st_mode))
else if(S_ISREG(st->st_mode)) {
file->mode[0] = '-';
else if(S_ISFIFO(st->st_mode))
if(st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))
file_type = '*';
}
else if(S_ISFIFO(st->st_mode)) {
file->mode[0] = 'p';
else if(S_ISLNK(st->st_mode))
file_type = '|';
}
else if(S_ISLNK(st->st_mode)) {
file->mode[0] = 'l';
else if(S_ISSOCK(st->st_mode))
file_type = '@';
}
else if(S_ISSOCK(st->st_mode)) {
file->mode[0] = 's';
file_type = '=';
}
#ifdef S_ISWHT
else if(S_ISWHT(st->st_mode))
else if(S_ISWHT(st->st_mode)) {
file->mode[0] = 'w';
file_type = '%';
}
#endif
else
file->mode[0] = '?';
@ -177,9 +224,10 @@ make_fileinfo(const char *filename, struct fileinfo *file, int flags)
{
time_t t = time(NULL);
struct tm *tm = localtime(&st->st_mtime);
if((t - st->st_mtime > 6*30*24*60*60) ||
(st->st_mtime - t > 6*30*24*60*60))
time_t mtime = st->st_mtime;
struct tm *tm = localtime(&mtime);
if((t - mtime > 6*30*24*60*60) ||
(mtime - t > 6*30*24*60*60))
strftime(buf, sizeof(buf), "%b %e %Y", tm);
else
strftime(buf, sizeof(buf), "%b %e %H:%M", tm);
@ -191,7 +239,10 @@ make_fileinfo(const char *filename, struct fileinfo *file, int flags)
p++;
else
p = filename;
file->filename = strdup(p);
if((flags & LS_TYPE) && file_type != 0)
asprintf(&file->filename, "%s%c", p, file_type);
else
file->filename = strdup(p);
}
if(S_ISLNK(st->st_mode)) {
int n;
@ -267,7 +318,7 @@ compare_mtime(struct fileinfo *a, struct fileinfo *b)
return 1;
if(b->filename == NULL)
return -1;
return a->st.st_mtime - b->st.st_mtime;
return b->st.st_mtime - a->st.st_mtime;
}
static int
@ -277,7 +328,7 @@ compare_size(struct fileinfo *a, struct fileinfo *b)
return 1;
if(b->filename == NULL)
return -1;
return a->st.st_size - b->st.st_size;
return b->st.st_size - a->st.st_size;
}
static void
@ -299,16 +350,22 @@ log10(int num)
* have to fetch them.
*/
#ifdef KRB4
static int do_the_afs_dance = 1;
#endif
static int
lstat_file (const char *file, struct stat *sb)
{
#ifdef KRB4
if (k_hasafs()
if (do_the_afs_dance &&
k_hasafs()
&& strcmp(file, ".")
&& strcmp(file, ".."))
&& strcmp(file, "..")
&& strcmp(file, "/"))
{
struct ViceIoctl a_params;
char *last;
char *dir, *last;
char *path_bkp;
static ino_t ino_counter = 0, ino_last = 0;
int ret;
@ -328,16 +385,28 @@ lstat_file (const char *file, struct stat *sb)
last = strrchr (path_bkp, '/');
if (last != NULL) {
*last = '\0';
a_params.in = last + 1;
} else
a_params.in = (char *)file;
if(last[1] == '\0')
/* if path ended in /, replace with `.' */
a_params.in = ".";
else
a_params.in = last + 1;
while(last > path_bkp && *--last == '/');
if(*last != '/' || last != path_bkp) {
*++last = '\0';
dir = path_bkp;
} else
/* we got to the start, so this must be the root dir */
dir = "/";
} else {
/* file is relative to cdir */
dir = ".";
a_params.in = path_bkp;
}
a_params.in_size = strlen (a_params.in) + 1;
a_params.out_size = maxsize;
ret = k_pioctl (last ? path_bkp : "." ,
VIOC_AFS_STAT_MT_PT, &a_params, 0);
ret = k_pioctl (dir, VIOC_AFS_STAT_MT_PT, &a_params, 0);
free (a_params.out);
if (ret < 0) {
free (path_bkp);
@ -354,7 +423,7 @@ lstat_file (const char *file, struct stat *sb)
* use . as a prototype
*/
ret = lstat (path_bkp, sb);
ret = lstat (dir, sb);
free (path_bkp);
if (ret < 0)
return ret;
@ -413,7 +482,7 @@ list_files(FILE *out, const char **files, int n_files, int flags)
(int (*)(const void*, const void*))compare_size);
break;
}
{
if(DISP_MODE(flags) == LS_DISP_LONG) {
int max_inode = 0;
int max_bsize = 0;
int max_n_link = 0;
@ -481,10 +550,58 @@ list_files(FILE *out, const char **files, int n_files, int flags)
max_major,
max_minor,
max_date);
for(i = 0; i < n_files; i++)
free_fileinfo(&fi[i]);
free(fi);
} else if(DISP_MODE(flags) == LS_DISP_COLUMN ||
DISP_MODE(flags) == LS_DISP_CROSS) {
int max_len = 0;
int num_files = n_files;
int columns;
int j;
for(i = 0; i < n_files; i++) {
if(fi[i].filename == NULL) {
num_files--;
continue;
}
if(strlen(fi[i].filename) > max_len)
max_len = strlen(fi[i].filename);
}
columns = 80 / (max_len + 1); /* get space between columns */
max_len = 80 / columns;
if(DISP_MODE(flags) == LS_DISP_CROSS) {
for(i = 0, j = 0; i < n_files; i++) {
if(fi[i].filename == NULL)
continue;
sec_fprintf2(out, "%-*s", max_len, fi[i].filename);
j++;
if(j == columns) {
sec_fprintf2(out, "\r\n");
j = 0;
}
}
if(j > 0)
sec_fprintf2(out, "\r\n");
} else {
int skip = (num_files + columns - 1) / columns;
j = 0;
for(i = 0; i < skip; i++) {
for(j = i; j < n_files;) {
while(j < n_files && fi[j].filename == NULL)
j++;
sec_fprintf2(out, "%-*s", max_len, fi[j].filename);
j += skip;
}
sec_fprintf2(out, "\r\n");
}
}
} else {
for(i = 0; i < n_files; i++) {
if(fi[i].filename == NULL)
continue;
sec_fprintf2(out, "%s\r\n", fi[i].filename);
}
}
for(i = 0; i < n_files; i++)
free_fileinfo(&fi[i]);
free(fi);
}
static void
@ -544,17 +661,21 @@ list_dir(FILE *out, const char *directory, int flags)
void
builtin_ls(FILE *out, const char *file)
{
int flags = LS_SORT_NAME;
int flags = LS_SORT_NAME | LS_IGNORE_DOT | LS_DISP_LONG;
if(*file == '-') {
const char *p;
for(p = file + 1; *p; p++) {
switch(*p) {
case '1':
flags = (flags & ~LS_DISP_MODE);
break;
case 'a':
case 'A':
flags &= ~LS_IGNORE_DOT;
break;
case 'C':
flags = (flags & ~LS_DISP_MODE) | LS_DISP_COLUMN;
break;
case 'd':
flags |= LS_DIRS;
@ -562,10 +683,14 @@ builtin_ls(FILE *out, const char *file)
case 'f':
flags = (flags & ~LS_SORT_MODE);
break;
case 'F':
flags |= LS_TYPE;
break;
case 'i':
flags |= flags | LS_INODE;
flags |= LS_INODE;
break;
case 'l':
flags = (flags & ~LS_DISP_MODE) | LS_DISP_LONG;
break;
case 't':
flags = (flags & ~LS_SORT_MODE) | LS_SORT_MTIME;
@ -579,6 +704,9 @@ builtin_ls(FILE *out, const char *file)
case 'r':
flags |= LS_SORT_REVERSE;
break;
case 'x':
flags = (flags & ~LS_DISP_MODE) | LS_DISP_CROSS;
break;
}
}
file = ".";

View file

@ -37,7 +37,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: popen.c,v 1.19 1999/09/16 20:38:45 assar Exp $");
RCSID("$Id: popen.c,v 1.22 2001/02/05 07:51:51 assar Exp $");
#endif
#include <sys/types.h>
@ -61,10 +61,9 @@ RCSID("$Id: popen.c,v 1.19 1999/09/16 20:38:45 assar Exp $");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <roken.h>
#include "extern.h"
#include <roken.h>
/*
* Special version of popen which avoids call to shell. This ensures
@ -97,13 +96,16 @@ ftp_rooted(const char *path)
}
#define MAXARGS 100
#define MAXGLOBS 1000
FILE *
ftpd_popen(char *program, char *type, int do_stderr, int no_glob)
{
char *cp;
FILE *iop;
int argc, gargc, pdes[2], pid;
char **pop, *argv[100], *gargv[1000];
char **pop, *argv[MAXARGS], *gargv[MAXGLOBS];
char *foo;
if (strcmp(type, "r") && strcmp(type, "w"))
@ -126,14 +128,15 @@ ftpd_popen(char *program, char *type, int do_stderr, int no_glob)
/* break up string into pieces */
foo = NULL;
for (argc = 0, cp = program;; cp = NULL) {
for (argc = 0, cp = program; argc < MAXARGS - 1; cp = NULL) {
if (!(argv[argc++] = strtok_r(cp, " \t\n", &foo)))
break;
}
argv[MAXARGS - 1] = NULL;
gargv[0] = (char*)ftp_rooted(argv[0]);
/* glob each piece */
for (gargc = argc = 1; argv[argc]; argc++) {
for (gargc = argc = 1; argv[argc] && gargc < MAXGLOBS - 1; argc++) {
glob_t gl;
int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
@ -141,7 +144,9 @@ ftpd_popen(char *program, char *type, int do_stderr, int no_glob)
if (no_glob || glob(argv[argc], flags, NULL, &gl))
gargv[gargc++] = strdup(argv[argc]);
else
for (pop = gl.gl_pathv; *pop; pop++)
for (pop = gl.gl_pathv;
*pop && gargc < MAXGLOBS - 1;
pop++)
gargv[gargc++] = strdup(*pop);
globfree(&gl);
}

View file

@ -1,14 +1,18 @@
# $Id: Makefile.am,v 1.1 1999/07/22 11:36:26 assar Exp $
# $Id: Makefile.am,v 1.5 2000/11/15 22:51:08 assar Exp $
include $(top_srcdir)/Makefile.am.common
noinst_PROGRAMS = kf kfd
bin_PROGRAMS = kf
libexec_PROGRAMS = kfd
man_MANS = kf.1 kfd.8
kf_SOURCES = kf.c kf_locl.h
kfd_SOURCES = kfd.c kf_locl.h
LDADD = $(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken)

View file

@ -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.1 1999/07/22 11:36:26 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.5 2000/11/15 22:51:08 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
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
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,78 +170,88 @@ 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)
noinst_PROGRAMS = kf kfd
bin_PROGRAMS = kf
libexec_PROGRAMS = kfd
man_MANS = kf.1 kfd.8
kf_SOURCES = kf.c kf_locl.h
kfd_SOURCES = kfd.c kf_locl.h
LDADD = $(top_builddir)/lib/krb5/libkrb5.la $(top_builddir)/lib/des/libdes.la $(top_builddir)/lib/asn1/libasn1.la $(LIB_roken)
LDADD = $(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken)
subdir = appl/kf
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
noinst_PROGRAMS = kf$(EXEEXT) kfd$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
bin_PROGRAMS = kf$(EXEEXT)
libexec_PROGRAMS = kfd$(EXEEXT)
PROGRAMS = $(bin_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@
kf_OBJECTS = kf.$(OBJEXT)
am_kf_OBJECTS = kf.$(OBJEXT)
kf_OBJECTS = $(am_kf_OBJECTS)
kf_LDADD = $(LDADD)
kf_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/des/libdes.la $(top_builddir)/lib/asn1/libasn1.la
$(top_builddir)/lib/asn1/libasn1.la
kf_LDFLAGS =
kfd_OBJECTS = kfd.$(OBJEXT)
am_kfd_OBJECTS = kfd.$(OBJEXT)
kfd_OBJECTS = $(am_kfd_OBJECTS)
kfd_LDADD = $(LDADD)
kfd_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/des/libdes.la $(top_builddir)/lib/asn1/libasn1.la
$(top_builddir)/lib/asn1/libasn1.la
kfd_LDFLAGS =
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 = $(kf_SOURCES) $(kfd_SOURCES)
man1dir = $(mandir)/man1
man8dir = $(mandir)/man8
MANS = $(man_MANS)
depcomp =
DIST_COMMON = 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 = $(kf_SOURCES) $(kfd_SOURCES)
OBJECTS = $(kf_OBJECTS) $(kfd_OBJECTS)
OBJECTS = $(am_kf_OBJECTS) $(am_kfd_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/kf/Makefile
@ -232,28 +260,61 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstPROGRAMS:
mostlyclean-binPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-noinstPROGRAMS:
distclean-binPROGRAMS:
maintainer-clean-noinstPROGRAMS:
maintainer-clean-binPROGRAMS:
.c.o:
$(COMPILE) -c $<
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
# FIXME: We should only use cygpath when building on Windows,
# and only if it is available.
.c.obj:
$(COMPILE) -c `cygpath -w $<`
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
.s.o:
$(COMPILE) -c $<
mostlyclean-libexecPROGRAMS:
.S.o:
$(COMPILE) -c $<
clean-libexecPROGRAMS:
-test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS)
distclean-libexecPROGRAMS:
maintainer-clean-libexecPROGRAMS:
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libexecdir)
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
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 \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(libexecdir)/$$f"; \
rm -f $(DESTDIR)$(libexecdir)/$$f; \
done
mostlyclean-compile:
-rm -f *.o core *.core
@ -266,15 +327,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
@ -292,26 +344,112 @@ kf$(EXEEXT): $(kf_OBJECTS) $(kf_DEPENDENCIES)
kfd$(EXEEXT): $(kfd_OBJECTS) $(kfd_DEPENDENCIES)
@rm -f kfd$(EXEEXT)
$(LINK) $(kfd_LDFLAGS) $(kfd_OBJECTS) $(kfd_LDADD) $(LIBS)
.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:
$(mkinstalldirs) $(DESTDIR)$(man8dir)
@list='$(man8_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.8*) 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)$(man8dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
done
uninstall-man8:
@list='$(man8_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.8*) 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)$(man8dir)/$$inst"; \
rm -f $(DESTDIR)$(man8dir)/$$inst; \
done
install-man: $(MANS)
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-man1 install-man8
uninstall-man:
@$(NORMAL_UNINSTALL)
$(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:
@ -324,17 +462,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/kf
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
@ -347,24 +484,27 @@ check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-exec: install-exec-am
install-data-am: install-data-local
install-data-am: install-man install-data-local
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
uninstall-man
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) all-local
all-am: Makefile $(PROGRAMS) $(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)$(bindir) $(DESTDIR)$(libexecdir) \
$(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man8
mostlyclean-generic:
@ -376,25 +516,27 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
-rm -f Makefile.in
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-libexecPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \
clean-generic mostlyclean-am
clean-am: clean-binPROGRAMS clean-libexecPROGRAMS clean-compile \
clean-libtool clean-tags clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstPROGRAMS distclean-compile \
distclean-libtool distclean-tags distclean-generic \
clean-am
distclean-am: distclean-binPROGRAMS distclean-libexecPROGRAMS \
distclean-compile distclean-libtool distclean-tags \
distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-libexecPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
@ -403,16 +545,20 @@ maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-libexecPROGRAMS distclean-libexecPROGRAMS \
clean-libexecPROGRAMS maintainer-clean-libexecPROGRAMS \
uninstall-libexecPROGRAMS install-libexecPROGRAMS mostlyclean-compile \
distclean-compile clean-compile maintainer-clean-compile \
mostlyclean-libtool distclean-libtool clean-libtool \
maintainer-clean-libtool 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -422,7 +568,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
@ -434,8 +583,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
@ -504,87 +653,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

View file

@ -0,0 +1,92 @@
.\" Things to fix:
.\" * correct section, and operating system
.\" * remove Op from mandatory flags
.\" * use better macros for arguments (like .Pa for files)
.\"
.Dd July 2, 2000
.Dt KF 1
.Os Heimdal
.Sh NAME
.Nm kf
.Nd
securly forward tickets
.Sh SYNOPSIS
.Nm
.Oo Fl p Ar port \*(Ba Xo
.Fl -port= Ns Ar port Oc
.Xc
.Oo Fl l Ar login \*(Ba Xo
.Fl -login= Ns Ar login Oc
.Xc
.Oo Fl c Ar ccache \*(Ba Xo
.Fl -ccache= Ns Ar ccache Oc
.Xc
.Op Fl F | Fl -forwardable
.Op Fl G | Fl -no-forwardable
.Op Fl h | Fl -help
.Op Fl -version
.Ar host ...
.Sh DESCRIPTION
The
.Nm
program forwards tickets to a remove host through an authenticated
and encrypted stream. Options supported are:
.Bl -tag -width Ds
.It Xo
.Fl p Ar port Ns ,
.Fl -port= Ns Ar port
.Xc
port to connect to
.It Xo
.Fl l Ar login Ns ,
.Fl -login= Ns Ar login
.Xc
remote login name
.It Xo
.Fl c Ar ccache Ns ,
.Fl -ccache= Ns Ar ccache
.Xc
remote cred cache
.It Xo
.Fl F Ns ,
.Fl -forwardable
.Xc
forward forwardable credentials
.It Xo
.Fl G Ns ,
.Fl -no-forwardable
.Xc
do not forward forwardable credentials
.It Xo
.Fl h Ns ,
.Fl -help
.Xc
.It Xo
.Fl -version
.Xc
.El
.Pp
.Nm
is useful when you do not want to enter your password on a remote host
but want to have your tickets one for example afs.
.Pp
In order for
.Nm
to work you will need to acquire your initial ticket with forwardable
flag, ie
.Nm kinit Fl -forwardable .
.Pp
.Nm telnet
is able to forward ticket by itself.
.\".Sh ENVIRONMENT
.\".Sh FILES
.\".Sh EXAMPLES
.\".Sh DIAGNOSTICS
.Sh SEE ALSO
.Xr kfd 8 ,
.Xr kinit 1 ,
.Xr telnet 1
.\".Sh STANDARDS
.\".Sh HISTORY
.\".Sh AUTHORS
.\".Sh BUGS

View file

@ -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 "kf_locl.h"
RCSID("$Id: kf.c,v 1.13 1999/12/04 18:04:09 assar Exp $");
RCSID("$Id: kf.c,v 1.14 2000/12/31 07:31:06 assar Exp $");
krb5_context context;
static int help_flag;
@ -75,7 +75,7 @@ client_setup(krb5_context *context, int *argc, char **argv)
status = krb5_init_context (context);
if (status)
errx(1, "krb5_init_context failed: %u", status);
errx(1, "krb5_init_context failed: %d", status);
forwardable = krb5_config_get_bool (*context, NULL,
"libdefaults",

View file

@ -0,0 +1,59 @@
.\" Things to fix:
.\" * correct section, and operating system
.\" * remove Op from mandatory flags
.\" * use better macros for arguments (like .Pa for files)
.\"
.Dd July 2, 2000
.Dt KFD 8
.Os Heimdal
.Sh NAME
.Nm kfd
.Nd
receive forwarded tickets
.Sh SYNOPSIS
.Nm
.Oo Fl p Ar port \*(Ba Xo
.Fl -port= Ns Ar port Oc
.Xc
.Op Fl i | Fl -inetd
.Oo Fl R Ar regpag \*(Ba Xo
.Fl -regpag= Ns Ar regpag Oc
.Xc
.Op Fl h | Fl -help
.Op Fl -version
.Sh DESCRIPTION
This is the daemon for
.Nm kf .
Supported options:
.Bl -tag -width Ds
.It Xo
.Fl p Ar port Ns ,
.Fl -port= Ns Ar port
.Xc
port to listen to
.It Xo
.Fl i Ns ,
.Fl -inetd
.Xc
not started from inetd
.It Xo
.Fl R Ar regpag Ns ,
.Fl -regpag= Ns Ar regpag
.Xc
path to regpag binary
.El
.\".Sh ENVIRONMENT
.\".Sh FILES
.Sh EXAMPLES
Put the following in
.Pa /etc/inetd.conf :
.Bd -literal
kf stream tcp nowait root /usr/heimdal/libexec/kfd kfd
.Ed
.\".Sh DIAGNOSTICS
.Sh SEE ALSO
.Xr kf 1
.\".Sh STANDARDS
.\".Sh HISTORY
.\".Sh AUTHORS
.\".Sh BUGS

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,7 +32,7 @@
*/
#include "kf_locl.h"
RCSID("$Id: kfd.c,v 1.7 1999/12/02 17:04:55 joda Exp $");
RCSID("$Id: kfd.c,v 1.8 2001/01/09 18:43:10 assar Exp $");
krb5_context context;
char krb5_tkfile[MAXPATHLEN];
@ -266,7 +266,7 @@ proto (int sock, const char *service)
krb5_get_err_text(context, status));
goto out;
}
status = krb5_rd_cred (context, auth_context, ccache, &data);
status = krb5_rd_cred2 (context, auth_context, ccache, &data);
krb5_cc_close (context, ccache);
if (status) {
syslog_and_cont("krb5_rd_cred: %s",

View file

@ -1,3 +1,57 @@
2001-01-29 Assar Westerlund <assar@sics.se>
* login.c: remove some krb5_free_context that might happen at
unappropriate times
2000-12-31 Assar Westerlund <assar@sics.se>
* login.c (main): handle krb5_init_context failure consistently
2000-12-11 Assar Westerlund <assar@sics.se>
* login.c (do_login): set the group on the tty.
(r_flag): comment out
* login.c (krb5_to4): always return a value
2000-10-15 Assar Westerlund <assar@sics.se>
* login.c (krb5_to4): check another return code
2000-08-22 Johan Danielsson <joda@pdc.kth.se>
* login.c (do_login): set PATH to something sane;
(start_logout_process): avoid getting signals sent to the parent
* login_locl.h: _PATH_DEFPATH
2000-07-01 Assar Westerlund <assar@sics.se>
* login.c (login_timeout): add back
2000-06-28 Johan Danielsson <joda@pdc.kth.se>
* env.c: new file for environment related functions
* login.c: move environment stuff to separate file, allow
specifying list of environment files via login.conf
2000-06-21 Assar Westerlund <assar@sics.se>
* Makefile.am (LDADD): add otp
* login.c: add reading of /etc/environment. From Ake Sandgren
<ake@cs.umu.se>
add otp support. From Daniel Kouril <kouril@ics.muni.cz>
2000-06-09 Assar Westerlund <assar@sics.se>
* login.c (do_login): work-around for setuid and capabilities bug
fixed in Linux 2.2.16
2000-04-09 Assar Westerlund <assar@sics.se>
* login.c: allow conversion of v5 -> v4 tickets when logging in
with forwarded tickets
1999-11-09 Johan Danielsson <joda@pdc.kth.se>
* conf.c: remove case for not having cgetent, since it's in roken

View file

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.16 1999/10/30 08:51:45 assar Exp $
# $Id: Makefile.am,v 1.19 2000/11/15 22:51:08 assar Exp $
include $(top_srcdir)/Makefile.am.common
@ -6,27 +6,30 @@ INCLUDES += $(INCLUDE_krb4)
bin_PROGRAMS = login
login_SOURCES = \
login_SOURCES = \
conf.c \
env.c \
login.c \
osfc2.c \
read_string.c \
utmp_login.c \
utmpx_login.c \
tty.c \
stty_default.c \
login_access.c \
login_locl.h \
login_proto.h \
conf.c \
shadow.c
login_protos.h \
osfc2.c \
read_string.c \
shadow.c \
stty_default.c \
tty.c \
utmp_login.c \
utmpx_login.c
LDADD = $(LIB_kafs) \
LDADD = $(LIB_otp) \
$(LIB_kafs) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_krb4) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken) \
$(LIB_security)
$(LIB_security) \
$(DBLIB)
$(srcdir)/login_protos.h:
cd $(srcdir); perl ../../cf/make-proto.pl -o login_protos.h $(login_SOURCES) || rm -f login_protos.h

View file

@ -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.16 1999/10/30 08:51:45 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.19 2000/11/15 22:51:08 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)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
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,34 +170,52 @@ 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)
bin_PROGRAMS = login
login_SOURCES = login.c osfc2.c read_string.c utmp_login.c utmpx_login.c tty.c stty_default.c login_access.c login_locl.h login_proto.h conf.c shadow.c
login_SOURCES = \
conf.c \
env.c \
login.c \
login_access.c \
login_locl.h \
login_protos.h \
osfc2.c \
read_string.c \
shadow.c \
stty_default.c \
tty.c \
utmp_login.c \
utmpx_login.c
LDADD = $(LIB_kafs) $(top_builddir)/lib/krb5/libkrb5.la $(LIB_krb4) $(top_builddir)/lib/des/libdes.la $(top_builddir)/lib/asn1/libasn1.la $(LIB_roken) $(LIB_security)
LDADD = $(LIB_otp) \
$(LIB_kafs) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_krb4) \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken) \
$(LIB_security) \
$(DBLIB)
subdir = appl/login
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
@ -190,42 +226,41 @@ PROGRAMS = $(bin_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@
login_OBJECTS = login.$(OBJEXT) osfc2.$(OBJEXT) read_string.$(OBJEXT) \
utmp_login.$(OBJEXT) utmpx_login.$(OBJEXT) tty.$(OBJEXT) \
stty_default.$(OBJEXT) login_access.$(OBJEXT) conf.$(OBJEXT) \
shadow.$(OBJEXT)
am_login_OBJECTS = conf.$(OBJEXT) env.$(OBJEXT) login.$(OBJEXT) \
login_access.$(OBJEXT) osfc2.$(OBJEXT) read_string.$(OBJEXT) \
shadow.$(OBJEXT) stty_default.$(OBJEXT) tty.$(OBJEXT) \
utmp_login.$(OBJEXT) utmpx_login.$(OBJEXT)
login_OBJECTS = $(am_login_OBJECTS)
login_LDADD = $(LDADD)
@KRB4_FALSE@login_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@login_DEPENDENCIES = $(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@$(top_builddir)/lib/des/libdes.la \
@KRB4_TRUE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_FALSE@login_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/des/libdes.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la
login_LDFLAGS =
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 = $(login_SOURCES)
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 = $(login_SOURCES)
OBJECTS = $(login_OBJECTS)
OBJECTS = $(am_login_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/login/Makefile
@ -248,31 +283,20 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`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)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$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)
@ -284,15 +308,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
@ -306,26 +321,36 @@ maintainer-clean-libtool:
login$(EXEEXT): $(login_OBJECTS) $(login_DEPENDENCIES)
@rm -f login$(EXEEXT)
$(LINK) $(login_LDFLAGS) $(login_OBJECTS) $(login_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
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:
@ -338,17 +363,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/login
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
@ -377,7 +401,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) 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)$(bindir)
@ -391,6 +415,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-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -426,7 +451,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -436,7 +461,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
@ -448,8 +476,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
@ -518,87 +546,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

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,7 +32,7 @@
#include "login_locl.h"
RCSID("$Id: conf.c,v 1.2 1999/11/09 18:05:49 joda Exp $");
RCSID("$Id: conf.c,v 1.3 2000/05/29 16:52:24 assar Exp $");
static char *confbuf;
@ -49,7 +49,7 @@ login_conf_get_string(const char *str)
char *value;
if(login_conf_init() != 0)
return NULL;
if(cgetstr(confbuf, str, &value) < 0)
if(cgetstr(confbuf, (char *)str, &value) < 0)
return NULL;
return value;
}

View file

@ -0,0 +1,98 @@
/*
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "login_locl.h"
RCSID("$Id: env.c,v 1.1 2000/06/28 12:27:38 joda Exp $");
/*
* the environment we will send to execle and the shell.
*/
char **env;
int num_env;
void
extend_env(char *str)
{
env = realloc(env, (num_env + 1) * sizeof(*env));
if(env == NULL)
errx(1, "Out of memory!");
env[num_env++] = str;
}
void
add_env(const char *var, const char *value)
{
int i;
char *str;
asprintf(&str, "%s=%s", var, value);
if(str == NULL)
errx(1, "Out of memory!");
for(i = 0; i < num_env; i++)
if(strncmp(env[i], var, strlen(var)) == 0 &&
env[i][strlen(var)] == '='){
free(env[i]);
env[i] = str;
return;
}
extend_env(str);
}
void
copy_env(void)
{
char **p;
for(p = environ; *p; p++)
extend_env(*p);
}
int
login_read_env(const char *file)
{
char **newenv;
char *p;
int i, j;
newenv = NULL;
i = read_environment(file, &newenv);
for (j = 0; j < i; j++) {
p = strchr(newenv[j], '=');
*p++ = 0;
add_env(newenv[j], p);
*--p = '=';
free(newenv[j]);
}
free(newenv);
return 0;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -39,50 +39,9 @@
#include <sys/capability.h>
#endif
RCSID("$Id: login.c,v 1.33 1999/12/02 17:04:55 joda Exp $");
RCSID("$Id: login.c,v 1.46 2001/01/29 02:18:03 assar Exp $");
/*
* the environment we will send to execle and the shell.
*/
static char **env;
static int num_env;
static void
extend_env(char *str)
{
env = realloc(env, (num_env + 1) * sizeof(*env));
if(env == NULL)
errx(1, "Out of memory!");
env[num_env++] = str;
}
static void
add_env(const char *var, const char *value)
{
int i;
char *str;
asprintf(&str, "%s=%s", var, value);
if(str == NULL)
errx(1, "Out of memory!");
for(i = 0; i < num_env; i++)
if(strncmp(env[i], var, strlen(var)) == 0 &&
env[i][strlen(var)] == '='){
free(env[i]);
env[i] = str;
return;
}
extend_env(str);
}
static void
copy_env(void)
{
char **p;
for(p = environ; *p; p++)
extend_env(*p);
}
static int login_timeout = 60;
static int
start_login_process(void)
@ -118,8 +77,11 @@ start_logout_process(void)
argv0 = prog;
pid = fork();
if(pid == 0)
if(pid == 0) {
/* avoid getting signals sent to the shell */
setpgid(0, getpid());
return 0;
}
if(pid == -1)
err(1, "fork");
/* wait for the real login process to exit */
@ -167,7 +129,18 @@ exec_shell(const char *shell, int fallback)
err(1, "%s", shell);
}
static enum { AUTH_KRB4, AUTH_KRB5 } auth;
static enum { NONE = 0, AUTH_KRB4 = 1, AUTH_KRB5 = 2, AUTH_OTP = 3 } auth;
#ifdef OTP
static OtpContext otp_ctx;
static int
otp_verify(struct passwd *pwd, const char *password)
{
return (otp_verify_user (&otp_ctx, password));
}
#endif /* OTP */
#ifdef KRB5
static krb5_context context;
@ -179,19 +152,12 @@ krb5_verify(struct passwd *pwd, const char *password)
krb5_error_code ret;
krb5_principal princ;
ret = krb5_init_context(&context);
ret = krb5_parse_name(context, pwd->pw_name, &princ);
if(ret)
return 1;
ret = krb5_parse_name(context, pwd->pw_name, &princ);
if(ret){
krb5_free_context(context);
return 1;
}
ret = krb5_cc_gen_new(context, &krb5_mcc_ops, &id);
if(ret){
if(ret) {
krb5_free_principal(context, princ);
krb5_free_context(context);
return 1;
}
ret = krb5_verify_user_lrealm(context,
@ -201,11 +167,54 @@ krb5_verify(struct passwd *pwd, const char *password)
1,
NULL);
krb5_free_principal(context, princ);
if (ret)
krb5_free_context (context);
return ret;
}
#ifdef KRB4
static krb5_error_code
krb5_to4 (krb5_ccache id)
{
if (krb5_config_get_bool(context, NULL,
"libdefaults",
"krb4_get_tickets",
NULL)) {
CREDENTIALS c;
krb5_creds mcred, cred;
char krb4tkfile[MAXPATHLEN];
krb5_error_code ret;
krb5_principal princ;
ret = krb5_cc_get_principal (context, id, &princ);
if (ret)
return ret;
ret = krb5_make_principal(context, &mcred.server,
princ->realm,
"krbtgt",
princ->realm,
NULL);
krb5_free_principal (context, princ);
if (ret)
return ret;
ret = krb5_cc_retrieve_cred(context, id, 0, &mcred, &cred);
if(ret == 0) {
ret = krb524_convert_creds_kdc(context, id, &cred, &c);
if(ret == 0) {
snprintf(krb4tkfile,sizeof(krb4tkfile),"%s%d",TKT_ROOT,
getuid());
krb_set_tkt_string(krb4tkfile);
tf_setup(&c, c.pname, c.pinst);
}
memset(&c, 0, sizeof(c));
krb5_free_creds_contents(context, &cred);
}
krb5_free_principal(context, mcred.server);
}
return 0;
}
#endif /* KRB4 */
static int
krb5_start_session (const struct passwd *pwd)
{
@ -224,35 +233,7 @@ krb5_start_session (const struct passwd *pwd)
return ret;
}
#ifdef KRB4
if (krb5_config_get_bool(context, NULL,
"libdefaults",
"krb4_get_tickets",
NULL)) {
CREDENTIALS c;
krb5_creds mcred, cred;
krb5_realm realm;
char krb4tkfile[MAXPATHLEN];
krb5_get_default_realm(context, &realm);
krb5_make_principal(context, &mcred.server, realm,
"krbtgt",
realm,
NULL);
free (realm);
ret = krb5_cc_retrieve_cred(context, id2, 0, &mcred, &cred);
if(ret == 0) {
ret = krb524_convert_creds_kdc(context, id2, &cred, &c);
if(ret == 0) {
snprintf(krb4tkfile,sizeof(krb4tkfile),"%s%d",TKT_ROOT,
getuid());
krb_set_tkt_string(krb4tkfile);
tf_setup(&c, c.pname, c.pinst);
}
memset(&c, 0, sizeof(c));
krb5_free_creds_contents(context, &cred);
}
krb5_free_principal(context, mcred.server);
}
krb5_to4 (id2);
#endif
krb5_cc_close(context, id2);
krb5_cc_destroy(context, id);
@ -279,9 +260,6 @@ krb5_get_afs_tokens (const struct passwd *pwd)
if (!k_hasafs ())
return;
ret = krb5_init_context(&context);
if(ret)
return;
ret = krb5_cc_default(context, &id2);
if (ret == 0) {
@ -299,7 +277,6 @@ krb5_get_afs_tokens (const struct passwd *pwd)
pwd->pw_uid, pwd->pw_dir);
krb5_cc_close (context, id2);
}
krb5_free_context (context);
}
#endif /* KRB4 */
@ -365,14 +342,17 @@ krb4_get_afs_tokens (const struct passwd *pwd)
static int f_flag;
static int p_flag;
#if 0
static int r_flag;
#endif
static int version_flag;
static int help_flag;
static char *remote_host;
static char *auth_level = NULL;
struct getargs args[] = {
{ NULL, 'a', arg_string, &auth_level, "authentication mode" },
#if 0
{ NULL, 'a' },
{ NULL, 'd' },
#endif
{ NULL, 'f', arg_flag, &f_flag, "pre-authenticated" },
@ -450,7 +430,7 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
else
tty_gid = pwd->pw_gid;
if (chown (ttyn, pwd->pw_uid, pwd->pw_gid) < 0) {
if (chown (ttyn, pwd->pw_uid, tty_gid) < 0) {
warn("chown %s", ttyn);
if (rootlogin == 0)
exit (1);
@ -481,7 +461,7 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
if(rootlogin == 0)
exit(1);
}
if(setuid(pwd->pw_uid)){
if(setuid(pwd->pw_uid) || (pwd->pw_uid != 0 && setuid(0) == 0)) {
warn("setuid(%u)", (unsigned)pwd->pw_uid);
if(rootlogin == 0)
exit(1);
@ -560,17 +540,44 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
#ifdef KRB5
if (auth == AUTH_KRB5) {
krb5_start_session (pwd);
krb5_finish ();
}
#ifdef KRB4
else if (auth == 0) {
krb5_error_code ret;
krb5_ccache id;
ret = krb5_cc_default (context, &id);
if (ret == 0) {
krb5_to4 (id);
krb5_cc_close (context, id);
}
}
krb5_get_afs_tokens (pwd);
#endif /* KRB4 */
krb5_finish ();
#endif /* KRB5 */
#ifdef KRB4
krb4_get_afs_tokens (pwd);
#endif /* KRB4 */
add_env("PATH", _PATH_DEFPATH);
{
const char *str = login_conf_get_string("environment");
char buf[MAXPATHLEN];
if(str == NULL) {
login_read_env(_PATH_ETC_ENVIRONMENT);
} else {
while(strsep_copy(&str, ",", buf, sizeof(buf)) != -1) {
if(buf[0] == '\0')
continue;
login_read_env(buf);
}
}
}
add_env("HOME", home_dir);
add_env("USER", pwd->pw_name);
add_env("LOGNAME", pwd->pw_name);
@ -603,6 +610,12 @@ check_password(struct passwd *pwd, const char *password)
auth = AUTH_KRB4;
return 0;
}
#endif
#ifdef OTP
if (otp_verify (pwd, password) == 0) {
auth = AUTH_OTP;
return 0;
}
#endif
return 1;
}
@ -614,6 +627,17 @@ usage(int status)
exit(status);
}
static RETSIGTYPE
sig_handler(int sig)
{
if (sig == SIGALRM)
fprintf(stderr, "Login timed out after %d seconds\n",
login_timeout);
else
fprintf(stderr, "Login received signal, exiting\n");
exit(0);
}
int
main(int argc, char **argv)
{
@ -624,9 +648,20 @@ main(int argc, char **argv)
int optind = 0;
int ask = 1;
struct sigaction sa;
set_progname(argv[0]);
#ifdef KRB5
{
krb5_error_code ret;
ret = krb5_init_context(&context);
if (ret)
errx (1, "krb5_init_context failed: %d", ret);
}
#endif
openlog("login", LOG_ODELAY, LOG_AUTH);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
@ -664,21 +699,41 @@ main(int argc, char **argv)
ask = 0;
}
}
#if defined(DCE) && defined(AIX)
esetenv("AUTHSTATE", "DCE", 1);
#endif
/* XXX should we care about environment on the command line? */
memset(&sa, 0, sizeof(sa));
sa.sa_handler = sig_handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(SIGALRM, &sa, NULL);
alarm(login_timeout);
for(try = 0; try < max_tries; try++){
struct passwd *pwd;
char password[128];
int ret;
char ttname[32];
char *tty, *ttyn;
char prompt[128];
#ifdef OTP
char otp_str[256];
#endif
if(ask){
f_flag = r_flag = 0;
f_flag = 0;
#if 0
r_flag = 0;
#endif
ret = read_string("login: ", username, sizeof(username), 1);
if(ret == -3)
exit(0);
if(ret == -2)
continue;
sig_handler(0); /* exit */
}
pwd = k_getpwnam(username);
#ifdef ALLOW_NULL_PASSWORD
@ -687,11 +742,28 @@ main(int argc, char **argv)
}
else
#endif
if(f_flag == 0) {
ret = read_string("Password: ", password, sizeof(password), 0);
if(ret == -3 || ret == -2)
continue;
}
{
#ifdef OTP
if(auth_level && strcmp(auth_level, "otp") == 0 &&
otp_challenge(&otp_ctx, username,
otp_str, sizeof(otp_str)) == 0)
snprintf (prompt, sizeof(prompt), "%s's %s Password: ",
username, otp_str);
else
#endif
strncpy(prompt, "Password: ", sizeof(prompt));
if (f_flag == 0) {
ret = read_string(prompt, password, sizeof(password), 0);
if (ret == -3) {
ask = 1;
continue;
}
if (ret == -2)
sig_handler(0);
}
}
if(pwd == NULL){
fprintf(stderr, "Login incorrect.\n");
@ -724,6 +796,7 @@ main(int argc, char **argv)
pwd->pw_name, tty);
exit (1);
}
alarm(0);
do_login(pwd, tty, ttyn);
}
exit(1);

View file

@ -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.
*
@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: login_locl.h,v 1.17 1999/12/02 17:04:55 joda Exp $ */
/* $Id: login_locl.h,v 1.20 2000/08/22 14:05:35 joda Exp $ */
#ifndef __LOGIN_LOCL_H__
#define __LOGIN_LOCL_H__
@ -86,6 +86,10 @@
#endif
#include <kafs.h>
#ifdef OTP
#include <otp.h>
#endif
#ifndef _PATH_BSHELL
#define _PATH_BSHELL "/bin/sh"
#endif
@ -121,8 +125,19 @@
#define _PATH_LOGIN_CONF "/etc/login.conf"
#endif /* _PATH_LOGIN_CONF */
#ifndef _PATH_ETC_ENVIRONMENT
#define _PATH_ETC_ENVIRONMENT "/etc/environment"
#endif
#ifndef _PATH_DEFPATH
#define _PATH_DEFPATH "/usr/bin:/bin"
#endif
struct spwd;
extern char **env;
extern int num_env;
#include "login_protos.h"
#endif /* __LOGIN_LOCL_H__ */

View file

@ -13,6 +13,11 @@
#endif
#endif
void
add_env __P((
const char *var,
const char *value));
void
check_shadow __P((
const struct passwd *pw,
@ -21,9 +26,15 @@ check_shadow __P((
char *
clean_ttyname __P((char *tty));
void
copy_env __P((void));
int
do_osfc2_magic __P((uid_t uid));
void
extend_env __P((char *str));
int
login_access __P((
struct passwd *user,
@ -32,6 +43,9 @@ login_access __P((
char *
login_conf_get_string __P((const char *str));
int
login_read_env __P((const char *file));
char *
make_id __P((char *tty));

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 Kungliga Tekniska Högskolan
* Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,7 +33,7 @@
#include "login_locl.h"
RCSID("$Id: read_string.c,v 1.3 1999/12/02 17:04:56 joda Exp $");
RCSID("$Id: read_string.c,v 1.4 2000/06/21 02:09:36 assar Exp $");
static sig_atomic_t intr_flag;
@ -62,7 +62,7 @@ read_string(const char *prompt, char *buf, size_t len, int echo)
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
for(i = 0; i < sizeof(sigs) / sizeof(sigs[0]); i++)
sigaction(i, &sa, &sigs[i]);
if (i != SIGALRM) sigaction(i, &sa, &sigs[i]);
if((tty = fopen("/dev/tty", "r")) == NULL)
tty = stdin;
@ -104,7 +104,7 @@ read_string(const char *prompt, char *buf, size_t len, int echo)
fclose(tty);
for(i = 0; i < sizeof(sigs) / sizeof(sigs[0]); i++)
sigaction(i, &sigs[i], NULL);
if (i != SIGALRM) sigaction(i, &sigs[i], NULL);
if(ret)
return -3;

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -0,0 +1,29 @@
2001-01-29 Assar Westerlund <assar@sics.se>
* util.c (roundup): add fallback definition
* rcp.c: remove non-STDC code
* rcp_locl.h: add sys/types.h and sys/wait.h
* rcp.c: no calls to err with NULL
2001-01-28 Assar Westerlund <assar@sics.se>
* rcp_locl.h: add
* Makefile.am (LDADD): remove unused libraries
2001-01-27 Assar Westerlund <assar@sics.se>
* util.c: replace vfork by fork
* rcp.c: add RCSID S_ISTXT -> S_ISVTX printf sizes of files with
%lu instead of %q (which is not portable)
* util.c: add RCSID do not use sig_t
* rcp.c: remove __P, use st_mtime et al from struct stat
* extern.h: remove __P
* initial import of port of bsd rcp changed to use existing rsh,
contributed by Richard Nyberg <rnyberg@it.su.se>

View file

@ -0,0 +1,11 @@
# $Id: Makefile.am,v 1.2 2001/01/28 22:50:35 assar Exp $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
bin_PROGRAMS = rcp
rcp_SOURCES = rcp.c util.c
LDADD = $(LIB_roken)

View file

@ -0,0 +1,559 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# 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.
# 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
@SET_MAKE@
host_alias = @host_alias@
host_triplet = @host@
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_@
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@
LIB_security = @LIB_security@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
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.2 2001/01/28 22:50:35 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 $(INCLUDES_roken) $(INCLUDE_krb4)
AM_CFLAGS = $(WFLAGS)
CP = cp
COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
buildinclude = $(top_builddir)/include
LIB_XauReadAuth = @LIB_XauReadAuth@
LIB_crypt = @LIB_crypt@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_el_init = @LIB_el_init@
LIB_getattr = @LIB_getattr@
LIB_gethostbyname = @LIB_gethostbyname@
LIB_getpwent_r = @LIB_getpwent_r@
LIB_getpwnam_r = @LIB_getpwnam_r@
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@
LIB_setsockopt = @LIB_setsockopt@
LIB_socket = @LIB_socket@
LIB_syslog = @LIB_syslog@
LIB_tgetent = @LIB_tgetent@
LIBS = @LIBS@
HESIODLIB = @HESIODLIB@
HESIODINCLUDE = @HESIODINCLUDE@
INCLUDE_hesiod = @INCLUDE_hesiod@
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@
NROFF_MAN = groff -mandoc -Tascii
@KRB4_TRUE@LIB_kafs = @KRB4_TRUE@$(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@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)
bin_PROGRAMS = rcp
rcp_SOURCES = rcp.c util.c
LDADD = $(LIB_roken)
subdir = appl/rcp
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = rcp$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I../../include
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
am_rcp_OBJECTS = rcp.$(OBJEXT) util.$(OBJEXT)
rcp_OBJECTS = $(am_rcp_OBJECTS)
rcp_LDADD = $(LDADD)
rcp_DEPENDENCIES =
rcp_LDFLAGS =
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) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(rcp_SOURCES)
depcomp =
DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
GZIP_ENV = --best
SOURCES = $(rcp_SOURCES)
OBJECTS = $(am_rcp_OBJECTS)
all: all-redirect
.SUFFIXES:
.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/rcp/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
mostlyclean-compile:
-rm -f *.o core *.core
-rm -f *.$(OBJEXT)
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
maintainer-clean-libtool:
rcp$(EXEEXT): $(rcp_OBJECTS) $(rcp_DEPENDENCIES)
@rm -f rcp$(EXEEXT)
$(LINK) $(rcp_LDFLAGS) $(rcp_OBJECTS) $(rcp_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
tags: TAGS
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; }'`; \
mkid -fID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
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" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-exec: install-exec-am
install-data-am: install-data-local
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) all-local
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
distclean-tags distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool 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 install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
install-suid-programs:
@foo='$(bin_SUIDS)'; \
for file in $$foo; do \
x=$(DESTDIR)$(bindir)/$$file; \
if chown 0:0 $$x && chmod u+s $$x; then :; else \
echo "*"; \
echo "* Failed to install $$x setuid root"; \
echo "*"; \
fi; done
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
if cmp -s $$file $(buildinclude)/$$f 2> /dev/null ; then \
: ; else \
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done
all-local: install-build-headers
#NROFF_MAN = nroff -man
.1.cat1:
$(NROFF_MAN) $< > $@
.3.cat3:
$(NROFF_MAN) $< > $@
.5.cat5:
$(NROFF_MAN) $< > $@
.8.cat8:
$(NROFF_MAN) $< > $@
dist-cat1-mans:
@foo='$(man1_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.1) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat1/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-cat3-mans:
@foo='$(man3_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.3) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat3/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-cat5-mans:
@foo='$(man5_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.5) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat5/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-cat8-mans:
@foo='$(man8_MANS)'; \
bar='$(man_MANS)'; \
for i in $$bar; do \
case $$i in \
*.8) foo="$$foo $$i";; \
esac; done ;\
for i in $$foo; do \
x=`echo $$i | sed 's/\.[^.]*$$/.cat8/'`; \
echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
done
dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-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
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
.x.c:
@cmp -s $< $@ 2> /dev/null || cp $< $@
check-local::
@foo='$(CHECK_LOCAL)'; \
if test "$$foo"; then \
failed=0; all=0; \
for i in $$foo; do \
all=`expr $$all + 1`; \
if ./$$i --version > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
failed=`expr $$failed + 1`; \
fi; \
done; \
if test "$$failed" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="$$failed of $$all tests failed"; \
fi; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
fi
# 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:

View file

@ -0,0 +1,51 @@
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)extern.h 8.1 (Berkeley) 5/31/93
* $FreeBSD$
*/
typedef struct {
int cnt;
char *buf;
} BUF;
extern int iamremote;
BUF *allocbuf (BUF *, int, int);
char *colon (char *);
void lostconn (int);
void nospace (void);
int okname (char *);
void run_err (const char *, ...);
int susystem (char *, int);
void verifydir (char *);

View file

@ -0,0 +1,807 @@
/*
* Copyright (c) 1983, 1990, 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include "rcp_locl.h"
#define RSH_PROGRAM "rsh"
#define OPTIONS "5dfKpP:rtxz"
struct passwd *pwd;
uid_t userid;
int errs, remin, remout;
int pflag, iamremote, iamrecursive, targetshouldbedirectory;
int doencrypt, noencrypt;
int usebroken, usekrb5;
char *port;
#define CMDNEEDS 64
char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */
int response (void);
void rsource (char *, struct stat *);
void sink (int, char *[]);
void source (int, char *[]);
void tolocal (int, char *[]);
void toremote (char *, int, char *[]);
void usage (void);
int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout);
int
main(argc, argv)
int argc;
char *argv[];
{
int ch, fflag, tflag;
char *targ;
fflag = tflag = 0;
while ((ch = getopt(argc, argv, OPTIONS)) != -1)
switch(ch) { /* User-visible flags. */
case '5':
usekrb5 = 1;
break;
case 'K':
usebroken = 1;
break;
case 'P':
port = optarg;
break;
case 'p':
pflag = 1;
break;
case 'r':
iamrecursive = 1;
break;
case 'x':
doencrypt = 1;
break;
case 'z':
noencrypt = 1;
break;
/* Server options. */
case 'd':
targetshouldbedirectory = 1;
break;
case 'f': /* "from" */
iamremote = 1;
fflag = 1;
break;
case 't': /* "to" */
iamremote = 1;
tflag = 1;
break;
case '?':
default:
usage();
}
argc -= optind;
argv += optind;
if ((pwd = getpwuid(userid = getuid())) == NULL)
errx(1, "unknown user %d", (int)userid);
remin = STDIN_FILENO; /* XXX */
remout = STDOUT_FILENO;
if (fflag) { /* Follow "protocol", send data. */
(void)response();
(void)setuid(userid);
source(argc, argv);
exit(errs);
}
if (tflag) { /* Receive data. */
(void)setuid(userid);
sink(argc, argv);
exit(errs);
}
if (argc < 2)
usage();
if (argc > 2)
targetshouldbedirectory = 1;
remin = remout = -1;
/* Command to be executed on remote system using "rsh". */
(void) sprintf(cmd, "rcp%s%s%s", iamrecursive ? " -r" : "",
pflag ? " -p" : "", targetshouldbedirectory ? " -d" : "");
(void)signal(SIGPIPE, lostconn);
if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */
toremote(targ, argc, argv);
else {
tolocal(argc, argv); /* Dest is local host. */
if (targetshouldbedirectory)
verifydir(argv[argc - 1]);
}
exit(errs);
}
void
toremote(targ, argc, argv)
char *targ, *argv[];
int argc;
{
int i, len;
char *bp, *host, *src, *suser, *thost, *tuser;
*targ++ = 0;
if (*targ == 0)
targ = ".";
if ((thost = strchr(argv[argc - 1], '@'))) {
/* user@host */
*thost++ = 0;
tuser = argv[argc - 1];
if (*tuser == '\0')
tuser = NULL;
else if (!okname(tuser))
exit(1);
} else {
thost = argv[argc - 1];
tuser = NULL;
}
for (i = 0; i < argc - 1; i++) {
src = colon(argv[i]);
if (src) { /* remote to remote */
*src++ = 0;
if (*src == 0)
src = ".";
host = strchr(argv[i], '@');
len = strlen(_PATH_RSH) + strlen(argv[i]) +
strlen(src) + (tuser ? strlen(tuser) : 0) +
strlen(thost) + strlen(targ) + CMDNEEDS + 20;
if (!(bp = malloc(len)))
err(1, "malloc");
if (host) {
*host++ = 0;
suser = argv[i];
if (*suser == '\0')
suser = pwd->pw_name;
else if (!okname(suser))
continue;
(void)snprintf(bp, len,
"%s %s -l %s -n %s %s '%s%s%s:%s'",
_PATH_RSH, host, suser, cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
thost, targ);
} else
(void)snprintf(bp, len,
"exec %s %s -n %s %s '%s%s%s:%s'",
_PATH_RSH, argv[i], cmd, src,
tuser ? tuser : "", tuser ? "@" : "",
thost, targ);
(void)susystem(bp, userid);
(void)free(bp);
} else { /* local to remote */
if (remin == -1) {
len = strlen(targ) + CMDNEEDS + 20;
if (!(bp = malloc(len)))
err(1, "malloc");
(void)snprintf(bp, len, "%s -t %s", cmd, targ);
host = thost;
if (do_cmd(host, tuser, bp, &remin, &remout) < 0)
exit(1);
if (response() < 0)
exit(1);
(void)free(bp);
(void)setuid(userid);
}
source(1, argv+i);
}
}
}
void
tolocal(argc, argv)
int argc;
char *argv[];
{
int i, len;
char *bp, *host, *src, *suser;
for (i = 0; i < argc - 1; i++) {
if (!(src = colon(argv[i]))) { /* Local to local. */
len = strlen(_PATH_CP) + strlen(argv[i]) +
strlen(argv[argc - 1]) + 20;
if (!(bp = malloc(len)))
err(1, "malloc");
(void)snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
iamrecursive ? " -PR" : "", pflag ? " -p" : "",
argv[i], argv[argc - 1]);
if (susystem(bp, userid))
++errs;
(void)free(bp);
continue;
}
*src++ = 0;
if (*src == 0)
src = ".";
if ((host = strchr(argv[i], '@')) == NULL) {
host = argv[i];
suser = pwd->pw_name;
} else {
*host++ = 0;
suser = argv[i];
if (*suser == '\0')
suser = pwd->pw_name;
else if (!okname(suser))
continue;
}
len = strlen(src) + CMDNEEDS + 20;
if ((bp = malloc(len)) == NULL)
err(1, "malloc");
(void)snprintf(bp, len, "%s -f %s", cmd, src);
if (do_cmd(host, suser, bp, &remin, &remout) < 0) {
(void)free(bp);
++errs;
continue;
}
(void)free(bp);
sink(1, argv + argc - 1);
(void)seteuid(0);
(void)close(remin);
remin = remout = -1;
}
}
void
source(argc, argv)
int argc;
char *argv[];
{
struct stat stb;
static BUF buffer;
BUF *bp;
off_t i;
int amt, fd, haderr, indx, result;
char *last, *name, buf[BUFSIZ];
for (indx = 0; indx < argc; ++indx) {
name = argv[indx];
if ((fd = open(name, O_RDONLY, 0)) < 0)
goto syserr;
if (fstat(fd, &stb)) {
syserr: run_err("%s: %s", name, strerror(errno));
goto next;
}
switch (stb.st_mode & S_IFMT) {
case S_IFREG:
break;
case S_IFDIR:
if (iamrecursive) {
rsource(name, &stb);
goto next;
}
/* FALLTHROUGH */
default:
run_err("%s: not a regular file", name);
goto next;
}
if ((last = strrchr(name, '/')) == NULL)
last = name;
else
++last;
if (pflag) {
/*
* Make it compatible with possible future
* versions expecting microseconds.
*/
(void)snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n",
(long)stb.st_mtime,
(long)stb.st_atime);
(void)write(remout, buf, strlen(buf));
if (response() < 0)
goto next;
}
#define MODEMASK (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
(void)snprintf(buf, sizeof(buf), "C%04o %lu %s\n",
stb.st_mode & MODEMASK, (unsigned long)stb.st_size, last);
(void)write(remout, buf, strlen(buf));
if (response() < 0)
goto next;
if ((bp = allocbuf(&buffer, fd, BUFSIZ)) == NULL) {
next: (void)close(fd);
continue;
}
/* Keep writing after an error so that we stay sync'd up. */
for (haderr = i = 0; i < stb.st_size; i += bp->cnt) {
amt = bp->cnt;
if (i + amt > stb.st_size)
amt = stb.st_size - i;
if (!haderr) {
result = read(fd, bp->buf, amt);
if (result != amt)
haderr = result >= 0 ? EIO : errno;
}
if (haderr)
(void)write(remout, bp->buf, amt);
else {
result = write(remout, bp->buf, amt);
if (result != amt)
haderr = result >= 0 ? EIO : errno;
}
}
if (close(fd) && !haderr)
haderr = errno;
if (!haderr)
(void)write(remout, "", 1);
else
run_err("%s: %s", name, strerror(haderr));
(void)response();
}
}
void
rsource(name, statp)
char *name;
struct stat *statp;
{
DIR *dirp;
struct dirent *dp;
char *last, *vect[1], path[MAXPATHLEN];
if (!(dirp = opendir(name))) {
run_err("%s: %s", name, strerror(errno));
return;
}
last = strrchr(name, '/');
if (last == 0)
last = name;
else
last++;
if (pflag) {
(void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n",
(long)statp->st_mtime,
(long)statp->st_atime);
(void)write(remout, path, strlen(path));
if (response() < 0) {
closedir(dirp);
return;
}
}
(void)snprintf(path, sizeof(path),
"D%04o %d %s\n", statp->st_mode & MODEMASK, 0, last);
(void)write(remout, path, strlen(path));
if (response() < 0) {
closedir(dirp);
return;
}
while ((dp = readdir(dirp))) {
if (dp->d_ino == 0)
continue;
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
continue;
if (strlen(name) + 1 + strlen(dp->d_name) >= MAXPATHLEN - 1) {
run_err("%s/%s: name too long", name, dp->d_name);
continue;
}
(void)snprintf(path, sizeof(path), "%s/%s", name, dp->d_name);
vect[0] = path;
source(1, vect);
}
(void)closedir(dirp);
(void)write(remout, "E\n", 2);
(void)response();
}
void
sink(argc, argv)
int argc;
char *argv[];
{
static BUF buffer;
struct stat stb;
struct timeval tv[2];
enum { YES, NO, DISPLAYED } wrerr;
BUF *bp;
off_t i, j, size;
int amt, count, exists, first, mask, mode, ofd, omode;
int setimes, targisdir, wrerrno = 0;
char ch, *cp, *np, *targ, *why, *vect[1], buf[BUFSIZ];
#define atime tv[0]
#define mtime tv[1]
#define SCREWUP(str) { why = str; goto screwup; }
setimes = targisdir = 0;
mask = umask(0);
if (!pflag)
(void)umask(mask);
if (argc != 1) {
run_err("ambiguous target");
exit(1);
}
targ = *argv;
if (targetshouldbedirectory)
verifydir(targ);
(void)write(remout, "", 1);
if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
targisdir = 1;
for (first = 1;; first = 0) {
cp = buf;
if (read(remin, cp, 1) <= 0)
return;
if (*cp++ == '\n')
SCREWUP("unexpected <newline>");
do {
if (read(remin, &ch, sizeof(ch)) != sizeof(ch))
SCREWUP("lost connection");
*cp++ = ch;
} while (cp < &buf[BUFSIZ - 1] && ch != '\n');
*cp = 0;
if (buf[0] == '\01' || buf[0] == '\02') {
if (iamremote == 0)
(void)write(STDERR_FILENO,
buf + 1, strlen(buf + 1));
if (buf[0] == '\02')
exit(1);
++errs;
continue;
}
if (buf[0] == 'E') {
(void)write(remout, "", 1);
return;
}
if (ch == '\n')
*--cp = 0;
cp = buf;
if (*cp == 'T') {
setimes++;
cp++;
mtime.tv_sec = strtol(cp, &cp, 10);
if (!cp || *cp++ != ' ')
SCREWUP("mtime.sec not delimited");
mtime.tv_usec = strtol(cp, &cp, 10);
if (!cp || *cp++ != ' ')
SCREWUP("mtime.usec not delimited");
atime.tv_sec = strtol(cp, &cp, 10);
if (!cp || *cp++ != ' ')
SCREWUP("atime.sec not delimited");
atime.tv_usec = strtol(cp, &cp, 10);
if (!cp || *cp++ != '\0')
SCREWUP("atime.usec not delimited");
(void)write(remout, "", 1);
continue;
}
if (*cp != 'C' && *cp != 'D') {
/*
* Check for the case "rcp remote:foo\* local:bar".
* In this case, the line "No match." can be returned
* by the shell before the rcp command on the remote is
* executed so the ^Aerror_message convention isn't
* followed.
*/
if (first) {
run_err("%s", cp);
exit(1);
}
SCREWUP("expected control record");
}
mode = 0;
for (++cp; cp < buf + 5; cp++) {
if (*cp < '0' || *cp > '7')
SCREWUP("bad mode");
mode = (mode << 3) | (*cp - '0');
}
if (*cp++ != ' ')
SCREWUP("mode not delimited");
for (size = 0; isdigit(*cp);)
size = size * 10 + (*cp++ - '0');
if (*cp++ != ' ')
SCREWUP("size not delimited");
if (targisdir) {
static char *namebuf;
static int cursize;
size_t need;
need = strlen(targ) + strlen(cp) + 250;
if (need > cursize) {
if (!(namebuf = malloc(need)))
run_err("%s", strerror(errno));
}
(void)snprintf(namebuf, need, "%s%s%s", targ,
*targ ? "/" : "", cp);
np = namebuf;
} else
np = targ;
exists = stat(np, &stb) == 0;
if (buf[0] == 'D') {
int mod_flag = pflag;
if (exists) {
if (!S_ISDIR(stb.st_mode)) {
errno = ENOTDIR;
goto bad;
}
if (pflag)
(void)chmod(np, mode);
} else {
/* Handle copying from a read-only directory */
mod_flag = 1;
if (mkdir(np, mode | S_IRWXU) < 0)
goto bad;
}
vect[0] = np;
sink(1, vect);
if (setimes) {
setimes = 0;
if (utimes(np, tv) < 0)
run_err("%s: set times: %s",
np, strerror(errno));
}
if (mod_flag)
(void)chmod(np, mode);
continue;
}
omode = mode;
mode |= S_IWRITE;
if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
bad: run_err("%s: %s", np, strerror(errno));
continue;
}
(void)write(remout, "", 1);
if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) {
(void)close(ofd);
continue;
}
cp = bp->buf;
wrerr = NO;
for (count = i = 0; i < size; i += BUFSIZ) {
amt = BUFSIZ;
if (i + amt > size)
amt = size - i;
count += amt;
do {
j = read(remin, cp, amt);
if (j <= 0) {
run_err("%s", j ? strerror(errno) :
"dropped connection");
exit(1);
}
amt -= j;
cp += j;
} while (amt > 0);
if (count == bp->cnt) {
/* Keep reading so we stay sync'd up. */
if (wrerr == NO) {
j = write(ofd, bp->buf, count);
if (j != count) {
wrerr = YES;
wrerrno = j >= 0 ? EIO : errno;
}
}
count = 0;
cp = bp->buf;
}
}
if (count != 0 && wrerr == NO &&
(j = write(ofd, bp->buf, count)) != count) {
wrerr = YES;
wrerrno = j >= 0 ? EIO : errno;
}
if (ftruncate(ofd, size)) {
run_err("%s: truncate: %s", np, strerror(errno));
wrerr = DISPLAYED;
}
if (pflag) {
if (exists || omode != mode)
if (fchmod(ofd, omode))
run_err("%s: set mode: %s",
np, strerror(errno));
} else {
if (!exists && omode != mode)
if (fchmod(ofd, omode & ~mask))
run_err("%s: set mode: %s",
np, strerror(errno));
}
(void)close(ofd);
(void)response();
if (setimes && wrerr == NO) {
setimes = 0;
if (utimes(np, tv) < 0) {
run_err("%s: set times: %s",
np, strerror(errno));
wrerr = DISPLAYED;
}
}
switch(wrerr) {
case YES:
run_err("%s: %s", np, strerror(wrerrno));
break;
case NO:
(void)write(remout, "", 1);
break;
case DISPLAYED:
break;
}
}
screwup:
run_err("protocol error: %s", why);
exit(1);
}
int
response()
{
char ch, *cp, resp, rbuf[BUFSIZ];
if (read(remin, &resp, sizeof(resp)) != sizeof(resp))
lostconn(0);
cp = rbuf;
switch(resp) {
case 0: /* ok */
return (0);
default:
*cp++ = resp;
/* FALLTHROUGH */
case 1: /* error, followed by error msg */
case 2: /* fatal error, "" */
do {
if (read(remin, &ch, sizeof(ch)) != sizeof(ch))
lostconn(0);
*cp++ = ch;
} while (cp < &rbuf[BUFSIZ] && ch != '\n');
if (!iamremote)
(void)write(STDERR_FILENO, rbuf, cp - rbuf);
++errs;
if (resp == 1)
return (-1);
exit(1);
}
/* NOTREACHED */
}
void
usage()
{
(void)fprintf(stderr, "%s\n%s\n",
"usage: rcp [-5FKpx] [-P port] f1 f2",
" rcp [-5FKprx] [-P port] f1 ... fn directory");
exit(1);
}
#include <stdarg.h>
void
run_err(const char *fmt, ...)
{
static FILE *fp;
va_list ap;
va_start(ap, fmt);
++errs;
if (fp == NULL && !(fp = fdopen(remout, "w")))
return;
(void)fprintf(fp, "%c", 0x01);
(void)fprintf(fp, "rcp: ");
(void)vfprintf(fp, fmt, ap);
(void)fprintf(fp, "\n");
(void)fflush(fp);
if (!iamremote)
vwarnx(fmt, ap);
va_end(ap);
}
/*
* This function executes the given command as the specified user on the
* given host. This returns < 0 if execution fails, and >= 0 otherwise. This
* assigns the input and output file descriptors on success.
*
* If it cannot create necessary pipes it exits with error message.
*/
int
do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout)
{
int pin[2], pout[2], reserved[2];
/*
* Reserve two descriptors so that the real pipes won't get
* descriptors 0 and 1 because that will screw up dup2 below.
*/
pipe(reserved);
/* Create a socket pair for communicating with rsh. */
if (pipe(pin) < 0) {
perror("pipe");
exit(255);
}
if (pipe(pout) < 0) {
perror("pipe");
exit(255);
}
/* Free the reserved descriptors. */
close(reserved[0]);
close(reserved[1]);
/* For a child to execute the command on the remote host using rsh. */
if (fork() == 0) {
char *args[100];
unsigned int i;
/* Child. */
close(pin[1]);
close(pout[0]);
dup2(pin[0], 0);
dup2(pout[1], 1);
close(pin[0]);
close(pout[1]);
i = 0;
args[i++] = RSH_PROGRAM;
if (usekrb5)
args[i++] = "-5";
if (usebroken)
args[i++] = "-K";
if (doencrypt)
args[i++] = "-x";
if (noencrypt)
args[i++] = "-z";
if (port != NULL) {
args[i++] = "-p";
args[i++] = port;
}
if (remuser != NULL) {
args[i++] = "-l";
args[i++] = remuser;
}
args[i++] = host;
args[i++] = cmd;
args[i++] = NULL;
execvp(RSH_PROGRAM, args);
perror(RSH_PROGRAM);
exit(1);
}
/* Parent. Close the other side, and return the local side. */
close(pin[0]);
*fdout = pin[1];
close(pout[1]);
*fdin = pout[0];
return 0;
}

View file

@ -0,0 +1,64 @@
/*
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* $Id: rcp_locl.h,v 1.3 2001/01/29 05:59:24 assar Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <ctype.h>
#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <roken.h>
#include "extern.h"
#define _PATH_CP "/bin/cp"
#define _PATH_RSH "/usr/bin/rsh"

View file

@ -0,0 +1,165 @@
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if 0
#ifndef lint
#if 0
static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
#endif
#include "rcp_locl.h"
RCSID("$Id: util.c,v 1.5 2001/01/29 23:36:37 assar Exp $");
char *
colon(cp)
char *cp;
{
if (*cp == ':') /* Leading colon is part of file name. */
return (0);
for (; *cp; ++cp) {
if (*cp == ':')
return (cp);
if (*cp == '/')
return (0);
}
return (0);
}
void
verifydir(cp)
char *cp;
{
struct stat stb;
if (!stat(cp, &stb)) {
if (S_ISDIR(stb.st_mode))
return;
errno = ENOTDIR;
}
run_err("%s: %s", cp, strerror(errno));
exit(1);
}
int
okname(cp0)
char *cp0;
{
int c;
char *cp;
cp = cp0;
do {
c = *cp;
if (c & 0200)
goto bad;
if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-')
goto bad;
} while (*++cp);
return (1);
bad: warnx("%s: invalid user name", cp0);
return (0);
}
int
susystem(s, userid)
int userid;
char *s;
{
void (*istat)(int), (*qstat)(int);
int status;
pid_t pid;
pid = fork();
switch (pid) {
case -1:
return (127);
case 0:
(void)setuid(userid);
execl(_PATH_BSHELL, "sh", "-c", s, NULL);
_exit(127);
}
istat = signal(SIGINT, SIG_IGN);
qstat = signal(SIGQUIT, SIG_IGN);
if (waitpid(pid, &status, 0) < 0)
status = -1;
(void)signal(SIGINT, istat);
(void)signal(SIGQUIT, qstat);
return (status);
}
#ifndef roundup
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
#endif
BUF *
allocbuf(bp, fd, blksize)
BUF *bp;
int fd, blksize;
{
struct stat stb;
size_t size;
if (fstat(fd, &stb) < 0) {
run_err("fstat: %s", strerror(errno));
return (0);
}
size = roundup(stb.st_blksize, blksize);
if (size == 0)
size = blksize;
if (bp->cnt >= size)
return (bp);
if ((bp->buf = realloc(bp->buf, size)) == NULL) {
bp->cnt = 0;
run_err("%s", strerror(errno));
return (0);
}
bp->cnt = size;
return (bp);
}
void
lostconn(signo)
int signo;
{
if (!iamremote)
warnx("lost connection");
exit(1);
}

View file

@ -1,3 +1,72 @@
2001-01-09 Assar Westerlund <assar@sics.se>
* rshd.c (save_krb5_creds): use krb5_rd_cred2 instead of
krb5_rd_cred
2000-12-31 Assar Westerlund <assar@sics.se>
* rshd.c (main): handle krb5_init_context failure consistently
* rsh.c (main): handle krb5_init_context failure consistently
2000-12-05 Johan Danielsson <joda@pdc.kth.se>
* rshd.c: require encryption if passed -x
2000-11-15 Assar Westerlund <assar@sics.se>
* rshd.c (loop): check that the fd's aren't too large to select on
* rsh.c (loop, proto): check that the fd's aren't too large to
select on
2000-08-10 Assar Westerlund <assar@sics.se>
* rsh.c: move code to do config/command parsing correctly.
2000-08-09 Assar Westerlund <assar@sics.se>
* rsh.c (main): only fetch stuff from krb5.conf when no option has
been given
2000-08-01 Assar Westerlund <assar@sics.se>
* rsh.c (doit): loop until we create an error socket of an
supported socket family
2000-07-02 Assar Westerlund <assar@sics.se>
* rshd.c: DCE stuff from Ake Sandgren <ake@cs.umu.se>
do not call syslog with a variable as format string
* rsh_locl.h (_PATH_ETC_ENVIRONMENT): add
2000-06-09 Assar Westerlund <assar@sics.se>
* rsh.c (main): work-around for setuid and capabilities bug fixed
in Linux 2.2.16
2000-06-06 Johan Danielsson <joda@pdc.kth.se>
* rsh.c: nuke long option from -z
* rsh.c: don't try to encrypt if auth is broken (Daniel Kouril)
2000-06-03 Assar Westerlund <assar@sics.se>
* rshd.c (doit): check return value of getspnam. From
<haba@pdc.kth.se>
2000-05-23 Assar Westerlund <assar@sics.se>
* rsh.c (proto): select on the normal socket when waiting for the
daemon to connect back to the stderr port, so that we discover
when data arrives there before. when that happens, we assume that
the daemon did not manage to connect (because of NAT/whatever) and
continue as if `-e' was given
* rshd.c (doit): if we fail to connect back to the stderr port,
act as if `-e' was given on the client side, i.e. without the
special TCP-connection. This tries to make things better when
running the head against a NAT wall, for example.
2000-02-07 Assar Westerlund <assar@sics.se>
* Makefile.am (LDADD): make sure we use the heimdal libdes

View file

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.14 2000/02/07 03:13:00 assar Exp $
# $Id: Makefile.am,v 1.15 2000/11/15 22:51:10 assar Exp $
include $(top_srcdir)/Makefile.am.common
@ -14,7 +14,6 @@ rshd_SOURCES = rshd.c common.c rsh_locl.h
LDADD = $(LIB_kafs) \
$(LIB_krb5) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_krb4) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(LIB_roken)

View file

@ -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.14 2000/02/07 03:13:00 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.15 2000/11/15 22:51:10 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)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
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)
@ -181,8 +195,13 @@ rsh_SOURCES = rsh.c common.c rsh_locl.h
rshd_SOURCES = rshd.c common.c rsh_locl.h
LDADD = $(LIB_kafs) $(LIB_krb5) $(top_builddir)/lib/des/libdes.la $(LIB_krb4) $(top_builddir)/lib/des/libdes.la $(LIB_roken)
LDADD = $(LIB_kafs) \
$(LIB_krb5) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_roken)
subdir = appl/rsh
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
@ -194,71 +213,57 @@ PROGRAMS = $(bin_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@
rsh_OBJECTS = rsh.$(OBJEXT) common.$(OBJEXT)
am_rsh_OBJECTS = rsh.$(OBJEXT) common.$(OBJEXT)
rsh_OBJECTS = $(am_rsh_OBJECTS)
rsh_LDADD = $(LDADD)
@KRB4_TRUE@@KRB5_FALSE@rsh_DEPENDENCIES = \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_FALSE@rsh_DEPENDENCIES =
@KRB4_FALSE@@KRB5_TRUE@rsh_DEPENDENCIES = \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_FALSE@rsh_DEPENDENCIES = \
@KRB4_FALSE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la \
@KRB4_FALSE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@@KRB5_FALSE@rsh_DEPENDENCIES = \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/kafs/libkafs.la
@KRB4_TRUE@@KRB5_TRUE@rsh_DEPENDENCIES = \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
rsh_LDFLAGS =
rshd_OBJECTS = rshd.$(OBJEXT) common.$(OBJEXT)
am_rshd_OBJECTS = rshd.$(OBJEXT) common.$(OBJEXT)
rshd_OBJECTS = $(am_rshd_OBJECTS)
rshd_LDADD = $(LDADD)
@KRB4_TRUE@@KRB5_FALSE@rshd_DEPENDENCIES = \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_FALSE@rshd_DEPENDENCIES =
@KRB4_FALSE@@KRB5_TRUE@rshd_DEPENDENCIES = \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la \
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_FALSE@rshd_DEPENDENCIES = \
@KRB4_FALSE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la \
@KRB4_FALSE@@KRB5_FALSE@$(top_builddir)/lib/des/libdes.la
@KRB4_FALSE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@@KRB5_FALSE@rshd_DEPENDENCIES = \
@KRB4_TRUE@@KRB5_FALSE@$(top_builddir)/lib/kafs/libkafs.la
@KRB4_TRUE@@KRB5_TRUE@rshd_DEPENDENCIES = \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la \
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/des/libdes.la
@KRB4_TRUE@@KRB5_TRUE@$(top_builddir)/lib/asn1/libasn1.la
rshd_LDFLAGS =
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 = $(rsh_SOURCES) $(rshd_SOURCES)
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 = $(rsh_SOURCES) $(rshd_SOURCES)
OBJECTS = $(rsh_OBJECTS) $(rshd_OBJECTS)
OBJECTS = $(am_rsh_OBJECTS) $(am_rshd_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/rsh/Makefile
@ -281,15 +286,18 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`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)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
mostlyclean-libexecPROGRAMS:
@ -306,31 +314,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)
@ -342,15 +339,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
@ -368,26 +356,36 @@ rsh$(EXEEXT): $(rsh_OBJECTS) $(rsh_DEPENDENCIES)
rshd$(EXEEXT): $(rshd_OBJECTS) $(rshd_DEPENDENCIES)
@rm -f rshd$(EXEEXT)
$(LINK) $(rshd_LDFLAGS) $(rshd_OBJECTS) $(rshd_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
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:
@ -400,17 +398,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/rsh
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
@ -439,7 +436,7 @@ uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) 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)$(bindir) $(DESTDIR)$(libexecdir)
@ -453,6 +450,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-binPROGRAMS mostlyclean-libexecPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-tags mostlyclean-generic
@ -493,8 +491,9 @@ 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 \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-strip installdirs mostlyclean-generic distclean-generic \
clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
install-suid-programs:
@ -502,7 +501,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
@ -514,8 +516,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
@ -584,87 +586,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

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,12 +32,12 @@
*/
#include "rsh_locl.h"
RCSID("$Id: rsh.c,v 1.47 2000/02/06 05:58:55 assar Exp $");
RCSID("$Id: rsh.c,v 1.57 2000/12/31 07:36:54 assar Exp $");
enum auth_method auth_method;
int do_encrypt;
int do_forward;
int do_forwardable;
int do_encrypt = -1;
int do_forward = -1;
int do_forwardable = -1;
int do_unique_tkfile = 0;
char *unique_tkfile = NULL;
char tkfile[MAXPATHLEN];
@ -62,6 +62,9 @@ loop (int s, int errsock)
fd_set real_readset;
int count = 1;
if (s >= FD_SETSIZE || errsock >= FD_SETSIZE)
errx (1, "fd too large");
FD_ZERO(&real_readset);
FD_SET(s, &real_readset);
if (errsock != -1) {
@ -404,7 +407,7 @@ proto (int s, int errsock,
struct sockaddr *thataddr = (struct sockaddr *)&thataddr_ss;
struct sockaddr_storage erraddr_ss;
struct sockaddr *erraddr = (struct sockaddr *)&erraddr_ss;
int addrlen;
socklen_t addrlen;
int ret;
addrlen = sizeof(thisaddr_ss);
@ -441,14 +444,48 @@ proto (int s, int errsock,
return 1;
}
errsock2 = accept (errsock, NULL, NULL);
if (errsock2 < 0) {
warn ("accept");
close (errsock);
return 1;
}
close (errsock);
for (;;) {
fd_set fdset;
if (errsock >= FD_SETSIZE || s >= FD_SETSIZE)
errx (1, "fd too large");
FD_ZERO(&fdset);
FD_SET(errsock, &fdset);
FD_SET(s, &fdset);
ret = select (max(errsock, s) + 1, &fdset, NULL, NULL, NULL);
if (ret < 0) {
if (errno == EINTR)
continue;
warn ("select");
close (errsock);
return 1;
}
if (FD_ISSET(errsock, &fdset)) {
errsock2 = accept (errsock, NULL, NULL);
close (errsock);
if (errsock2 < 0) {
warn ("accept");
return 1;
}
break;
}
/*
* there should not arrive any data on this fd so if it's
* readable it probably indicates that the other side when
* away.
*/
if (FD_ISSET(s, &fdset)) {
warnx ("socket closed");
close (errsock);
errsock2 = -1;
break;
}
}
} else {
if (net_write (s, "0", 2) != 2) {
warn ("write");
@ -490,8 +527,7 @@ proto (int s, int errsock,
/*
* Return in `res' a copy of the concatenation of `argc, argv' into
* malloced space.
*/
* malloced space. */
static size_t
construct_command (char **res, int argc, char **argv)
@ -673,7 +709,7 @@ doit (const char *hostname,
continue;
}
if (do_errsock) {
struct addrinfo *ea;
struct addrinfo *ea, *eai;
struct addrinfo hints;
memset (&hints, 0, sizeof(hints));
@ -682,15 +718,23 @@ doit (const char *hostname,
hints.ai_family = a->ai_family;
hints.ai_flags = AI_PASSIVE;
error = getaddrinfo (NULL, "0", &hints, &ea);
errsock = -1;
error = getaddrinfo (NULL, "0", &hints, &eai);
if (error)
errx (1, "getaddrinfo: %s", gai_strerror(error));
errsock = socket (ea->ai_family, ea->ai_socktype, ea->ai_protocol);
for (ea = eai; ea != NULL; ea = ea->ai_next) {
errsock = socket (ea->ai_family, ea->ai_socktype,
ea->ai_protocol);
if (errsock < 0)
continue;
if (bind (errsock, ea->ai_addr, ea->ai_addrlen) < 0)
err (1, "bind");
break;
}
if (errsock < 0)
err (1, "socket");
if (bind (errsock, ea->ai_addr, ea->ai_addrlen) < 0)
err (1, "bind");
freeaddrinfo (ea);
freeaddrinfo (eai);
} else
errsock = -1;
@ -732,7 +776,7 @@ struct getargs args[] = {
NULL },
{ "encrypt", 'x', arg_flag, &do_encrypt, "Encrypt connection",
NULL },
{ "encrypt", 'z', arg_negative_flag, &do_encrypt,
{ NULL, 'z', arg_negative_flag, &do_encrypt,
"Don't encrypt connection", NULL },
{ "forward", 'f', arg_flag, &do_forward, "Forward credentials",
NULL },
@ -782,12 +826,15 @@ main(int argc, char **argv)
const char *local_user;
char *host = NULL;
int host_index = -1;
int status;
int status;
uid_t uid;
priv_port1 = priv_port2 = IPPORT_RESERVED-1;
priv_socket1 = rresvport(&priv_port1);
priv_socket2 = rresvport(&priv_port2);
setuid(getuid());
uid = getuid ();
if (setuid (uid) || (uid != 0 && setuid(0) == 0))
err (1, "setuid");
set_progname (argv[0]);
@ -798,27 +845,32 @@ main(int argc, char **argv)
status = krb5_init_context (&context);
if (status)
errx(1, "krb5_init_context failed: %u", status);
errx(1, "krb5_init_context failed: %d", status);
do_forwardable = krb5_config_get_bool (context, NULL,
"libdefaults",
"forwardable",
NULL);
do_forward = krb5_config_get_bool (context, NULL,
"libdefaults",
"forward",
NULL);
do_encrypt = krb5_config_get_bool (context, NULL,
"libdefaults",
"encrypt",
NULL);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv,
&optind))
usage (1);
if (do_forwardable == -1)
do_forwardable = krb5_config_get_bool (context, NULL,
"libdefaults",
"forwardable",
NULL);
if (do_forward == -1)
do_forward = krb5_config_get_bool (context, NULL,
"libdefaults",
"forward",
NULL);
else if (do_forward == 0)
do_forwardable = 0;
if (do_encrypt == -1)
do_encrypt = krb5_config_get_bool (context, NULL,
"libdefaults",
"encrypt",
NULL);
if (do_forwardable)
do_forward = 1;
@ -939,6 +991,8 @@ main(int argc, char **argv)
else
tmp_port = krb5_getportbyname(context, "shell", "tcp", 514);
auth_method = AUTH_BROKEN;
if (do_encrypt)
errx (1, "encryption not supported with priv port authentication");
ret = doit_broken (argc, argv, host_index, host,
user, local_user,
tmp_port,

View file

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: rsh_locl.h,v 1.23 2000/02/06 05:58:55 assar Exp $ */
/* $Id: rsh_locl.h,v 1.24 2000/07/02 15:48:46 assar Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -112,6 +112,10 @@
#define _PATH_DEFPATH "/usr/bin:/bin"
#endif
#ifndef _PATH_ETC_ENVIRONMENT
#define _PATH_ETC_ENVIRONMENT "/etc/environment"
#endif
/*
*
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997-1999 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,7 +32,7 @@
*/
#include "rsh_locl.h"
RCSID("$Id: rshd.c,v 1.30 2000/02/06 05:58:56 assar Exp $");
RCSID("$Id: rshd.c,v 1.39 2001/01/09 18:44:29 assar Exp $");
enum auth_method auth_method;
@ -63,6 +63,13 @@ static int do_newpag = 1;
static int do_version;
static int do_help = 0;
#if defined(DCE)
int dfsk5ok = 0;
int dfspag = 0;
int dfsfwd = 0;
krb5_ticket *user_ticket;
#endif
static void
syslog_and_die (const char *m, ...)
{
@ -215,7 +222,7 @@ save_krb5_creds (int s,
}
krb5_cc_initialize(context,ccache,client);
ret = krb5_rd_cred(context, auth_context, ccache,&remote_cred);
ret = krb5_rd_cred2(context, auth_context, ccache, &remote_cred);
krb5_data_free (&remote_cred);
if (ret)
return 0;
@ -356,6 +363,8 @@ recv_krb5_auth (int s, u_char *buf,
do_encrypt = 1;
memmove (cmd, cmd + 3, strlen(cmd) - 2);
} else {
if(do_encrypt)
fatal (s, "Encryption required");
do_encrypt = 0;
}
@ -381,6 +390,10 @@ recv_krb5_auth (int s, u_char *buf,
}
}
#if defined(DCE)
user_ticket = ticket;
#endif
return 0;
}
@ -393,6 +406,9 @@ loop (int from0, int to0,
int max_fd;
int count = 2;
if(from0 >= FD_SETSIZE || from1 >= FD_SETSIZE || from2 >= FD_SETSIZE)
errx (1, "fd too large");
FD_ZERO(&real_readset);
FD_SET(from0, &real_readset);
FD_SET(from1, &real_readset);
@ -521,17 +537,42 @@ is_reserved(u_short port)
*/
static void
setup_environment (char *env[7], struct passwd *pwd)
setup_environment (char ***env, const struct passwd *pwd)
{
asprintf (&env[0], "USER=%s", pwd->pw_name);
asprintf (&env[1], "HOME=%s", pwd->pw_dir);
asprintf (&env[2], "SHELL=%s", pwd->pw_shell);
asprintf (&env[3], "PATH=%s", _PATH_DEFPATH);
asprintf (&env[4], "SSH_CLIENT=only_to_make_bash_happy");
int i, j, path;
char **e;
i = 0;
path = 0;
*env = NULL;
i = read_environment(_PATH_ETC_ENVIRONMENT, env);
e = *env;
for (j = 0; j < i; j++) {
if (!strncmp(e[j], "PATH=", 5)) {
path = 1;
}
}
e = *env;
e = realloc(e, (i + 7) * sizeof(char *));
asprintf (&e[i++], "USER=%s", pwd->pw_name);
asprintf (&e[i++], "HOME=%s", pwd->pw_dir);
asprintf (&e[i++], "SHELL=%s", pwd->pw_shell);
if (! path) {
asprintf (&e[i++], "PATH=%s", _PATH_DEFPATH);
}
asprintf (&e[i++], "SSH_CLIENT=only_to_make_bash_happy");
#if defined(DCE)
if (getenv("KRB5CCNAME"))
asprintf (&e[i++], "KRB5CCNAME=%s", getenv("KRB5CCNAME"));
#else
if (do_unique_tkfile)
asprintf (&env[5], "KRB5CCNAME=%s", tkfile);
else env[5] = NULL;
env[6] = NULL;
asprintf (&e[i++], "KRB5CCNAME=%s", tkfile);
#endif
e[i++] = NULL;
*env = e;
}
static void
@ -545,14 +586,14 @@ doit (int do_kerberos, int check_rhosts)
struct sockaddr *thataddr = (struct sockaddr *)&thataddr_ss;
struct sockaddr_storage erraddr_ss;
struct sockaddr *erraddr = (struct sockaddr *)&erraddr_ss;
int addrlen;
socklen_t addrlen;
int port;
int errsock = -1;
char client_user[COMMAND_SZ], server_user[USERNAME_SZ];
char cmd[COMMAND_SZ];
struct passwd *pwd;
int s = STDIN_FILENO;
char *env[7];
char **env;
addrlen = sizeof(thisaddr_ss);
if (getsockname (s, thisaddr, &addrlen) < 0)
@ -606,8 +647,10 @@ doit (int do_kerberos, int check_rhosts)
syslog_and_die ("socket: %m");
if (connect (errsock,
erraddr,
socket_sockaddr_size (erraddr)) < 0)
syslog_and_die ("connect: %m");
socket_sockaddr_size (erraddr)) < 0) {
syslog (LOG_WARNING, "connect: %m");
close (errsock);
}
}
if(do_kerberos) {
@ -646,6 +689,10 @@ doit (int do_kerberos, int check_rhosts)
syslog_and_die("recv_bsd_auth failed");
}
#if defined(DCE) && defined(AIX)
esetenv("AUTHSTATE", "DCE", 1);
#endif
pwd = getpwnam (server_user);
if (pwd == NULL)
fatal (s, "Login incorrect.");
@ -662,30 +709,15 @@ doit (int do_kerberos, int check_rhosts)
long today;
sp = getspnam(server_user);
today = time(0)/(24L * 60 * 60);
if (sp->sp_expire > 0)
if (today > sp->sp_expire)
fatal(s, "Account has expired.");
if (sp != NULL) {
today = time(0)/(24L * 60 * 60);
if (sp->sp_expire > 0)
if (today > sp->sp_expire)
fatal(s, "Account has expired.");
}
}
#endif
#ifdef HAVE_SETLOGIN
if (setlogin(pwd->pw_name) < 0)
syslog(LOG_ERR, "setlogin() failed: %m");
#endif
#ifdef HAVE_SETPCRED
if (setpcred (pwd->pw_name, NULL) == -1)
syslog(LOG_ERR, "setpcred() failure: %m");
#endif /* HAVE_SETPCRED */
if (initgroups (pwd->pw_name, pwd->pw_gid) < 0)
fatal (s, "Login incorrect.");
if (setgid(pwd->pw_gid) < 0)
fatal (s, "Login incorrect.");
if (setuid (pwd->pw_uid) < 0)
fatal (s, "Login incorrect.");
#ifdef KRB5
{
@ -703,8 +735,36 @@ doit (int do_kerberos, int check_rhosts)
if (kerberos_status)
krb5_start_session();
}
chown(tkfile + 5, pwd->pw_uid, -1);
#if defined(DCE)
if (kerberos_status) {
esetenv("KRB5CCNAME", tkfile, 1);
dfspag = krb5_dfs_pag(context, kerberos_status, user_ticket->client, server_user);
}
#endif
#endif
#ifdef HAVE_SETLOGIN
if (setlogin(pwd->pw_name) < 0)
syslog(LOG_ERR, "setlogin() failed: %m");
#endif
#ifdef HAVE_SETPCRED
if (setpcred (pwd->pw_name, NULL) == -1)
syslog(LOG_ERR, "setpcred() failure: %m");
#endif /* HAVE_SETPCRED */
if (initgroups (pwd->pw_name, pwd->pw_gid) < 0)
fatal (s, "Login incorrect.");
if (setgid(pwd->pw_gid) < 0)
fatal (s, "Login incorrect.");
if (setuid (pwd->pw_uid) < 0)
fatal (s, "Login incorrect.");
if (chdir (pwd->pw_dir) < 0)
fatal (s, "Remote directory.");
@ -714,7 +774,7 @@ doit (int do_kerberos, int check_rhosts)
close (errsock);
}
setup_environment (env, pwd);
setup_environment (&env, pwd);
if (do_encrypt) {
setup_copier ();
@ -736,7 +796,7 @@ doit (int do_kerberos, int check_rhosts)
#ifdef KRB5
/* XXX */
{
if (kerberos_status) {
krb5_ccache ccache;
krb5_error_code status;
@ -811,7 +871,13 @@ main(int argc, char **argv)
}
#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(port_str) {

View file

@ -1,3 +1,28 @@
2000-12-31 Assar Westerlund <assar@sics.se>
* su.c (krb5_verify): handle krb5_init_context failure
consistently
2000-08-28 Johan Danielsson <joda@pdc.kth.se>
* su.c: set KRBTKFILE
2000-07-10 Assar Westerlund <assar@sics.se>
* Makefile.am: actually install su
* su.c (krb5_verify): try harder freeing. do not get upset on
interrupted password read
2000-06-09 Assar Westerlund <assar@sics.se>
* su.c (main): work-around for setuid and capabilities bug fixed
in Linux 2.2.16
2000-06-03 Assar Westerlund <assar@sics.se>
* su.c (main): just ignore shadow information if getspnam returns
NULL
1999-10-20 Assar Westerlund <assar@sics.se>
* Makefile.am: use LIB_roken

View file

@ -1,16 +1,16 @@
# $Id: Makefile.am,v 1.3 1999/10/19 23:00:37 assar Exp $
# $Id: Makefile.am,v 1.6 2000/11/15 22:51:10 assar Exp $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
noinst_PROGRAMS = su
#bin_SUIDS = su
bin_PROGRAMS = su
bin_SUIDS = su
su_SOURCES = su.c
LDADD = $(LIB_kafs) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_krb4) \
$(top_builddir)/lib/des/libdes.la \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken)

View file

@ -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.3 1999/10/19 23:00:37 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.6 2000/11/15 22:51:10 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)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
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,76 +170,77 @@ 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)
noinst_PROGRAMS = su
#bin_SUIDS = su
bin_PROGRAMS = su
bin_SUIDS = su
su_SOURCES = su.c
LDADD = $(LIB_kafs) $(top_builddir)/lib/krb5/libkrb5.la $(LIB_krb4) $(top_builddir)/lib/des/libdes.la $(top_builddir)/lib/asn1/libasn1.la $(LIB_roken)
LDADD = $(LIB_kafs) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_krb4) \
$(LIB_des) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken)
subdir = appl/su
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
noinst_PROGRAMS = su$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
bin_PROGRAMS = su$(EXEEXT)
PROGRAMS = $(bin_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@
su_OBJECTS = su.$(OBJEXT)
am_su_OBJECTS = su.$(OBJEXT)
su_OBJECTS = $(am_su_OBJECTS)
su_LDADD = $(LDADD)
@KRB4_FALSE@su_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_TRUE@su_DEPENDENCIES = $(top_builddir)/lib/kafs/libkafs.la \
@KRB4_TRUE@$(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_TRUE@$(top_builddir)/lib/des/libdes.la \
@KRB4_TRUE@$(top_builddir)/lib/asn1/libasn1.la
@KRB4_FALSE@su_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB4_FALSE@$(top_builddir)/lib/des/libdes.la \
@KRB4_FALSE@$(top_builddir)/lib/asn1/libasn1.la
su_LDFLAGS =
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 = $(su_SOURCES)
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 = $(su_SOURCES)
OBJECTS = $(su_OBJECTS)
OBJECTS = $(am_su_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/su/Makefile
@ -230,28 +249,33 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstPROGRAMS:
mostlyclean-binPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-noinstPROGRAMS:
distclean-binPROGRAMS:
maintainer-clean-noinstPROGRAMS:
maintainer-clean-binPROGRAMS:
.c.o:
$(COMPILE) -c $<
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
else :; fi; \
done
# 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 $<
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
mostlyclean-compile:
-rm -f *.o core *.core
@ -264,15 +288,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
@ -286,26 +301,36 @@ maintainer-clean-libtool:
su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES)
@rm -f su$(EXEEXT)
$(LINK) $(su_LDFLAGS) $(su_OBJECTS) $(su_LDADD) $(LIBS)
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
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:
@ -318,17 +343,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/su
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
@ -341,7 +365,7 @@ check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-exec: install-exec-am
@ -352,13 +376,14 @@ install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) 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)$(bindir)
mostlyclean-generic:
@ -370,25 +395,25 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
-rm -f Makefile.in
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstPROGRAMS distclean-compile \
distclean-libtool distclean-tags distclean-generic \
clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
distclean-tags distclean-generic clean-am
-rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-libtool \
maintainer-clean-tags maintainer-clean-generic \
distclean-am
@ -397,8 +422,8 @@ maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
@ -406,7 +431,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -416,7 +441,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
@ -428,8 +456,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
@ -498,87 +526,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

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
* Copyright (c) 1999 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,7 +32,7 @@
#include <config.h>
RCSID("$Id: su.c,v 1.10 1999/09/28 02:34:17 assar Exp $");
RCSID("$Id: su.c,v 1.18 2001/01/26 16:02:49 joda Exp $");
#include <stdio.h>
#include <stdlib.h>
@ -50,6 +50,7 @@ RCSID("$Id: su.c,v 1.10 1999/09/28 02:34:17 assar Exp $");
#include <pwd.h>
#include <des.h>
#include <krb5.h>
#include <kafs.h>
#include <err.h>
@ -137,7 +138,7 @@ krb5_verify(struct passwd *login_info, struct passwd *su_info,
ret = krb5_init_context (&context);
if (ret) {
#if 0
warnx("krb5_init_context failed: %u", ret);
warnx("krb5_init_context failed: %d", ret);
#endif
return 1;
}
@ -160,13 +161,16 @@ krb5_verify(struct passwd *login_info, struct passwd *su_info,
#if 1
krb5_warn(context, ret, "krb5_cc_gen_new");
#endif
krb5_free_principal (context, p);
return 1;
}
ret = krb5_verify_user_lrealm(context, p, ccache, NULL, TRUE, NULL);
krb5_free_principal (context, p);
if(ret) {
krb5_free_principal (context, p);
krb5_cc_destroy(context, ccache);
switch (ret) {
case KRB5_LIBOS_PWDINTR :
break;
case KRB5KRB_AP_ERR_BAD_INTEGRITY:
case KRB5KRB_AP_ERR_MODIFIED:
krb5_warnx(context, "Password incorrect");
@ -179,6 +183,7 @@ krb5_verify(struct passwd *login_info, struct passwd *su_info,
}
return 0;
}
krb5_free_principal (context, p);
#endif
return 1;
}
@ -201,9 +206,26 @@ krb5_start_session(void)
asprintf(&cc_name, "%s:%s", krb5_cc_get_type(context, ccache2),
krb5_cc_get_name(context, ccache2));
setenv("KRB5CCNAME", cc_name, 1);
esetenv("KRB5CCNAME", cc_name, 1);
/* we want to export this even if we don't directly support KRB4 */
{
#ifndef TKT_ROOT
#define TKT_ROOT "/tmp/tkt"
#endif
int fd;
char tkfile[256];
strlcpy(tkfile, TKT_ROOT, sizeof(tkfile));
strlcat(tkfile, "_XXXXXX", sizeof(tkfile));
fd = mkstemp(tkfile);
if(fd >= 0) {
close(fd);
esetenv("KRBTKFILE", tkfile, 1);
}
}
#ifdef KRB4
/* convert creds? */
if(k_hasafs()) {
if (k_setpag() == 0)
krb5_afslog(context, ccache2, NULL, NULL);
@ -224,7 +246,7 @@ verify_unix(struct passwd *su)
char *pw;
int r;
if(su->pw_passwd != NULL && *su->pw_passwd != '\0') {
sprintf(prompt, "%s's password: ", su->pw_name);
snprintf(prompt, sizeof(prompt), "%s's password: ", su->pw_name);
r = des_read_pw_string(pw_buf, sizeof(pw_buf), prompt, 0);
if(r != 0)
exit(0);
@ -311,31 +333,31 @@ main(int argc, char **argv)
{ struct spwd *sp;
long today;
sp=getspnam(su_info->pw_name);
if (sp==NULL)
errx(1,"Have not rights to read shadow passwords!");
today = time(0)/(24L * 60 * 60);
if (sp->sp_expire > 0) {
if (today >= sp->sp_expire) {
if (login_info->pw_uid)
errx(1,"Your account has expired.");
else
printf("Your account has expired.");
sp = getspnam(su_info->pw_name);
if (sp != NULL) {
today = time(0)/(24L * 60 * 60);
if (sp->sp_expire > 0) {
if (today >= sp->sp_expire) {
if (login_info->pw_uid)
errx(1,"Your account has expired.");
else
printf("Your account has expired.");
}
else if (sp->sp_expire - today < 14)
printf("Your account will expire in %d days.\n",
(int)(sp->sp_expire - today));
}
if (sp->sp_max > 0) {
if (today >= sp->sp_lstchg + sp->sp_max) {
if (login_info->pw_uid)
errx(1,"Your password has expired. Choose a new one.");
else
printf("Your password has expired. Choose a new one.");
}
else if (today >= sp->sp_lstchg + sp->sp_max - sp->sp_warn)
printf("Your account will expire in %d days.\n",
(int)(sp->sp_lstchg + sp->sp_max -today));
(int)(sp->sp_expire - today));
}
if (sp->sp_max > 0) {
if (today >= sp->sp_lstchg + sp->sp_max) {
if (login_info->pw_uid)
errx(1,"Your password has expired. Choose a new one.");
else
printf("Your password has expired. Choose a new one.");
}
else if (today >= sp->sp_lstchg + sp->sp_max - sp->sp_warn)
printf("Your account will expire in %d days.\n",
(int)(sp->sp_lstchg + sp->sp_max -today));
}
}
}
#endif
@ -354,16 +376,16 @@ main(int argc, char **argv)
if (environ == NULL)
err (1, "malloc");
environ[0] = NULL;
setenv ("PATH", _PATH_DEFPATH, 1);
esetenv ("PATH", _PATH_DEFPATH, 1);
if (t)
setenv ("TERM", t, 1);
esetenv ("TERM", t, 1);
if (chdir (su_info->pw_dir) < 0)
errx (1, "no directory");
}
if (full_login || su_info->pw_uid)
setenv ("USER", su_info->pw_name, 1);
setenv("HOME", su_info->pw_dir, 1);
setenv("SHELL", shell, 1);
esetenv ("USER", su_info->pw_name, 1);
esetenv("HOME", su_info->pw_dir, 1);
esetenv("SHELL", shell, 1);
}
{
@ -404,7 +426,8 @@ main(int argc, char **argv)
err(1, "setgid");
if (initgroups (su_info->pw_name, su_info->pw_gid) < 0)
err (1, "initgroups");
if(setuid(su_info->pw_uid) < 0)
if(setuid(su_info->pw_uid) < 0
|| (su_info->pw_uid != 0 && setuid(0) == 0))
err(1, "setuid");
#ifdef KRB5

View file

@ -1,3 +1,98 @@
2001-01-09 Assar Westerlund <assar@sics.se>
* libtelnet/kerberos5.c (kerberos5_is): use krb5_rd_cred2 instead
of krb5_rd_cred
2000-12-31 Assar Westerlund <assar@sics.se>
* telnet/main.c (krb5_init): check krb5_init_context for success
* libtelnet/kerberos5.c (kerberos5_init): check krb5_init_context
for success
2000-12-11 Assar Westerlund <assar@sics.se>
* telnet/commands.c (sourceroute): make it not break if the
rfc2292 api does not exist
2000-12-09 Assar Westerlund <assar@sics.se>
* telnetd/sys_term.c (scrub_env): add supporting non-file TERMCAP
variables
2000-12-07 Assar Westerlund <assar@sics.se>
* telnetd/sys_term.c (scrub_env): remove some const-ness
* telnetd/sys_term.c (scrub_env): add LOGNAME and POSIXLY_CORRECT
to the list of authorized environment variables to be compatible
with linux-telnetd
* telnetd/sys_term.c (scrub_env): change filtering algoritm from
allowing everything except a few bad cases to not allowing
anything except a few non-dangerous cases
2000-12-06 Johan Danielsson <joda@pdc.kth.se>
* libtelnet/kerberos5.c: de-pointerise auth_context parameter to
krb5_mk_rep
2000-11-23 Johan Danielsson <joda@pdc.kth.se>
* libtelnet/kerberos5.c: print the principal we're trying to use
* libtelnet/kerberos.c: print the principal we're trying to use
2000-11-16 Assar Westerlund <assar@sics.se>
* libtelnet/misc-proto.h (telnet_getenv): const-ize some
2000-11-08 Johan Danielsson <joda@pdc.kth.se>
* telnet/telnet.c: fake entry if no tgetent
2000-10-08 Assar Westerlund <assar@sics.se>
* telnetd/utility.c (stilloob): check that fds are not too large
to select on
(ttloop): remove confusing output of errno
* telnetd/telnetd.c (my_telnet): check that fds are not too large
to select on
* telnet/utilities.c (EmptyTerminal): check that fds are not too
large to select on
* telnet/sys_bsd.c (process_rings): check that fds are not too
large to select on
* telnet/network.c (stilloob): check that fds are not too large to
select on
2000-06-09 Assar Westerlund <assar@sics.se>
* telnet/commands.c: remove all setuid(getuid()). we do not
support telnet being setuid root
2000-05-05 Assar Westerlund <assar@sics.se>
* telnet/externs.h (sourceroute): update prototype
* telnet/commands.c (tn): re-enable source routing
(sourceroute): make it work again based on the code from
itojun@kame.net
2000-03-28 Assar Westerlund <assar@sics.se>
* telnet/commands.c (tn): clean-up a tiny little bit. give-up if
we do not manage to connect to any address
2000-03-26 Assar Westerlund <assar@sics.se>
* telnetd/sys_term.c (*): make sure to always call time, ctime,
and gmtime with `time_t's. there were some types (like in
lastlog) that we believed to always be time_t. this has proven
wrong on Solaris 8 in 64-bit mode, where they are stored as 32-bit
quantities but time_t has gone up to 64 bits
2000-03-03 Assar Westerlund <assar@sics.se>
* libtelnet/kerberos5.c (kerberos5_init): check that we do have a
keytab before saying that we will support KERBEROS5
2000-02-12 Assar Westerlund <assar@sics.se>
* telnet/commands.c (tn): only set tos for AF_INET. From

View file

@ -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.6 1999/03/20 13:58:15 joda 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.6 1999/03/20 13:58:15 joda 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
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
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,30 +170,27 @@ 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)
SUBDIRS = libtelnet telnet telnetd
EXTRA_DIST = README.ORIG telnet.state
subdir = appl/telnet
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../include/config.h
CONFIG_CLEAN_FILES =
@ -183,13 +198,14 @@ 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)
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 =
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
all: all-redirect
.SUFFIXES:
@ -209,8 +225,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@ -238,7 +252,7 @@ maintainer-clean-recursive:
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
@ -259,15 +273,17 @@ tags-recursive:
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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -275,12 +291,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
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:
@ -293,17 +311,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/telnet
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
for subdir in $(SUBDIRS); do \
@ -311,7 +328,6 @@ distdir: $(DISTFILES)
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
@ -342,7 +358,7 @@ uninstall: uninstall-recursive
all-am: Makefile all-local
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs: installdirs-recursive
installdirs-am:
@ -356,6 +372,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-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
@ -376,19 +393,19 @@ maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
maintainer-clean: maintainer-clean-recursive
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
.PHONY: install-recursive uninstall-recursive install-data-recursive \
uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive 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-am installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
all-redirect all-am all install-strip installdirs-am installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
install-suid-programs:
@ -396,7 +413,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
@ -408,8 +428,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
@ -478,87 +498,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

View file

@ -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.8 1999/03/20 13:58:15 joda 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.8 1999/03/20 13:58:15 joda 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 -I$(srcdir)/.. $(INCLUDE_krb4)
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) -I$(srcdir)/.. $(INCLUDE_krb4)
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,33 +170,43 @@ 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)
noinst_LIBRARIES = libtelnet.a
libtelnet_a_SOURCES = auth-proto.h auth.c auth.h enc-proto.h enc_des.c encrypt.c encrypt.h genget.c kerberos.c kerberos5.c misc-proto.h misc.c misc.h
libtelnet_a_SOURCES = \
auth-proto.h \
auth.c \
auth.h \
enc-proto.h \
enc_des.c \
encrypt.c \
encrypt.h \
genget.c \
kerberos.c \
kerberos5.c \
misc-proto.h \
misc.c \
misc.h
EXTRA_DIST = krb4encpwd.c rsaencpwd.c spx.c
subdir = appl/telnet/libtelnet
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../../include/config.h
CONFIG_CLEAN_FILES =
@ -188,34 +216,36 @@ LIBRARIES = $(noinst_LIBRARIES)
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@
libtelnet_a_AR = $(AR) cru
libtelnet_a_LIBADD =
libtelnet_a_OBJECTS = auth.$(OBJEXT) enc_des.$(OBJEXT) \
am_libtelnet_a_OBJECTS = auth.$(OBJEXT) enc_des.$(OBJEXT) \
encrypt.$(OBJEXT) genget.$(OBJEXT) kerberos.$(OBJEXT) \
kerberos5.$(OBJEXT) misc.$(OBJEXT)
libtelnet_a_OBJECTS = $(am_libtelnet_a_OBJECTS)
AR = ar
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 = $(libtelnet_a_SOURCES)
depcomp =
DIST_COMMON = 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 = $(libtelnet_a_SOURCES)
OBJECTS = $(libtelnet_a_OBJECTS)
OBJECTS = $(am_libtelnet_a_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/telnet/libtelnet/Makefile
@ -233,20 +263,6 @@ distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.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)
@ -258,15 +274,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
@ -279,28 +286,38 @@ maintainer-clean-libtool:
libtelnet.a: $(libtelnet_a_OBJECTS) $(libtelnet_a_DEPENDENCIES)
-rm -f libtelnet.a
$(AR) cru libtelnet.a $(libtelnet_a_OBJECTS) $(libtelnet_a_LIBADD)
$(libtelnet_a_AR) libtelnet.a $(libtelnet_a_OBJECTS) $(libtelnet_a_LIBADD)
$(RANLIB) libtelnet.a
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `cygpath -w $<`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
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:
@ -313,17 +330,16 @@ maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = appl/telnet/libtelnet
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
@ -352,7 +368,7 @@ uninstall: uninstall-am
all-am: Makefile $(LIBRARIES) 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:
@ -365,6 +381,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-noinstLIBRARIES mostlyclean-compile \
mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic
@ -401,7 +418,7 @@ 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 \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@ -411,7 +428,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
@ -423,8 +443,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
@ -493,87 +513,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

View file

@ -55,7 +55,7 @@
#include <config.h>
#endif
RCSID("$Id: kerberos.c,v 1.47 2000/02/07 03:14:19 assar Exp $");
RCSID("$Id: kerberos.c,v 1.50 2000/11/23 02:28:06 joda Exp $");
#ifdef KRB4
#ifdef HAVE_SYS_TYPES_H
@ -170,7 +170,6 @@ kerberos4_send(char *name, Authenticator *ap)
CREDENTIALS cred;
int r;
printf("[ Trying %s ... ]\r\n", name);
if (!UserNameRequested) {
if (auth_debug_mode) {
printf("Kerberos V4: no user name supplied\r\n");
@ -190,6 +189,8 @@ kerberos4_send(char *name, Authenticator *ap)
printf("Kerberos V4: no realm for %s\r\n", RemoteHostName);
return(0);
}
printf("[ Trying %s (%s.%s@%s) ... ]\r\n", name,
KRB_SERVICE_NAME, instance, realm);
r = krb_mk_req(&auth, KRB_SERVICE_NAME, instance, realm, 0L);
if (r) {
printf("mk_req failed: %s\r\n", krb_get_err_text(r));
@ -272,7 +273,7 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
char realm[REALM_SZ];
char instance[INST_SZ];
int r;
int addr_len;
socklen_t addr_len;
if (cnt-- < 1)
return;
@ -331,7 +332,7 @@ kerberos4_is(Authenticator *ap, unsigned char *data, int cnt)
"%s%u",
TKT_ROOT,
(unsigned)pw->pw_uid);
setenv("KRBTKFILE", ts, 1);
esetenv("KRBTKFILE", ts, 1);
if (pw->pw_uid == 0)
syslog(LOG_INFO|LOG_AUTH,

View file

@ -53,7 +53,7 @@
#include <config.h>
RCSID("$Id: kerberos5.c,v 1.39 2000/02/01 00:32:05 assar Exp $");
RCSID("$Id: kerberos5.c,v 1.47 2001/01/09 18:45:33 assar Exp $");
#ifdef KRB5
@ -78,6 +78,12 @@ RCSID("$Id: kerberos5.c,v 1.39 2000/02/01 00:32:05 assar Exp $");
#include "auth.h"
#include "misc.h"
#if defined(DCE)
int dfsk5ok = 0;
int dfspag = 0;
int dfsfwd = 0;
#endif
int forward_flags = 0; /* Flags get set in telnet/main.c on -f and -F */
/* These values need to be the same as those defined in telnet/main.c. */
@ -139,14 +145,34 @@ Data(Authenticator *ap, int type, void *d, int c)
int
kerberos5_init(Authenticator *ap, int server)
{
if (server)
krb5_error_code ret;
ret = krb5_init_context(&context);
if (ret)
return 0;
if (server) {
krb5_keytab kt;
krb5_kt_cursor cursor;
ret = krb5_kt_default(context, &kt);
if (ret)
return 0;
ret = krb5_kt_start_seq_get (context, kt, &cursor);
if (ret) {
krb5_kt_close (context, kt);
return 0;
}
krb5_kt_end_seq_get (context, kt, &cursor);
krb5_kt_close (context, kt);
str_data[3] = TELQUAL_REPLY;
else
} else
str_data[3] = TELQUAL_IS;
krb5_init_context(&context);
return(1);
}
extern int net;
static int
kerberos5_send(char *name, Authenticator *ap)
{
@ -155,9 +181,7 @@ kerberos5_send(char *name, Authenticator *ap)
int ap_opts;
krb5_data cksum_data;
char foo[2];
extern int net;
printf("[ Trying %s ... ]\r\n", name);
if (!UserNameRequested) {
if (auth_debug_mode) {
printf("Kerberos V5: no user name supplied\r\n");
@ -207,10 +231,42 @@ kerberos5_send(char *name, Authenticator *ap)
cksum_data.length = sizeof(foo);
cksum_data.data = foo;
ret = krb5_mk_req(context, &auth_context, ap_opts,
"host", RemoteHostName,
&cksum_data, ccache, &auth);
{
krb5_principal service;
char sname[128];
ret = krb5_sname_to_principal (context,
RemoteHostName,
NULL,
KRB5_NT_SRV_HST,
&service);
if(ret) {
if (auth_debug_mode) {
printf ("Kerberos V5:"
" krb5_sname_to_principal(%s) failed (%s)\r\n",
RemoteHostName, krb5_get_err_text(context, ret));
}
return 0;
}
ret = krb5_unparse_name_fixed(context, service, sname, sizeof(sname));
if(ret) {
if (auth_debug_mode) {
printf ("Kerberos V5:"
" krb5_unparse_name_fixed failed (%s)\r\n",
krb5_get_err_text(context, ret));
}
return 0;
}
printf("[ Trying %s (%s)... ]\r\n", name, sname);
ret = krb5_mk_req_exact(context, &auth_context, ap_opts,
service,
&cksum_data, ccache, &auth);
krb5_free_principal (context, service);
}
if (ret) {
if (1 || auth_debug_mode) {
printf("Kerberos V5: mk_req failed (%s)\r\n",
@ -312,8 +368,8 @@ kerberos5_is(Authenticator *ap, unsigned char *data, int cnt)
NULL,
NULL,
&ticket);
krb5_free_principal (context, server);
krb5_free_principal (context, server);
if (ret) {
char *errbuf;
@ -364,7 +420,7 @@ kerberos5_is(Authenticator *ap, unsigned char *data, int cnt)
}
if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) {
ret = krb5_mk_rep(context, &auth_context, &outbuf);
ret = krb5_mk_rep(context, auth_context, &outbuf);
if (ret) {
Data(ap, KRB_REJECT,
"krb5_mk_rep failed", -1);
@ -454,10 +510,13 @@ kerberos5_is(Authenticator *ap, unsigned char *data, int cnt)
break;
}
ret = krb5_rd_cred (context,
auth_context,
ccache,
&inbuf);
#if defined(DCE)
esetenv("KRB5CCNAME", ccname, 1);
#endif
ret = krb5_rd_cred2 (context,
auth_context,
ccache,
&inbuf);
if(ret) {
char *errbuf;
@ -472,8 +531,12 @@ kerberos5_is(Authenticator *ap, unsigned char *data, int cnt)
printf("Could not read forwarded credentials: %s\r\n",
errbuf);
free (errbuf);
} else
} else {
Data(ap, KRB_FORWARD_ACCEPT, 0, 0);
#if defined(DCE)
dfsfwd = 1;
#endif
}
chown (ccname + 5, pwd->pw_uid, -1);
if (auth_debug_mode)
printf("Forwarded credentials obtained\r\n");
@ -590,6 +653,9 @@ kerberos5_status(Authenticator *ap, char *name, size_t name_sz, int level)
UserNameRequested))
{
strlcpy(name, UserNameRequested, name_sz);
#if defined(DCE)
dfsk5ok = 1;
#endif
return(AUTH_VALID);
} else
return(AUTH_USER);
@ -733,4 +799,16 @@ kerberos5_forward(Authenticator *ap)
}
}
#if defined(DCE)
/* if this was a K5 authentication try and join a PAG for the user. */
void
kerberos5_dfspag(void)
{
if (dfsk5ok) {
dfspag = krb5_dfs_pag(context, dfsfwd, ticket->client,
UserNameRequested);
}
}
#endif
#endif /* KRB5 */

Some files were not shown because too many files have changed in this diff Show more