Vendor import of Heimdal 1.1

This commit is contained in:
Doug Rabson 2008-05-07 13:39:42 +00:00
parent 8d4ba808a5
commit c19800e8cd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor-crypto/heimdal/dist/; revision=178825
1493 changed files with 254832 additions and 50053 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

File diff suppressed because it is too large Load Diff

30
crypto/heimdal/LICENSE Normal file
View File

@ -0,0 +1,30 @@
Copyright (c) 1995 - 2007 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.

View File

@ -1,10 +1,50 @@
# $Id: Makefile.am,v 1.16 2000/11/15 22:54:15 assar Exp $
# $Id: Makefile.am 22497 2008-01-21 12:12:23Z lha $
include $(top_srcdir)/Makefile.am.common
SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc tools
if KCM
kcm_dir = kcm
endif
SUBDIRS= include lib kuser kdc admin kadmin kpasswd
SUBDIRS+= $(kcm_dir) appl doc tools tests packages etc
## ACLOCAL = @ACLOCAL@ -I cf
ACLOCAL_AMFLAGS = -I cf
EXTRA_DIST = Makefile.am.common krb5.conf
EXTRA_DIST = \
TODO \
LICENSE \
README \
ChangeLog \
ChangeLog.1998 \
ChangeLog.1999 \
ChangeLog.2000 \
ChangeLog.2001 \
ChangeLog.2002 \
ChangeLog.2003 \
ChangeLog.2004 \
ChangeLog.2005 \
ChangeLog.2006 \
Makefile.am.common \
autogen.sh \
krb5.conf \
cf/make-proto.pl \
cf/install-catman.sh \
cf/ChangeLog \
cf/c-function.m4 \
cf/ChangeLog \
cf/have-pragma-weak.m4 \
cf/have-types.m4 \
cf/krb-func-getcwd-broken.m4 \
cf/krb-prog-ranlib.m4 \
cf/krb-prog-yacc.m4 \
cf/krb-sys-aix.m4 \
cf/krb-sys-nextstep.m4 \
cf/krb-version.m4 \
cf/roken.m4 \
cf/valgrind-suppressions \
cf/vararray.m4
print-distdir:
@echo $(distdir)

View File

@ -1,4 +1,4 @@
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
include $(top_srcdir)/cf/Makefile.am.common

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,20 +14,16 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.16 2000/11/15 22:54:15 assar Exp $
# $Id: Makefile.am 22497 2008-01-21 12:12:23Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -39,25 +35,24 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \
$(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure \
ChangeLog NEWS TODO compile config.guess config.sub install-sh \
ltconfig ltmain.sh missing mkinstalldirs
ltmain.sh missing ylwrap
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -70,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -78,18 +74,22 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
depcomp =
@ -98,13 +98,17 @@ SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DIST_SUBDIRS = include lib kuser kdc admin kadmin kpasswd kcm appl doc \
tools tests packages etc
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -117,13 +121,7 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -133,8 +131,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -145,11 +141,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -157,42 +152,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -210,12 +190,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -225,15 +202,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -242,6 +218,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -253,15 +230,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -269,74 +241,79 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -353,14 +330,50 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
SUBDIRS = include lib kuser kdc admin kadmin kpasswd appl doc tools
@KCM_TRUE@kcm_dir = kcm
SUBDIRS = include lib kuser kdc admin kadmin kpasswd $(kcm_dir) appl \
doc tools tests packages etc
ACLOCAL_AMFLAGS = -I cf
EXTRA_DIST = Makefile.am.common krb5.conf
EXTRA_DIST = \
TODO \
LICENSE \
README \
ChangeLog \
ChangeLog.1998 \
ChangeLog.1999 \
ChangeLog.2000 \
ChangeLog.2001 \
ChangeLog.2002 \
ChangeLog.2003 \
ChangeLog.2004 \
ChangeLog.2005 \
ChangeLog.2006 \
Makefile.am.common \
autogen.sh \
krb5.conf \
cf/make-proto.pl \
cf/install-catman.sh \
cf/ChangeLog \
cf/c-function.m4 \
cf/ChangeLog \
cf/have-pragma-weak.m4 \
cf/have-types.m4 \
cf/krb-func-getcwd-broken.m4 \
cf/krb-prog-ranlib.m4 \
cf/krb-prog-yacc.m4 \
cf/krb-sys-aix.m4 \
cf/krb-sys-nextstep.m4 \
cf/krb-version.m4 \
cf/roken.m4 \
cf/valgrind-suppressions \
cf/vararray.m4
all: all-recursive
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@ -403,7 +416,6 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@ -412,7 +424,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -424,15 +442,20 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -453,7 +476,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -478,14 +501,16 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
@ -495,9 +520,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -523,24 +550,22 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
test -d $(distdir) || mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -551,15 +576,19 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| mkdir "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="../$(top_distdir)" \
distdir="../$(distdir)/$$subdir" \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@ -570,18 +599,18 @@ distdir: $(DISTFILES)
-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 {} {} \; \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
@ -594,7 +623,7 @@ dist-zip: distdir
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
@ -603,13 +632,13 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@ -645,7 +674,7 @@ distcheck: dist
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@ -689,7 +718,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -718,14 +747,22 @@ install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-recursive
install-exec-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@ -746,24 +783,29 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-info: uninstall-info-recursive
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-data-am install-exec-am install-strip uninstall-am
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \
am--refresh check check-am check-local clean clean-generic \
clean-libtool clean-recursive ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
distcheck distclean distclean-generic distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local am--refresh check check-am check-local \
clean clean-generic clean-libtool ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ \
dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am
install install-am install-data install-data-am \
install-data-hook install-dvi install-dvi-am install-exec \
install-exec-am install-exec-hook install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-hook
install-suid-programs:
@ -778,8 +820,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -789,19 +831,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -817,7 +871,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -887,14 +941,42 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
print-distdir:
@echo $(distdir)
# 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

@ -1,3 +1,180 @@
Changes in release 1.1
* Read-only PKCS11 provider built-in to hx509.
* Documentation for hx509, hcrypto and ntlm libraries improved.
* Better compatibilty with Windows 2008 Server pre-releases and Vista.
* Mac OS X 10.5 support for native credential cache.
* Provide pkg-config file for Heimdal (heimdal-gssapi.pc).
* Bug fixes.
Changes in release 1.0.2
* Ubuntu packages.
* Bug fixes.
Changes in release 1.0.1
* Serveral bug fixes to iprop.
* Make work on platforms without dlopen.
* Add RFC3526 modp group14 as default.
* Handle [kdc] database = { } entries without realm = stanzas.
* Make krb5_get_renewed_creds work.
* Make kaserver preauth work again.
* Bug fixes.
Changes in release 1.0
* Add gss_pseudo_random() for mechglue and krb5.
* Make session key for the krbtgt be selected by the best encryption
type of the client.
* Better interoperability with other PK-INIT implementations.
* Inital support for Mac OS X Keychain for hx509.
* Alias support for inital ticket requests.
* Add symbol versioning to selected libraries on platforms that uses
GNU link editor: gssapi, hcrypto, heimntlm, hx509, krb5, and libkdc.
* New version of imath included in hcrypto.
* Fix memory leaks.
* Bugs fixes.
Changes in release 0.8.1
* Make ASN.1 library less paranoid to with regard to NUL in string to
make it inter-operate with MIT Kerberos again.
* Make GSS-API library work again when using gss_acquire_cred
* Add symbol versioning to libgssapi when using GNU ld.
* Fix memory leaks
* Bugs fixes
Changes in release 0.8
* PK-INIT support.
* HDB extensions support, used by PK-INIT.
* New ASN.1 compiler.
* GSS-API mechglue from FreeBSD.
* Updated SPNEGO to support RFC4178.
* Support for Cryptosystem Negotiation Extension (RFC 4537).
* A new X.509 library (hx509) and related crypto functions.
* A new ntlm library (heimntlm) and related crypto functions.
* Updated the built-in crypto library with bignum support using
imath, support for RSA and DH and renamed it to libhcrypto.
* Subsystem in the KDC, digest, that will perform the digest
operation in the KDC, currently supports: CHAP, MS-CHAP-V2, SASL
DIGEST-MD5 NTLMv1 and NTLMv2.
* KDC will return the "response too big" error to force TCP retries
for large (default 1400 bytes) UDP replies. This is common for
PK-INIT requests.
* Libkafs defaults to use 2b tokens.
* Default to use the API cache on Mac OS X.
* krb5_kuserok() also checks ~/.k5login.d directory for acl files,
see manpage for krb5_kuserok for description.
* Many, many, other updates to code and info manual and manual pages.
* Bug fixes
Changes in release 0.7.2
* Fix security problem in rshd that enable an attacker to overwrite
and change ownership of any file that root could write.
* Fix a DOS in telnetd. The attacker could force the server to crash
in a NULL de-reference before the user logged in, resulting in inetd
turning telnetd off because it forked too fast.
* Make gss_acquire_cred(GSS_C_ACCEPT) check that the requested name
exists in the keytab before returning success. This allows servers
to check if its even possible to use GSSAPI.
* Fix receiving end of token delegation for GSS-API. It still wrongly
uses subkey for sending for compatibility reasons, this will change
in 0.8.
* telnetd, login and rshd are now more verbose in logging failed and
successful logins.
* Bug fixes
Changes in release 0.7.1
* Bug fixes
Changes in release 0.7
* Support for KCM, a process based credential cache
* Support CCAPI credential cache
* SPNEGO support
* AES (and the gssapi conterpart, CFX) support
* Adding new and improve old documentation
* Bug fixes
Changes in release 0.6.6
* Fix security problem in rshd that enable an attacker to overwrite
and change ownership of any file that root could write.
* Fix a DOS in telnetd. The attacker could force the server to crash
in a NULL de-reference before the user logged in, resulting in inetd
turning telnetd off because it forked too fast.
Changes in release 0.6.5
* fix vulnerabilities in telnetd
* unbreak Kerberos 4 and kaserver
Changes in release 0.6.4
* fix vulnerabilities in telnet
* rshd: encryption without a separate error socket should now work
* telnet now uses appdefaults for the encrypt and forward/forwardable
settings
* bug fixes
Changes in release 0.6.3
* fix vulnerabilities in ftpd

View File

@ -1,4 +1,4 @@
$Id: README,v 1.1 2000/07/27 02:33:54 assar Exp $
$Id: README 8839 2000-07-27 02:33:54Z assar $
Heimdal is a Kerberos 5 implementation.

View File

@ -0,0 +1,9 @@
dnl $Id: acinclude.m4 13337 2004-02-12 14:19:16Z lha $
dnl
dnl Only put things that for some reason can't live in the `cf'
dnl directory in this file.
dnl
dnl $xId: misc.m4,v 1.1 1997/12/14 15:59:04 joda Exp $
dnl
m4_define([upcase],`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,70 @@
2006-10-07 Love Hörnquist Åstrand <lha@it.su.se>
* Makefile.am: Add man_MANS to EXTRA_DIST
* Makefile.am: split build files into dist_ and noinst_ SOURCES
2005-07-07 Love Hörnquist Åstrand <lha@it.su.se>
* ktutil.c: rename optind to optidx
* list.c: make a copy of realm and admin_server to avoid
un-consting avoid shadowing
* get.c: make a copy of realm and admin_server to avoid
un-consting avoid shadowing
* change.c (change_entry): just use global context to avoid
shadowing; make a copy of realm and admin_server to avoid
un-consting.
2005-05-19 Love Hörnquist Åstrand <lha@it.su.se>
* change.c (kt_change): plug memory leak from
krb5_kt_remove_entry, print principal on error.
2005-05-02 Dave Love <d.love@dl.ac.uk>
* ktutil.c (help): Don't use non-constant initializer for `fake'.
2005-04-15 Love Hörnquist Åstrand <lha@it.su.se>
* ktutil_locl.h: include <hex.h>
2005-04-14 Love Hörnquist Åstrand <lha@it.su.se>
* add.c: add option -H --hex to the add command
* ktutil-commands.in: add option -H --hex to the add command
* ktutil.8: document option -H --hex to the add command
2004-09-29 Love Hörnquist Åstrand <lha@it.su.se>
* list.c: un c99'ify, from Anders.Magnusson@ltu.se
2004-09-23 Johan Danielsson <joda@pdc.kth.se>
* purge.c: convert to slc; don't purge keys older that a certain
time, instead purge keys that have newer versions that are at
least a certain age
* rename.c: convert to slc
* remove.c: convert to slc
* get.c: convert to slc; warn if resetting disallow-all-tix
* copy.c: convert to slc
* change.c: convert to slc
* add.c: convert to slc
* list.c: convert to slc
* ktutil_locl.h: convert to slc
* ktutil.c: convert to slc
* ktutil-commands.in: slc source file

View File

@ -1,29 +1,44 @@
# $Id: Makefile.am,v 1.35 2001/08/28 08:31:19 assar Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_readline) $(INCLUDE_des)
AM_CPPFLAGS += $(INCLUDE_readline) $(INCLUDE_hcrypto)
SLC = $(top_builddir)/lib/sl/slc
man_MANS = ktutil.8
sbin_PROGRAMS = ktutil
ktutil_SOURCES = \
dist_ktutil_SOURCES = \
add.c \
change.c \
copy.c \
get.c \
ktutil.c \
ktutil_locl.h \
list.c \
purge.c \
remove.c \
rename.c
nodist_ktutil_SOURCES = \
ktutil-commands.c
$(ktutil_OBJECTS): ktutil-commands.h
CLEANFILES = ktutil-commands.h ktutil-commands.c
ktutil-commands.c ktutil-commands.h: ktutil-commands.in
$(SLC) $(srcdir)/ktutil-commands.in
LDADD = \
$(top_builddir)/lib/kadm5/libkadm5clnt.la \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_des) \
$(LIB_hcrypto) \
$(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/sl/libsl.la \
$(LIB_readline) \
$(LIB_roken)
EXTRA_DIST = $(man_MANS) ktutil-commands.in

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.35 2001/08/28 08:31:19 assar Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(ktutil_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,24 +36,23 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
$(top_srcdir)/cf/Makefile.am.common
$(top_srcdir)/cf/Makefile.am.common ChangeLog
sbin_PROGRAMS = ktutil$(EXEEXT)
subdir = admin
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -72,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -80,25 +74,30 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(sbin_PROGRAMS)
am_ktutil_OBJECTS = add.$(OBJEXT) change.$(OBJEXT) copy.$(OBJEXT) \
dist_ktutil_OBJECTS = add.$(OBJEXT) change.$(OBJEXT) copy.$(OBJEXT) \
get.$(OBJEXT) ktutil.$(OBJEXT) list.$(OBJEXT) purge.$(OBJEXT) \
remove.$(OBJEXT) rename.$(OBJEXT)
ktutil_OBJECTS = $(am_ktutil_OBJECTS)
nodist_ktutil_OBJECTS = ktutil-commands.$(OBJEXT)
ktutil_OBJECTS = $(dist_ktutil_OBJECTS) $(nodist_ktutil_OBJECTS)
ktutil_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
ktutil_DEPENDENCIES = $(top_builddir)/lib/kadm5/libkadm5clnt.la \
@ -106,32 +105,27 @@ ktutil_DEPENDENCIES = $(top_builddir)/lib/kadm5/libkadm5clnt.la \
$(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/sl/libsl.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(ktutil_SOURCES)
DIST_SOURCES = $(ktutil_SOURCES)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(dist_ktutil_SOURCES) $(nodist_ktutil_SOURCES)
DIST_SOURCES = $(dist_ktutil_SOURCES)
man8dir = $(mandir)/man8
MANS = $(man_MANS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -141,8 +135,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -153,11 +145,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -165,42 +156,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -218,12 +194,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -233,15 +206,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -250,6 +222,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -261,15 +234,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -277,74 +245,80 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_readline) $(INCLUDE_des)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken) \
$(INCLUDE_readline) $(INCLUDE_hcrypto)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -361,32 +335,40 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
SLC = $(top_builddir)/lib/sl/slc
man_MANS = ktutil.8
ktutil_SOURCES = \
dist_ktutil_SOURCES = \
add.c \
change.c \
copy.c \
get.c \
ktutil.c \
ktutil_locl.h \
list.c \
purge.c \
remove.c \
rename.c
nodist_ktutil_SOURCES = \
ktutil-commands.c
CLEANFILES = ktutil-commands.h ktutil-commands.c
LDADD = \
$(top_builddir)/lib/kadm5/libkadm5clnt.la \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_des) \
$(LIB_hcrypto) \
$(top_builddir)/lib/asn1/libasn1.la \
$(top_builddir)/lib/sl/libsl.la \
$(LIB_readline) \
$(LIB_roken)
EXTRA_DIST = $(man_MANS) ktutil-commands.in
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -418,7 +400,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)"
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -446,7 +428,7 @@ clean-sbinPROGRAMS:
done
ktutil$(EXEEXT): $(ktutil_OBJECTS) $(ktutil_DEPENDENCIES)
@rm -f ktutil$(EXEEXT)
$(LINK) $(ktutil_LDFLAGS) $(ktutil_OBJECTS) $(ktutil_LDADD) $(LIBS)
$(LINK) $(ktutil_OBJECTS) $(ktutil_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -468,13 +450,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -538,9 +516,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -565,23 +545,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. $(distdir)/../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -601,7 +579,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -620,9 +598,10 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -635,7 +614,7 @@ clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -651,14 +630,22 @@ install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am: install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man: install-man8
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -678,23 +665,30 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-man uninstall-sbinPROGRAMS
uninstall-am: uninstall-man uninstall-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man8
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-generic clean-libtool clean-sbinPROGRAMS ctags \
distclean distclean-compile distclean-generic \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-man8 install-sbinPROGRAMS \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-info-am uninstall-man uninstall-man8 \
uninstall-sbinPROGRAMS
install-data-am install-data-hook install-dvi install-dvi-am \
install-exec install-exec-am install-exec-hook install-html \
install-html-am install-info install-info-am install-man \
install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-hook uninstall-man \
uninstall-man8 uninstall-sbinPROGRAMS
install-suid-programs:
@ -709,8 +703,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -720,19 +714,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -748,7 +754,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -818,14 +824,44 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
$(ktutil_OBJECTS): ktutil-commands.h
ktutil-commands.c ktutil-commands.h: ktutil-commands.in
$(SLC) $(srcdir)/ktutil-commands.in
# 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

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,117 +33,119 @@
#include "ktutil_locl.h"
RCSID("$Id: add.c,v 1.5 2002/09/10 19:26:52 joda Exp $");
RCSID("$Id: add.c 14793 2005-04-14 16:45:14Z lha $");
static char *
readstring(const char *prompt, char *buf, size_t len)
{
printf("%s", prompt);
if (fgets(buf, len, stdin) == NULL)
return NULL;
buf[strcspn(buf, "\r\n")] = '\0';
return buf;
}
int
kt_add(int argc, char **argv)
kt_add(struct add_options *opt, int argc, char **argv)
{
krb5_error_code ret;
krb5_keytab keytab;
krb5_keytab_entry entry;
char buf[128];
char *principal_string = NULL;
int kvno = -1;
char *enctype_string = NULL;
char buf[1024];
krb5_enctype enctype;
char *password_string = NULL;
int salt_flag = 1;
int random_flag = 0;
int help_flag = 0;
struct getargs args[] = {
{ "principal", 'p', arg_string, NULL, "principal of key", "principal"},
{ "kvno", 'V', arg_integer, NULL, "key version of key" },
{ "enctype", 'e', arg_string, NULL, "encryption type of key" },
{ "password", 'w', arg_string, NULL, "password for key"},
{ "salt", 's', arg_negative_flag, NULL, "no salt" },
{ "random", 'r', arg_flag, NULL, "generate random key" },
{ "help", 'h', arg_flag, NULL }
};
int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0;
int i = 0;
args[i++].value = &principal_string;
args[i++].value = &kvno;
args[i++].value = &enctype_string;
args[i++].value = &password_string;
args[i++].value = &salt_flag;
args[i++].value = &random_flag;
args[i++].value = &help_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
arg_printusage(args, num_args, "ktutil add", "");
return 1;
}
if(help_flag) {
arg_printusage(args, num_args, "ktutil add", "");
return 1;
}
if((keytab = ktutil_open_keytab()) == NULL)
return 1;
memset(&entry, 0, sizeof(entry));
if(principal_string == NULL) {
printf("Principal: ");
if (fgets(buf, sizeof(buf), stdin) == NULL)
if(opt->principal_string == NULL) {
if(readstring("Principal: ", buf, sizeof(buf)) == NULL)
return 1;
buf[strcspn(buf, "\r\n")] = '\0';
principal_string = buf;
opt->principal_string = buf;
}
ret = krb5_parse_name(context, principal_string, &entry.principal);
ret = krb5_parse_name(context, opt->principal_string, &entry.principal);
if(ret) {
krb5_warn(context, ret, "%s", principal_string);
krb5_warn(context, ret, "%s", opt->principal_string);
goto out;
}
if(enctype_string == NULL) {
printf("Encryption type: ");
if (fgets(buf, sizeof(buf), stdin) == NULL)
if(opt->enctype_string == NULL) {
if(readstring("Encryption type: ", buf, sizeof(buf)) == NULL) {
ret = 1;
goto out;
buf[strcspn(buf, "\r\n")] = '\0';
enctype_string = buf;
}
opt->enctype_string = buf;
}
ret = krb5_string_to_enctype(context, enctype_string, &enctype);
ret = krb5_string_to_enctype(context, opt->enctype_string, &enctype);
if(ret) {
int t;
if(sscanf(enctype_string, "%d", &t) == 1)
if(sscanf(opt->enctype_string, "%d", &t) == 1)
enctype = t;
else {
krb5_warn(context, ret, "%s", enctype_string);
krb5_warn(context, ret, "%s", opt->enctype_string);
goto out;
}
}
if(kvno == -1) {
printf("Key version: ");
if (fgets(buf, sizeof(buf), stdin) == NULL)
if(opt->kvno_integer == -1) {
if(readstring("Key version: ", buf, sizeof(buf)) == NULL) {
ret = 1;
goto out;
buf[strcspn(buf, "\r\n")] = '\0';
kvno = atoi(buf);
}
if(password_string == NULL && random_flag == 0) {
if(des_read_pw_string(buf, sizeof(buf), "Password: ", 1))
}
if(sscanf(buf, "%u", &opt->kvno_integer) != 1)
goto out;
password_string = buf;
}
if(password_string) {
if (!salt_flag) {
if(opt->password_string == NULL && opt->random_flag == 0) {
if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Password: ", 1)) {
ret = 1;
goto out;
}
opt->password_string = buf;
}
if(opt->password_string) {
if (opt->hex_flag) {
size_t len;
void *data;
len = (strlen(opt->password_string) + 1) / 2;
data = malloc(len);
if (data == NULL) {
krb5_warn(context, ENOMEM, "malloc");
goto out;
}
if (hex_decode(opt->password_string, data, len) != len) {
free(data);
krb5_warn(context, ENOMEM, "hex decode failed");
goto out;
}
ret = krb5_keyblock_init(context, enctype,
data, len, &entry.keyblock);
free(data);
} else if (!opt->salt_flag) {
krb5_salt salt;
krb5_data pw;
salt.salttype = KRB5_PW_SALT;
salt.saltvalue.data = NULL;
salt.saltvalue.length = 0;
pw.data = (void*)password_string;
pw.length = strlen(password_string);
krb5_string_to_key_data_salt(context, enctype, pw, salt,
&entry.keyblock);
pw.data = (void*)opt->password_string;
pw.length = strlen(opt->password_string);
ret = krb5_string_to_key_data_salt(context, enctype, pw, salt,
&entry.keyblock);
} else {
krb5_string_to_key(context, enctype, password_string,
entry.principal, &entry.keyblock);
ret = krb5_string_to_key(context, enctype, opt->password_string,
entry.principal, &entry.keyblock);
}
memset (password_string, 0, strlen(password_string));
memset (opt->password_string, 0, strlen(opt->password_string));
} else {
krb5_generate_random_keyblock(context, enctype, &entry.keyblock);
ret = krb5_generate_random_keyblock(context, enctype, &entry.keyblock);
}
entry.vno = kvno;
if(ret) {
krb5_warn(context, ret, "add");
goto out;
}
entry.vno = opt->kvno_integer;
entry.timestamp = time (NULL);
ret = krb5_kt_add_entry(context, keytab, &entry);
if(ret)
@ -151,5 +153,5 @@ kt_add(int argc, char **argv)
out:
krb5_kt_free_entry(context, &entry);
krb5_kt_close(context, keytab);
return 0;
return ret != 0;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,10 +33,10 @@
#include "ktutil_locl.h"
RCSID("$Id: change.c,v 1.5 2003/04/01 15:04:49 lha Exp $");
RCSID("$Id: change.c 15578 2005-07-07 20:44:48Z lha $");
static void
change_entry (krb5_context context, krb5_keytab keytab,
static krb5_error_code
change_entry (krb5_keytab keytab,
krb5_principal principal, krb5_kvno kvno,
const char *realm, const char *admin_server, int server_port)
{
@ -51,19 +51,29 @@ change_entry (krb5_context context, krb5_keytab keytab,
ret = krb5_unparse_name (context, principal, &client_name);
if (ret) {
krb5_warn (context, ret, "krb5_unparse_name");
return;
return ret;
}
memset (&conf, 0, sizeof(conf));
if(realm)
conf.realm = (char *)realm;
else
conf.realm = *krb5_princ_realm (context, principal);
if(realm == NULL)
realm = krb5_principal_get_realm(context, principal);
conf.realm = strdup(realm);
if (conf.realm == NULL) {
free (client_name);
krb5_set_error_string(context, "malloc failed");
return ENOMEM;
}
conf.mask |= KADM5_CONFIG_REALM;
if (admin_server) {
conf.admin_server = (char *)admin_server;
conf.admin_server = strdup(admin_server);
if (conf.admin_server == NULL) {
free(client_name);
free(conf.realm);
krb5_set_error_string(context, "malloc failed");
return ENOMEM;
}
conf.mask |= KADM5_CONFIG_ADMIN_SERVER;
}
@ -78,17 +88,22 @@ change_entry (krb5_context context, krb5_keytab keytab,
KADM5_ADMIN_SERVICE,
&conf, 0, 0,
&kadm_handle);
free (client_name);
free(conf.admin_server);
free(conf.realm);
if (ret) {
krb5_warn (context, ret, "kadm5_c_init_with_skey_ctx");
return;
krb5_warn (context, ret,
"kadm5_c_init_with_skey_ctx: %s:", client_name);
free (client_name);
return ret;
}
ret = kadm5_randkey_principal (kadm_handle, principal, &keys, &num_keys);
kadm5_destroy (kadm_handle);
if (ret) {
krb5_warn(context, ret, "kadm5_randkey_principal");
return;
krb5_warn(context, ret, "kadm5_randkey_principal: %s:", client_name);
free (client_name);
return ret;
}
free (client_name);
for (i = 0; i < num_keys; ++i) {
krb5_keytab_entry new_entry;
@ -102,6 +117,7 @@ change_entry (krb5_context context, krb5_keytab keytab,
krb5_warn (context, ret, "krb5_kt_add_entry");
krb5_free_keyblock_contents (context, &keys[i]);
}
return ret;
}
/*
@ -115,44 +131,15 @@ struct change_set {
};
int
kt_change (int argc, char **argv)
kt_change (struct change_options *opt, int argc, char **argv)
{
krb5_error_code ret;
krb5_keytab keytab;
krb5_kt_cursor cursor;
krb5_keytab_entry entry;
char *realm = NULL;
char *admin_server = NULL;
int server_port = 0;
int help_flag = 0;
int optind = 0;
int i, j, max;
struct change_set *changeset;
struct getargs args[] = {
{ "realm", 'r', arg_string, NULL,
"realm to use", "realm"
},
{ "admin-server", 'a', arg_string, NULL,
"server to contact", "host"
},
{ "server-port", 's', arg_integer, NULL,
"port to contact", "port number"
},
{ "help", 'h', arg_flag, NULL }
};
args[0].value = &realm;
args[1].value = &admin_server;
args[2].value = &server_port;
args[3].value = &help_flag;
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)
|| help_flag) {
arg_printusage(args, sizeof(args) / sizeof(args[0]),
"ktutil change", "principal...");
return 1;
}
int errors = 0;
if((keytab = ktutil_open_keytab()) == NULL)
return 1;
@ -163,7 +150,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 %s", keytab_string);
krb5_warn(context, ret, "%s", keytab_string);
goto out;
}
@ -178,18 +165,20 @@ kt_change (int argc, char **argv)
break;
}
}
if (i < j)
if (i < j) {
krb5_kt_free_entry (context, &entry);
continue;
}
if (optind == argc) {
if (argc == 0) {
add = 1;
} else {
for (i = optind; i < argc; ++i) {
for (i = 0; i < argc; ++i) {
krb5_principal princ;
ret = krb5_parse_name (context, argv[i], &princ);
if (ret) {
krb5_warn (context, ret, "krb5_parse_name %s", argv[i]);
krb5_warn (context, ret, "%s", argv[i]);
continue;
}
if (krb5_principal_compare (context, princ, entry.principal))
@ -225,8 +214,10 @@ kt_change (int argc, char **argv)
}
krb5_kt_free_entry (context, &entry);
}
krb5_kt_end_seq_get(context, keytab, &cursor);
if (ret == KRB5_KT_END) {
ret = 0;
for (i = 0; i < j; i++) {
if (verbose_flag) {
char *client_name;
@ -241,17 +232,21 @@ kt_change (int argc, char **argv)
free(client_name);
}
}
change_entry (context, keytab,
changeset[i].principal, changeset[i].kvno,
realm, admin_server, server_port);
ret = change_entry (keytab,
changeset[i].principal, changeset[i].kvno,
opt->realm_string,
opt->admin_server_string,
opt->server_port_integer);
if (ret != 0)
errors = 1;
}
}
} else
errors = 1;
for (i = 0; i < j; i++)
krb5_free_principal (context, changeset[i].principal);
free (changeset);
ret = krb5_kt_end_seq_get(context, keytab, &cursor);
out:
krb5_kt_close(context, keytab);
return 0;
return errors;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,7 +33,7 @@
#include "ktutil_locl.h"
RCSID("$Id: copy.c,v 1.9 2003/01/16 18:59:03 lha Exp $");
RCSID("$Id: copy.c 14260 2004-09-23 14:45:29Z joda $");
static krb5_boolean
@ -80,8 +80,16 @@ kt_copy_int (const char *from, const char *to)
&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_unparse_name (context, entry.principal, &name_str);
if(ret) {
krb5_warn(context, ret, "krb5_unparse_name");
name_str = NULL; /* XXX */
}
ret = krb5_enctype_to_string(context, entry.keyblock.keytype, &etype_str);
if(ret) {
krb5_warn(context, ret, "krb5_enctype_to_string");
etype_str = NULL; /* XXX */
}
ret = krb5_kt_get_entry(context, dst_keytab,
entry.principal,
entry.vno,
@ -102,7 +110,8 @@ kt_copy_int (const char *from, const char *to)
free(etype_str);
continue;
} else if(ret != KRB5_KT_NOTFOUND) {
krb5_warn(context, ret, "krb5_kt_get_entry(%s)", name_str);
krb5_warn (context, ret, "%s: fetching %s/%s/%u",
to, name_str, etype_str, entry.vno);
krb5_kt_free_entry (context, &entry);
free(name_str);
free(etype_str);
@ -114,7 +123,8 @@ kt_copy_int (const char *from, const char *to)
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);
krb5_warn (context, ret, "%s: adding %s/%s/%u",
to, name_str, etype_str, entry.vno);
free(name_str);
free(etype_str);
break;
@ -127,121 +137,39 @@ kt_copy_int (const char *from, const char *to)
out:
krb5_kt_close (context, src_keytab);
krb5_kt_close (context, dst_keytab);
return 0;
return ret != 0;
}
int
kt_copy (int argc, char **argv)
kt_copy (void *opt, int argc, char **argv)
{
int help_flag = 0;
int optind = 0;
struct getargs args[] = {
{ "help", 'h', arg_flag, NULL}
};
int num_args = sizeof(args) / sizeof(args[0]);
int i = 0;
args[i++].value = &help_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
arg_printusage(args, num_args, "ktutil copy",
"keytab-src keytab-dest");
return 1;
}
if (help_flag) {
arg_printusage(args, num_args, "ktutil copy",
"keytab-src keytab-dest");
return 1;
}
argv += optind;
argc -= optind;
if (argc != 2) {
arg_printusage(args, num_args, "ktutil copy",
"keytab-src keytab-dest");
return 1;
}
return kt_copy_int(argv[0], argv[1]);
}
#ifndef KEYFILE
#define KEYFILE SYSCONFDIR "/srvtab"
#endif
/* copy to from v4 srvtab, just short for copy */
static int
conv(int srvconv, int argc, char **argv)
int
srvconv(struct srvconvert_options *opt, int argc, char **argv)
{
int help_flag = 0;
char *srvtab = KEYFILE;
int optind = 0;
char kt4[1024], kt5[1024];
char *name;
snprintf(kt4, sizeof(kt4), "krb4:%s", opt->srvtab_string);
struct getargs args[] = {
{ "srvtab", 's', arg_string, NULL},
{ "help", 'h', arg_flag, NULL}
};
if(keytab_string != NULL)
return kt_copy_int(kt4, keytab_string);
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_modify_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);
}
krb5_kt_default_modify_name(context, kt5, sizeof(kt5));
return kt_copy_int(kt4, kt5);
}
int
srvconv(int argc, char **argv)
srvcreate(struct srvcreate_options *opt, int argc, char **argv)
{
return conv(1, argc, argv);
}
char kt4[1024], kt5[1024];
int
srvcreate(int argc, char **argv)
{
return conv(0, argc, argv);
snprintf(kt4, sizeof(kt4), "krb4:%s", opt->srvtab_string);
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);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,7 +33,7 @@
#include "ktutil_locl.h"
RCSID("$Id: get.c,v 1.22.2.1 2004/06/21 10:55:46 lha Exp $");
RCSID("$Id: get.c 15583 2005-07-07 21:44:37Z lha $");
static void*
open_kadmin_connection(char *principal,
@ -47,7 +47,11 @@ open_kadmin_connection(char *principal,
memset(&conf, 0, sizeof(conf));
if(realm) {
conf.realm = (char*)realm;
conf.realm = strdup(realm);
if (conf.realm == NULL) {
krb5_set_error_string(context, "malloc: out of memory");
return NULL;
}
conf.mask |= KADM5_CONFIG_REALM;
}
@ -70,6 +74,7 @@ open_kadmin_connection(char *principal,
KADM5_ADMIN_SERVICE,
&conf, 0, 0,
&kadm_handle);
free(conf.realm);
if(ret) {
krb5_warn(context, ret, "kadm5_init_with_password");
return NULL;
@ -78,89 +83,44 @@ open_kadmin_connection(char *principal,
}
int
kt_get(int argc, char **argv)
kt_get(struct get_options *opt, int argc, char **argv)
{
krb5_error_code ret = 0;
krb5_keytab keytab;
void *kadm_handle = NULL;
char *principal = NULL;
char *realm = NULL;
char *admin_server = NULL;
int server_port = 0;
int help_flag = 0;
int optind = 0;
struct getarg_strings etype_strs = {0, NULL};
krb5_enctype *etypes = NULL;
size_t netypes = 0;
struct getargs args[] = {
{ "principal", 'p', arg_string, NULL,
"admin principal", "principal"
},
{ "enctypes", 'e', arg_strings, NULL,
"encryption types to use", "enctypes" },
{ "realm", 'r', arg_string, NULL,
"realm to use", "realm"
},
{ "admin-server", 'a', arg_string, NULL,
"server to contact", "host"
},
{ "server-port", 's', arg_integer, NULL,
"port to contact", "port number"
},
{ "help", 'h', arg_flag, NULL }
};
int i = 0, j;
args[i++].value = &principal;
args[i++].value = &etype_strs;
args[i++].value = &realm;
args[i++].value = &admin_server;
args[i++].value = &server_port;
args[i++].value = &help_flag;
if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)
|| help_flag) {
arg_printusage(args, sizeof(args) / sizeof(args[0]),
"ktutil get", "principal...");
return 1;
}
if(optind == argc) {
krb5_warnx(context, "no principals specified");
arg_printusage(args, sizeof(args) / sizeof(args[0]),
"ktutil get", "principal...");
return 1;
}
int i, j;
unsigned int failed = 0;
if((keytab = ktutil_open_keytab()) == NULL)
return 1;
if(realm)
krb5_set_default_realm(context, realm);
if(opt->realm_string)
krb5_set_default_realm(context, opt->realm_string);
if (etype_strs.num_strings) {
int i;
if (opt->enctypes_strings.num_strings != 0) {
etypes = malloc (etype_strs.num_strings * sizeof(*etypes));
etypes = malloc (opt->enctypes_strings.num_strings * sizeof(*etypes));
if (etypes == NULL) {
krb5_warnx(context, "malloc failed");
goto out;
}
netypes = etype_strs.num_strings;
netypes = opt->enctypes_strings.num_strings;
for(i = 0; i < netypes; i++) {
ret = krb5_string_to_enctype(context,
etype_strs.strings[i],
opt->enctypes_strings.strings[i],
&etypes[i]);
if(ret) {
krb5_warnx(context, "unrecognized enctype: %s",
etype_strs.strings[i]);
opt->enctypes_strings.strings[i]);
goto out;
}
}
}
for(i = optind; i < argc; i++){
for(i = 0; i < argc; i++){
krb5_principal princ_ent;
kadm5_principal_ent_rec princ;
int mask = 0;
@ -172,6 +132,7 @@ kt_get(int argc, char **argv)
ret = krb5_parse_name(context, argv[i], &princ_ent);
if (ret) {
krb5_warn(context, ret, "can't parse principal %s", argv[i]);
failed++;
continue;
}
memset(&princ, 0, sizeof(princ));
@ -184,31 +145,32 @@ kt_get(int argc, char **argv)
if(kadm_handle == NULL) {
const char *r;
if(realm != NULL)
r = realm;
if(opt->realm_string != NULL)
r = opt->realm_string;
else
r = krb5_principal_get_realm(context, princ_ent);
kadm_handle = open_kadmin_connection(principal,
kadm_handle = open_kadmin_connection(opt->principal_string,
r,
admin_server,
server_port);
if(kadm_handle == NULL) {
opt->admin_server_string,
opt->server_port_integer);
if(kadm_handle == NULL)
break;
}
}
ret = kadm5_create_principal(kadm_handle, &princ, mask, "x");
if(ret == 0)
created++;
created = 1;
else if(ret != KADM5_DUP) {
krb5_warn(context, ret, "kadm5_create_principal(%s)", argv[i]);
krb5_free_principal(context, princ_ent);
failed++;
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);
failed++;
continue;
}
@ -219,8 +181,11 @@ kt_get(int argc, char **argv)
for (j = 0; j < n_keys; j++)
krb5_free_keyblock_contents(context, &keys[j]);
krb5_free_principal(context, princ_ent);
failed++;
continue;
}
if(!created && (princ.attributes & KRB5_KDB_DISALLOW_ALL_TIX))
krb5_warnx(context, "%s: disallow-all-tix flag set - clearing", argv[i]);
princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX);
mask = KADM5_ATTRIBUTES;
if(created) {
@ -233,17 +198,18 @@ kt_get(int argc, char **argv)
for (j = 0; j < n_keys; j++)
krb5_free_keyblock_contents(context, &keys[j]);
krb5_free_principal(context, princ_ent);
failed++;
continue;
}
for(j = 0; j < n_keys; j++) {
int do_add = TRUE;
if (netypes) {
int i;
int k;
do_add = FALSE;
for (i = 0; i < netypes; ++i)
if (keys[j].keytype == etypes[i]) {
for (k = 0; k < netypes; ++k)
if (keys[j].keytype == etypes[k]) {
do_add = TRUE;
break;
}
@ -264,10 +230,9 @@ kt_get(int argc, char **argv)
krb5_free_principal(context, princ_ent);
}
out:
free_getarg_strings(&etype_strs);
free(etypes);
if (kadm_handle)
kadm5_destroy(kadm_handle);
krb5_kt_close(context, keytab);
return ret != 0;
return ret != 0 || failed > 0;
}

View File

@ -0,0 +1,266 @@
/*
* Copyright (c) 2004 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: ktutil-commands.in 14793 2005-04-14 16:45:14Z lha $ */
command = {
name = "add"
option = {
long = "principal"
short = "p"
type = "string"
help = "principal to add"
argument = "principal"
default = ""
}
option = {
long = "kvno"
short = "V"
type = "integer"
help = "key version number"
default = "-1"
}
option = {
long = "enctype"
short = "e"
type = "string"
argument = "enctype"
help = "encryption type"
}
option = {
long = "password"
short = "w"
type = "string"
help = "password for key"
}
option = {
long = "salt"
short = "s"
type = "-flag"
help = "use unsalted keys"
default = "1"
}
option = {
long = "random"
short = "r"
type = "flag"
help = "generate random key"
}
option = {
long = "hex"
short = "H"
type = "flag"
help = "password is a hexadecimal string"
}
function = "kt_add"
help = "Adds a key to a keytab."
max_args = "0"
}
command = {
name = "change"
option = {
long = "realm"
short = "r"
type = "string"
argument = "realm"
help = "realm to use"
}
option = {
long = "admin-server"
short = "a"
type = "string"
argument = "host"
help = "server to contact"
}
option = {
long = "server-port"
short = "s"
type = "integer"
argument = "port number"
help = "port number on server"
}
function = "kt_change"
argument = "[principal...]"
help = "Change keys for specified principals (default all)."
}
command = {
name = "copy"
function = "kt_copy"
argument = "source destination"
min_args = "2"
max_args = "2"
help = "Copies one keytab to another."
}
command = {
name = "get"
option = {
long = "principal"
short = "p"
type = "string"
help = "admin principal"
argument = "principal"
}
option = {
long = "enctypes"
short = "e"
type = "strings"
help = "encryption types to use"
argument = "enctype"
}
option = {
long = "realm"
short = "r"
type = "string"
argument = "realm"
help = "realm to use"
}
option = {
long = "admin-server"
short = "a"
type = "string"
argument = "host"
help = "server to contact"
}
option = {
long = "server-port"
short = "s"
type = "integer"
argument = "port number"
help = "port number on server"
}
function = "kt_get"
min_args = "1"
argument = "principal..."
help = "Change keys for specified principals, and add them to the keytab."
}
command = {
name = "list"
option = {
long = "keys"
type = "flag"
help = "show key values"
}
option = {
long = "timestamp"
type = "flag"
help = "show timestamps"
}
max_args = "0"
function = "kt_list"
help = "Show contents of keytab."
}
command = {
name = "purge"
option = {
long = "age"
type = "string"
help = "age to retiere"
default = "1 week";
argument = "time"
}
max_args = "0"
function = "kt_purge"
help = "Remove superceded keys from keytab."
}
command = {
name = "remove"
name = "delete"
option = {
long = "principal"
short = "p"
type = "string"
help = "principal to remove"
argument = "principal"
}
option = {
long = "kvno"
short = "V"
type = "integer"
help = "key version to remove"
argument = "enctype"
default = "0"
}
option = {
long = "enctype"
short = "e"
type = "string"
help = "enctype to remove"
argument = "enctype"
}
max_args = "0"
function = "kt_remove"
help = "Remove keys from keytab."
}
command = {
name = "rename"
function = "kt_rename"
argument = "from to"
min_args = "2"
max_args = "2"
help = "Renames an entry in the keytab."
}
command = {
name = "srvconvert"
name = "srv2keytab"
option = {
long = "srvtab"
short = "s"
type = "string"
argument = "file"
help = "name of Kerberos 4 srvtab"
default = "/etc/srvtab"
}
max_args = "0"
function = "srvconv"
help = "Convert a Kerberos 4 srvtab to a keytab."
}
command = {
name = "srvcreate"
name = "key2srvtab"
option = {
long = "srvtab"
short = "s"
type = "string"
argument = "file"
help = "name of Kerberos 4 srvtab"
default = "/etc/srvtab"
}
max_args = "0"
function = "srvcreate"
help = "Convert a keytab to a Kerberos 4 srvtab."
}
command = {
name = "help"
argument = "command"
max_args = "1"
function = "help"
}

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan
.\" Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
.\" (Royal Institute of Technology, Stockholm, Sweden).
.\" All rights reserved.
.\"
@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: ktutil.8,v 1.19 2003/04/08 20:55:10 lha Exp $
.\" $Id: ktutil.8 14792 2005-04-14 16:43:57Z lha $
.\"
.Dd December 16, 2000
.Dd April 14, 2005
.Dt KTUTIL 8
.Os HEIMDAL
.Sh NAME
@ -76,9 +76,11 @@ can be one of the following:
.Op Fl -random
.Op Fl s
.Op Fl -no-salt
.Op Fl H
.Op Fl -hex
.Xc
Adds a key to the keytab. Options that are not specified will be
prompted for. This requires that you know the password of the
prompted for. This requires that you know the password or the hex key of the
principal to add; if what you really want is to add a new principal to
the keytab, you should consider the
.Ar get
@ -155,10 +157,10 @@ to
.It purge Xo
.Op Fl -age= Ns Ar age
.Xc
Removes all old entries (for which there is a newer version) that are
older than
Removes all old versions of a key for which there is a newer version
that is at least
.Ar age
(default one week).
(default one week) old.
.It srvconvert
.It srv2keytab Xo
.Op Fl s Ar srvtab

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -34,7 +34,7 @@
#include "ktutil_locl.h"
#include <err.h>
RCSID("$Id: ktutil.c,v 1.36 2002/02/11 14:14:11 joda Exp $");
RCSID("$Id: ktutil.c 15585 2005-07-07 21:52:04Z lha $");
static int help_flag;
static int version_flag;
@ -42,35 +42,6 @@ int verbose_flag;
char *keytab_string;
static char keytab_buf[256];
static int help(int argc, char **argv);
static SL_cmd cmds[] = {
{ "add", kt_add, "add",
"adds key to keytab" },
{ "change", kt_change, "change [principal...]",
"get new key for principals (all)" },
{ "copy", kt_copy, "copy src dst",
"copy one keytab to another" },
{ "get", kt_get, "get [principal...]",
"create key in database and add to keytab" },
{ "list", kt_list, "list",
"shows contents of a keytab" },
{ "purge", kt_purge, "purge",
"remove old and superceeded entries" },
{ "remove", kt_remove, "remove",
"remove key from keytab" },
{ "rename", kt_rename, "rename from to",
"rename entry" },
{ "srvconvert", srvconv, "srvconvert [flags]",
"convert v4 srvtab to keytab" },
{ "srv2keytab" },
{ "srvcreate", srvcreate, "srvcreate [flags]",
"convert keytab to v4 srvtab" },
{ "key2srvtab" },
{ "help", help, "help", "" },
{ NULL, NULL, NULL, NULL }
};
static struct getargs args[] = {
{
"version",
@ -134,10 +105,37 @@ ktutil_open_keytab(void)
return keytab;
}
static int
help(int argc, char **argv)
int
help(void *opt, int argc, char **argv)
{
sl_help(cmds, argc, argv);
if(argc == 0) {
sl_help(commands, 1, argv - 1 /* XXX */);
} else {
SL_cmd *c = sl_match (commands, argv[0], 0);
if(c == NULL) {
fprintf (stderr, "No such command: %s. "
"Try \"help\" for a list of commands\n",
argv[0]);
} else {
if(c->func) {
char *fake[] = { NULL, "--help", NULL };
fake[0] = argv[0];
(*c->func)(2, fake);
fprintf(stderr, "\n");
}
if(c->help && *c->help)
fprintf (stderr, "%s\n", c->help);
if((++c)->name && c->func == NULL) {
int f = 0;
fprintf (stderr, "Synonyms:");
while (c->name && c->func == NULL) {
fprintf (stderr, "%s%s", f ? ", " : " ", (c++)->name);
f = 1;
}
fprintf (stderr, "\n");
}
}
}
return 0;
}
@ -151,13 +149,13 @@ usage(int status)
int
main(int argc, char **argv)
{
int optind = 0;
int optidx = 0;
krb5_error_code ret;
setprogname(argv[0]);
ret = krb5_init_context(&context);
if (ret)
errx (1, "krb5_init_context failed: %d", ret);
if(getarg(args, num_args, argc, argv, &optind))
if(getarg(args, num_args, argc, argv, &optidx))
usage(1);
if(help_flag)
usage(0);
@ -165,11 +163,11 @@ main(int argc, char **argv)
print_version(NULL);
exit(0);
}
argc -= optind;
argv += optind;
argc -= optidx;
argv += optidx;
if(argc == 0)
usage(1);
ret = sl_command(cmds, argc, argv);
ret = sl_command(commands, argc, argv);
if(ret == -1)
krb5_warnx (context, "unrecognized command: %s", argv[0]);
return ret;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,7 +32,7 @@
*/
/*
* $Id: ktutil_locl.h,v 1.18 2002/09/10 20:03:45 joda Exp $
* $Id: ktutil_locl.h 14799 2005-04-15 05:02:39Z lha $
*/
#ifndef __KTUTIL_LOCL_H__
@ -61,6 +61,7 @@
#include <sl.h>
#include <getarg.h>
#include <hex.h>
extern krb5_context context;
@ -69,15 +70,6 @@ extern char *keytab_string;
krb5_keytab ktutil_open_keytab(void);
int kt_add (int argc, char **argv);
int kt_change (int argc, char **argv);
int kt_copy (int argc, char **argv);
int kt_get (int argc, char **argv);
int kt_list(int argc, char **argv);
int kt_purge(int argc, char **argv);
int kt_remove(int argc, char **argv);
int kt_rename(int argc, char **argv);
int srvconv(int argc, char **argv);
int srvcreate(int argc, char **argv);
#include "ktutil-commands.h"
#endif /* __KTUTIL_LOCL_H__ */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -32,182 +32,126 @@
*/
#include "ktutil_locl.h"
#include <rtbl.h>
RCSID("$Id: list.c,v 1.10 2002/01/30 10:12:21 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;
};
RCSID("$Id: list.c 21745 2007-07-31 16:11:25Z lha $");
static int
do_list(const char *keytab_string)
do_list(struct list_options *opt, const char *keytab_str)
{
krb5_error_code ret;
krb5_keytab keytab;
krb5_keytab_entry entry;
krb5_kt_cursor cursor;
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;
rtbl_t table;
/* XXX specialcase the ANY type */
if(strncasecmp(keytab_string, "ANY:", 4) == 0) {
if(strncasecmp(keytab_str, "ANY:", 4) == 0) {
int flag = 0;
char buf[1024];
keytab_string += 4;
while (strsep_copy((const char**)&keytab_string, ",",
keytab_str += 4;
ret = 0;
while (strsep_copy((const char**)&keytab_str, ",",
buf, sizeof(buf)) != -1) {
if(flag)
printf("\n");
do_list(buf);
if(do_list(opt, buf))
ret = 1;
flag = 1;
}
return 0;
return ret;
}
ret = krb5_kt_resolve(context, keytab_string, &keytab);
ret = krb5_kt_resolve(context, keytab_str, &keytab);
if (ret) {
krb5_warn(context, ret, "resolving keytab %s", keytab_string);
return 0;
krb5_warn(context, ret, "resolving keytab %s", keytab_str);
return ret;
}
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
if(ret){
krb5_warn(context, ret, "krb5_kt_start_seq_get %s", keytab_string);
goto out;
if(ret) {
krb5_warn(context, ret, "krb5_kt_start_seq_get %s", keytab_str);
krb5_kt_close(context, keytab);
return ret;
}
printf ("%s:\n\n", keytab_string);
printf ("%s:\n\n", keytab_str);
table = rtbl_create();
rtbl_add_column_by_id(table, 0, "Vno", RTBL_ALIGN_RIGHT);
rtbl_add_column_by_id(table, 1, "Type", 0);
rtbl_add_column_by_id(table, 2, "Principal", 0);
if (opt->timestamp_flag)
rtbl_add_column_by_id(table, 3, "Date", 0);
if(opt->keys_flag)
rtbl_add_column_by_id(table, 4, "Key", 0);
rtbl_set_separator(table, " ");
while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){
#define CHECK_MAX(F) if(max_##F < strlen(kp->F)) max_##F = strlen(kp->F)
char buf[1024], *s;
kp = malloc(sizeof(*kp));
if (kp == NULL) {
krb5_kt_free_entry(context, &entry);
krb5_kt_end_seq_get(context, keytab, &cursor);
krb5_warn(context, ret, "malloc failed");
goto out;
}
snprintf(buf, sizeof(buf), "%d", entry.vno);
rtbl_add_column_entry_by_id(table, 0, buf);
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(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);
entry.keyblock.keytype, &s);
if (ret != 0) {
snprintf(buf, sizeof(buf), "unknown (%d)", entry.keyblock.keytype);
rtbl_add_column_entry_by_id(table, 1, buf);
} else {
rtbl_add_column_entry_by_id(table, 1, s);
free(s);
}
if(list_keys) {
krb5_unparse_name_fixed(context, entry.principal, buf, sizeof(buf));
rtbl_add_column_entry_by_id(table, 2, buf);
if (opt->timestamp_flag) {
krb5_format_time(context, entry.timestamp, buf,
sizeof(buf), FALSE);
rtbl_add_column_entry_by_id(table, 3, buf);
}
if(opt->keys_flag) {
int i;
kp->key = malloc(2 * entry.keyblock.keyvalue.length + 1);
s = malloc(2 * entry.keyblock.keyvalue.length + 1);
if (s == NULL) {
krb5_warnx(context, "malloc failed");
ret = ENOMEM;
goto out;
}
for(i = 0; i < entry.keyblock.keyvalue.length; i++)
snprintf(kp->key + 2 * i, 3, "%02x",
snprintf(s + 2 * i, 3, "%02x",
((unsigned char*)entry.keyblock.keyvalue.data)[i]);
CHECK_MAX(key);
rtbl_add_column_entry_by_id(table, 4, s);
free(s);
}
*kie = kp;
kie = &kp->next;
krb5_kt_free_entry(context, &entry);
}
*kie = NULL; /* termiate list */
ret = krb5_kt_end_seq_get(context, keytab, &cursor);
rtbl_format(table, stdout);
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);
}
out:
rtbl_destroy(table);
krb5_kt_close(context, keytab);
return 0;
return ret;
}
int
kt_list(int argc, char **argv)
kt_list(struct list_options *opt, int argc, char **argv)
{
krb5_error_code ret;
int optind = 0;
char kt[1024];
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;
}
opt->timestamp_flag = 1;
if (keytab_string == NULL) {
if((ret = krb5_kt_default_name(context, kt, sizeof(kt))) != 0) {
krb5_warn(context, ret, "getting default keytab name");
return 0;
return 1;
}
keytab_string = kt;
}
do_list(keytab_string);
return 0;
return do_list(opt, keytab_string) != 0;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,7 +33,7 @@
#include "ktutil_locl.h"
RCSID("$Id: purge.c,v 1.6 2001/07/23 09:46:41 joda Exp $");
RCSID("$Id: purge.c 14261 2004-09-23 14:46:43Z joda $");
/*
* keep track of the highest version for every principal.
@ -42,6 +42,7 @@ RCSID("$Id: purge.c,v 1.6 2001/07/23 09:46:41 joda Exp $");
struct e {
krb5_principal principal;
int max_vno;
time_t timestamp;
struct e *next;
};
@ -57,14 +58,17 @@ get_entry (krb5_principal princ, struct e *head)
}
static void
add_entry (krb5_principal princ, int vno, struct e **head)
add_entry (krb5_principal princ, int vno, time_t timestamp, struct e **head)
{
krb5_error_code ret;
struct e *e;
e = get_entry (princ, *head);
if (e != NULL) {
e->max_vno = max (e->max_vno, vno);
if(e->max_vno < vno) {
e->max_vno = vno;
e->timestamp = timestamp;
}
return;
}
e = malloc (sizeof (*e));
@ -74,6 +78,7 @@ add_entry (krb5_principal princ, int vno, struct e **head)
if (ret)
krb5_err (context, 1, ret, "krb5_copy_principal");
e->max_vno = vno;
e->timestamp = timestamp;
e->next = *head;
*head = e;
}
@ -95,40 +100,19 @@ delete_list (struct e *head)
*/
int
kt_purge(int argc, char **argv)
kt_purge(struct purge_options *opt, int argc, char **argv)
{
krb5_error_code ret = 0;
krb5_kt_cursor cursor;
krb5_keytab keytab;
krb5_keytab_entry entry;
int help_flag = 0;
char *age_str = "1 week";
int age;
struct getargs args[] = {
{ "age", 0, arg_string, NULL, "age to retire" },
{ "help", 'h', arg_flag, NULL }
};
int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0;
int i = 0;
struct e *head = NULL;
time_t judgement_day;
args[i++].value = &age_str;
args[i++].value = &help_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
arg_printusage(args, num_args, "ktutil purge", "");
return 1;
}
if(help_flag) {
arg_printusage(args, num_args, "ktutil purge", "");
return 1;
}
age = parse_time(age_str, "s");
age = parse_time(opt->age_string, "s");
if(age < 0) {
krb5_warnx(context, "unparasable time `%s'", age_str);
krb5_warnx(context, "unparasable time `%s'", opt->age_string);
return 1;
}
@ -137,12 +121,12 @@ 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 %s", keytab_string);
krb5_warn(context, ret, "%s", keytab_string);
goto out;
}
while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0) {
add_entry (entry.principal, entry.vno, &head);
add_entry (entry.principal, entry.vno, entry.timestamp, &head);
krb5_kt_free_entry(context, &entry);
}
ret = krb5_kt_end_seq_get(context, keytab, &cursor);
@ -151,7 +135,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, %s", keytab_string);
krb5_warn(context, ret, "%s", keytab_string);
goto out;
}
@ -164,7 +148,7 @@ kt_purge(int argc, char **argv)
}
if (entry.vno < e->max_vno
&& judgement_day - entry.timestamp > age) {
&& judgement_day - e->timestamp > age) {
if (verbose_flag) {
char *name_str;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,81 +33,61 @@
#include "ktutil_locl.h"
RCSID("$Id: remove.c,v 1.3 2001/07/23 09:46:41 joda Exp $");
RCSID("$Id: remove.c 17004 2006-04-07 13:06:37Z lha $");
int
kt_remove(int argc, char **argv)
kt_remove(struct remove_options *opt, int argc, char **argv)
{
krb5_error_code ret = 0;
krb5_keytab_entry entry;
krb5_keytab keytab;
char *principal_string = NULL;
krb5_principal principal = NULL;
int kvno = 0;
char *keytype_string = NULL;
krb5_enctype enctype = 0;
int help_flag = 0;
struct getargs args[] = {
{ "principal", 'p', arg_string, NULL, "principal to remove" },
{ "kvno", 'V', arg_integer, NULL, "key version to remove" },
{ "enctype", 'e', arg_string, NULL, "enctype to remove" },
{ "help", 'h', arg_flag, NULL }
};
int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0;
int i = 0;
args[i++].value = &principal_string;
args[i++].value = &kvno;
args[i++].value = &keytype_string;
args[i++].value = &help_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
arg_printusage(args, num_args, "ktutil remove", "");
return 1;
}
if(help_flag) {
arg_printusage(args, num_args, "ktutil remove", "");
return 0;
}
if(principal_string) {
ret = krb5_parse_name(context, principal_string, &principal);
if(opt->principal_string) {
ret = krb5_parse_name(context, opt->principal_string, &principal);
if(ret) {
krb5_warn(context, ret, "%s", principal_string);
krb5_warn(context, ret, "%s", opt->principal_string);
return 1;
}
}
if(keytype_string) {
ret = krb5_string_to_enctype(context, keytype_string, &enctype);
if(opt->enctype_string) {
ret = krb5_string_to_enctype(context, opt->enctype_string, &enctype);
if(ret) {
int t;
if(sscanf(keytype_string, "%d", &t) == 1)
if(sscanf(opt->enctype_string, "%d", &t) == 1)
enctype = t;
else {
krb5_warn(context, ret, "%s", keytype_string);
krb5_warn(context, ret, "%s", opt->enctype_string);
if(principal)
krb5_free_principal(context, principal);
return 1;
}
}
}
if (!principal && !enctype && !kvno) {
if (!principal && !enctype && !opt->kvno_integer) {
krb5_warnx(context,
"You must give at least one of "
"principal, enctype or kvno.");
return 1;
ret = EINVAL;
goto out;
}
if((keytab = ktutil_open_keytab()) == NULL)
return 1;
if((keytab = ktutil_open_keytab()) == NULL) {
ret = 1;
goto out;
}
entry.principal = principal;
entry.keyblock.keytype = enctype;
entry.vno = kvno;
entry.vno = opt->kvno_integer;
ret = krb5_kt_remove_entry(context, keytab, &entry);
krb5_kt_close(context, keytab);
if(ret)
krb5_warn(context, ret, "remove");
out:
if(principal)
krb5_free_principal(context, principal);
return 0;
return ret != 0;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* Copyright (c) 2001-2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,52 +33,28 @@
#include "ktutil_locl.h"
RCSID("$Id: rename.c,v 1.1 2001/07/23 10:17:32 joda Exp $");
RCSID("$Id: rename.c 14260 2004-09-23 14:45:29Z joda $");
int
kt_rename(int argc, char **argv)
kt_rename(void *opt, int argc, char **argv)
{
krb5_error_code ret = 0;
krb5_keytab_entry entry;
krb5_keytab keytab;
krb5_kt_cursor cursor;
krb5_principal from_princ, to_princ;
int help_flag = 0;
struct getargs args[] = {
{ "help", 'h', arg_flag, NULL }
};
int num_args = sizeof(args) / sizeof(args[0]);
int optind = 0;
int i = 0;
args[i++].value = &help_flag;
if(getarg(args, num_args, argc, argv, &optind)) {
arg_printusage(args, num_args, "ktutil rename", "from to");
return 1;
}
if(help_flag) {
arg_printusage(args, num_args, "ktutil rename", "from to");
return 0;
}
argv += optind;
argc -= optind;
if(argc != 2) {
arg_printusage(args, num_args, "ktutil rename", "from to");
return 0;
}
ret = krb5_parse_name(context, argv[0], &from_princ);
if(ret != 0) {
krb5_warn(context, ret, "%s", argv[0]);
return 0;
return 1;
}
ret = krb5_parse_name(context, argv[1], &to_princ);
if(ret != 0) {
krb5_free_principal(context, from_princ);
krb5_warn(context, ret, "%s", argv[1]);
return 0;
return 1;
}
if((keytab = ktutil_open_keytab()) == NULL) {
@ -99,6 +75,8 @@ kt_rename(int argc, char **argv)
if(ret != 0) {
if(ret != KRB5_CC_END && ret != KRB5_KT_END)
krb5_warn(context, ret, "getting entry from keytab");
else
ret = 0;
break;
}
if(krb5_principal_compare(context, entry.principal, from_princ)) {
@ -128,6 +106,6 @@ kt_rename(int argc, char **argv)
krb5_free_principal(context, from_princ);
krb5_free_principal(context, to_princ);
return 0;
return ret != 0;
}

View File

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.24 2001/01/27 18:34:39 assar Exp $
# $Id: Makefile.am 17775 2006-06-30 20:26:15Z lha $
include $(top_srcdir)/Makefile.am.common
@ -13,6 +13,7 @@ SUBDIRS = \
ftp \
login \
$(dir_otp) \
gssmask \
popper \
push \
rsh \

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,20 +14,16 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.24 2001/01/27 18:34:39 assar Exp $
# $Id: Makefile.am 17775 2006-06-30 20:26:15Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -39,6 +35,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -46,16 +43,14 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = appl
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -68,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -76,16 +72,20 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
depcomp =
@ -94,23 +94,20 @@ SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = afsutil ftp login otp popper push rsh rcp su xnlock \
telnet test kx kf dceutils
DIST_SUBDIRS = afsutil ftp login otp gssmask popper push rsh rcp su \
xnlock telnet test kx kf dceutils
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -120,8 +117,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -132,11 +127,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -144,42 +138,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -197,12 +176,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -212,15 +188,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -229,6 +204,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -240,15 +216,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -256,74 +227,79 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -340,6 +316,7 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
@OTP_TRUE@dir_otp = otp
@DCE_TRUE@dir_dce = dceutils
@ -348,6 +325,7 @@ SUBDIRS = \
ftp \
login \
$(dir_otp) \
gssmask \
popper \
push \
rsh \
@ -363,7 +341,7 @@ SUBDIRS = \
all: all-recursive
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -400,10 +378,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@ -411,7 +385,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -423,15 +403,20 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -452,7 +437,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -477,14 +462,16 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
@ -494,9 +481,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -521,23 +510,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/.. $(distdir)/../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -551,12 +538,16 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| mkdir "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="../$(top_distdir)" \
distdir="../$(distdir)/$$subdir" \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@ -589,7 +580,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -600,8 +591,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@ -617,14 +607,22 @@ install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-recursive
install-exec-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@ -643,22 +641,27 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-info: uninstall-info-recursive
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-data-am install-exec-am install-strip uninstall-am
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local check \
check-am check-local clean clean-generic clean-libtool \
clean-recursive ctags ctags-recursive distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local check check-am check-local clean \
clean-generic clean-libtool ctags ctags-recursive dist-hook \
distclean distclean-generic distclean-libtool distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-data-hook \
install-dvi install-dvi-am install-exec install-exec-am \
install-exec-hook install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-hook
install-suid-programs:
@ -673,8 +676,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -684,19 +687,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -712,7 +727,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -782,14 +797,39 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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

@ -1,11 +1,59 @@
2003-08-25 Love Hörnquist Åstrand <lha@it.su.se>
2007-04-11 Love Hörnquist Åstrand <lha@it.su.se>
* afslog.c: 1.22->1.23: (do_afslog): is cell is unset, set it
"<default cell>" for error printing
* pagsh.1,afslog.1: - options must be lexicographically ordered;
again, options without arguments must be placed before options
with arguments. - manual page cross references are done using
the macro `.Xr', not the macro `.Nm' (used for command names
instead).
From Igor Sobrado.
2006-10-07 Love Hörnquist Åstrand <lha@it.su.se>
* Makefile.am: Add man_MANS to EXTRA_DIST
2006-01-03 Love Hörnquist Åstrand <lha@it.su.se>
* afslog.1: Document options to allow select principal or
credential cache when doing afslog.
* afslog.c: Add options to allow select principal or credential
cache when doing afslog.
2005-02-12 Love Hörnquist Åstrand <lha@it.su.se>
* Makefile.am: man_MANS += pagsh.1
* pagsh.c: add --cache-type that allows the user to control the
resulting credential cache type, inherit the type from the
invoking process
* pagsh.1: manpage for pagsh
2004-09-03 Love Hörnquist Åstrand <lha@it.su.se>
* afslog.c: use negative string help string for arg_negative_flag
Pointed out by Harald Barth
2004-07-27 Love Hörnquist Åstrand <lha@it.su.se>
* pagsh.c: use setprogname, if we stripped off -c, try use the
fallback code
2003-10-14 Johan Danielsson <joda@pdc.kth.se>
* pagsh.c: mkstemp formats must end in exactly six X's
2003-07-15 Love Hörnquist Åstrand <lha@it.su.se>
* afslog.c (do_afslog): is cell is unset, set it "<default cell>"
for error printing
* pagsh.c: unconditionally set KRBTKFILE
2003-04-23 Love Hörnquist Åstrand <lha@it.su.se>
* afslog.c: 1.21->1.22: (log_func): drop the error number
* afslog.c (log_func): drop the error number
2003-04-14 Love Hörnquist Åstrand <lha@it.su.se>

View File

@ -1,8 +1,8 @@
# $Id: Makefile.am,v 1.15 2003/03/18 13:13:06 lha Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
AM_CPPFLAGS += $(INCLUDE_krb4)
bin_PROGRAMS = afslog pagsh
@ -10,11 +10,13 @@ afslog_SOURCES = afslog.c
pagsh_SOURCES = pagsh.c
man_MANS = afslog.1
man_MANS = afslog.1 pagsh.1
LDADD = $(LIB_kafs) \
$(LIB_krb4) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_des) \
$(LIB_hcrypto) \
$(LIB_roken)
EXTRA_DIST = $(man_MANS)

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.15 2003/03/18 13:13:06 lha Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(afslog_SOURCES) $(pagsh_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,6 +36,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -50,16 +45,14 @@ bin_PROGRAMS = afslog$(EXEEXT) pagsh$(EXEEXT)
subdir = appl/afsutil
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -72,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -80,16 +74,20 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
@ -112,17 +110,18 @@ pagsh_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(afslog_SOURCES) $(pagsh_SOURCES)
DIST_SOURCES = $(afslog_SOURCES) $(pagsh_SOURCES)
man1dir = $(mandir)/man1
@ -131,13 +130,7 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -147,8 +140,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -159,11 +150,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -171,42 +161,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -224,12 +199,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -239,15 +211,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -256,6 +227,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -267,15 +239,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -283,74 +250,80 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken) \
$(INCLUDE_krb4)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -367,21 +340,23 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
afslog_SOURCES = afslog.c
pagsh_SOURCES = pagsh.c
man_MANS = afslog.1
man_MANS = afslog.1 pagsh.1
LDADD = $(LIB_kafs) \
$(LIB_krb4) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_des) \
$(LIB_hcrypto) \
$(LIB_roken)
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -413,7 +388,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -441,10 +416,10 @@ clean-binPROGRAMS:
done
afslog$(EXEEXT): $(afslog_OBJECTS) $(afslog_DEPENDENCIES)
@rm -f afslog$(EXEEXT)
$(LINK) $(afslog_LDFLAGS) $(afslog_OBJECTS) $(afslog_LDADD) $(LIBS)
$(LINK) $(afslog_OBJECTS) $(afslog_LDADD) $(LIBS)
pagsh$(EXEEXT): $(pagsh_OBJECTS) $(pagsh_DEPENDENCIES)
@rm -f pagsh$(EXEEXT)
$(LINK) $(pagsh_LDFLAGS) $(pagsh_OBJECTS) $(pagsh_LDADD) $(LIBS)
$(LINK) $(pagsh_OBJECTS) $(pagsh_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -466,13 +441,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -536,9 +507,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -563,23 +536,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../.. $(distdir)/../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -599,7 +570,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -620,7 +591,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -632,7 +603,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -648,14 +619,22 @@ install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man: install-man1
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -675,23 +654,30 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
uninstall-am: uninstall-binPROGRAMS uninstall-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man1
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-binPROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-man1 \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am uninstall-man \
uninstall-man1
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-exec-hook \
install-html install-html-am install-info install-info-am \
install-man install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-hook \
uninstall-man uninstall-man1
install-suid-programs:
@ -706,8 +692,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -717,19 +703,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -745,7 +743,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -815,14 +813,39 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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

@ -1,4 +1,4 @@
.\" Copyright (c) 2002 Kungliga Tekniska Högskolan
.\" Copyright (c) 2002 - 2007 Kungliga Tekniska Högskolan
.\" (Royal Institute of Technology, Stockholm, Sweden).
.\" All rights reserved.
.\"
@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: afslog.1,v 1.3 2003/03/18 04:29:34 lha Exp $
.\" $Id: afslog.1 20310 2007-04-11 11:22:23Z lha $
.\"
.Dd November 26, 2002
.Dt AFSLOG 1
@ -40,24 +40,30 @@
obtain AFS tokens
.Sh SYNOPSIS
.Nm
.Op Fl h | Fl -help
.Op Fl -no-v4
.Op Fl -no-v5
.Op Fl u | Fl -unlog
.Op Fl v | Fl -verbose
.Op Fl -version
.Oo Fl c Ar cell \*(Ba Xo
.Fl -cell= Ns Ar cell
.Xc
.Oc
.Oo Fl p Ar path \*(Ba Xo
.Fl -file= Ns Ar path
.Xc
.Oc
.Oo Fl k Ar realm \*(Ba Xo
.Fl -realm= Ns Ar realm
.Xc
.Oc
.Op Fl -no-v4
.Op Fl -no-v5
.Op Fl u | Fl -unlog
.Op Fl v | Fl -verbose
.Op Fl -version
.Op Fl h | Fl -help
.Oo Fl P Ar principal \*(Ba Xo
.Fl -principal= Ns Ar principal
.Xc
.Oc
.Bk -words
.Oo Fl p Ar path \*(Ba Xo
.Fl -file= Ns Ar path
.Xc
.Oc
.Ek
.Op Ar cell | path ...
.Sh DESCRIPTION
.Nm
@ -71,23 +77,6 @@ decides upon.
.Pp
Supported options:
.Bl -tag -width Ds
.It Xo
.Fl c Ar cell,
.Fl -cell= Ns Ar cell
.Xc
This specified one or more cell names to get tokens for.
.It Xo
.Fl p Ar path ,
.Fl -file= Ns Ar path
.Xc
This specified one or more file paths for which tokens should be
obtained.
.It Xo
.Fl k Ar realm ,
.Fl -realm= Ns Ar realm
.Xc
This is the Kerberos realm the AFS servers live in, this should
normally not be specified.
.It Fl -no-v4
This makes
.Nm
@ -97,6 +86,15 @@ This makes
.Nm
not try using Kerberos 5.
.It Xo
.Fl P Ar principal ,
.Fl -principal Ar principal
.Xc
select what Kerberos 5 principal to use.
.It Fl -cache Ar cache
select what Kerberos 5 credential cache to use.
.Fl -principal
overrides this option.
.It Xo
.Fl u ,
.Fl -unlog
.Xc
@ -110,7 +108,25 @@ and
.Fl -verbose
.Xc
Adds more verbosity for what is actually going on.
.It Xo
.Fl c Ar cell,
.Fl -cell= Ns Ar cell
.Xc
This specified one or more cell names to get tokens for.
.It Xo
.Fl k Ar realm ,
.Fl -realm= Ns Ar realm
.Xc
This is the Kerberos realm the AFS servers live in, this should
normally not be specified.
.It Xo
.Fl p Ar path ,
.Fl -file= Ns Ar path
.Xc
This specified one or more file paths for which tokens should be
obtained.
.El
.Pp
Instead of using
.Fl c
and

View File

@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: afslog.c,v 1.21.2.2 2003/08/25 11:43:51 lha Exp $");
RCSID("$Id: afslog.c 16438 2006-01-03 09:27:54Z lha $");
#endif
#include <ctype.h>
#ifdef KRB5
@ -49,9 +49,6 @@ RCSID("$Id: afslog.c,v 1.21.2.2 2003/08/25 11:43:51 lha Exp $");
static int help_flag;
static int version_flag;
#if 0
static int create_user;
#endif
static getarg_strings cells;
static char *realm;
static getarg_strings files;
@ -61,6 +58,8 @@ static int verbose;
static int use_krb4 = 1;
#endif
#ifdef KRB5
static char *client_string;
static char *cache_string;
static int use_krb5 = 1;
#endif
@ -70,13 +69,12 @@ struct getargs args[] = {
{ "realm", 'k', arg_string, &realm, "realm for afs cell", "realm" },
{ "unlog", 'u', arg_flag, &unlog_flag, "remove tokens" },
#ifdef KRB4
{ "v4", 0, arg_negative_flag, &use_krb4, "use Kerberos 4" },
{ "v4", 0, arg_negative_flag, &use_krb4, "don't use Kerberos 4" },
#endif
#ifdef KRB5
{ "v5", 0, arg_negative_flag, &use_krb5, "use Kerberos 5" },
#endif
#if 0
{ "create-user", 0, arg_flag, &create_user, "create user if not found" },
{ "principal",'P',arg_string,&client_string,"principal to use","principal"},
{ "cache", 0, arg_string, &cache_string, "ccache to use", "cache"},
{ "v5", 0, arg_negative_flag, &use_krb5, "don't use Kerberos 5" },
#endif
{ "verbose",'v', arg_flag, &verbose },
{ "version", 0, arg_flag, &version_flag },
@ -131,43 +129,6 @@ expand_cell_name(const char *cell)
return cell;
}
#if 0
static int
createuser (char *cell)
{
char cellbuf[64];
char name[ANAME_SZ];
char instance[INST_SZ];
char realm[REALM_SZ];
char cmd[1024];
if (cell == NULL) {
FILE *f;
int len;
f = fopen (_PATH_THISCELL, "r");
if (f == NULL)
err (1, "open(%s)", _PATH_THISCELL);
if (fgets (cellbuf, sizeof(cellbuf), f) == NULL)
err (1, "read cellname from %s", _PATH_THISCELL);
len = strlen(cellbuf);
if (cellbuf[len-1] == '\n')
cellbuf[len-1] = '\0';
cell = cellbuf;
}
if(krb_get_default_principal(name, instance, realm))
errx (1, "Could not even figure out who you are");
snprintf (cmd, sizeof(cmd),
"pts createuser %s%s%s@%s -cell %s",
name, *instance ? "." : "", instance, strlwr(realm),
cell);
DEBUG("Executing %s", cmd);
return system(cmd);
}
#endif
static void
usage(int ecode)
{
@ -234,14 +195,14 @@ do_afslog(const char *cell)
#ifdef KRB5
if(context != NULL && id != NULL && use_krb5) {
k5ret = krb5_afslog(context, id, cell, NULL);
k5ret = krb5_afslog(context, id, cell, realm);
if(k5ret == 0)
return 0;
}
#endif
#if KRB4
if (use_krb4) {
k4ret = krb_afslog(cell, NULL);
k4ret = krb_afslog(cell, realm);
if(k4ret == 0)
return 0;
}
@ -297,11 +258,29 @@ main(int argc, char **argv)
}
#ifdef KRB5
ret = krb5_init_context(&context);
if (ret)
if (ret) {
context = NULL;
else
if(krb5_cc_default(context, &id) != 0)
id = NULL;
} else {
if (client_string) {
krb5_principal client;
ret = krb5_parse_name(context, client_string, &client);
if (ret == 0)
ret = krb5_cc_cache_match(context, client, NULL, &id);
if (ret)
id = NULL;
}
if (id == NULL && cache_string) {
if(krb5_cc_resolve(context, cache_string, &id) != 0) {
krb5_warnx(context, "failed to open kerberos 5 cache '%s'",
cache_string);
id = NULL;
}
}
if (id == NULL)
if(krb5_cc_default(context, &id) != 0)
id = NULL;
}
#endif
if (verbose)

View File

@ -0,0 +1,92 @@
.\" Copyright (c) 2005 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: pagsh.1 20311 2007-04-11 11:27:51Z lha $
.\"
.Dd February 12, 2005
.Dt PAGSH 1
.Os Heimdal
.Sh NAME
.Nm pagsh
.Nd
creates a new credential cache sandbox
.Sh SYNOPSIS
.Nm
.Op Fl c
.Op Fl h | Fl -help
.Op Fl -version
.Op Fl -cache-type= Ns Ar string
.Ar command [args...]
.Sh DESCRIPTION
Supported options:
.Bl -tag -width Ds
.It Xo
.Fl c
.Xc
.It Xo
.Fl -cache-type= Ns Ar string
.Xc
.It Xo
.Fl h ,
.Fl -help
.Xc
.It Xo
.Fl -version
.Xc
.El
.Pp
.Nm
creates a new credential cache sandbox for the user to live in.
If AFS is installed on the computer, the user is put in a newly
created PAG.
.Pp
For Kerberos 5, the credential cache type that is used is the same as
the credential cache type that was used at the time of
.Nm
invocation.
The credential cache type can be controlled by the option
.Fl -cache-type .
.Sh EXAMPLES
Create a new sandbox where new credentials can be used, while the old
credentials can be used by other processes.
.Bd -literal -offset indent
$ klist
Credentials cache: FILE:/tmp/krb5cc_913
Principal: lha@E.KTH.SE
Issued Expires Principal
Feb 12 10:08:31 Feb 12 20:06:36 krbtgt/E.KTH.SE@E.KTH.SE
$ pagsh
$ klist
klist: No ticket file: /tmp/krb5cc_03014a
.Ed
.Sh SEE ALSO
.Xr afslog 1

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995 - 2002 Kungliga Tekniska Högskolan
* Copyright (c) 1995 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -35,7 +35,7 @@
#include <config.h>
#endif
RCSID("$Id: pagsh.c,v 1.6 2002/08/23 17:54:20 assar Exp $");
RCSID("$Id: pagsh.c 14574 2005-02-12 14:23:28Z lha $");
#include <stdio.h>
#include <stdlib.h>
@ -64,12 +64,22 @@ RCSID("$Id: pagsh.c,v 1.6 2002/08/23 17:54:20 assar Exp $");
#include <roken.h>
#include <getarg.h>
#ifndef TKT_ROOT
#define TKT_ROOT "/tmp/tkt"
#endif
static int help_flag;
static int version_flag;
static int c_flag;
#ifdef KRB5
static char *typename_arg;
#endif
struct getargs getargs[] = {
{ NULL, 'c', arg_flag, &c_flag },
#ifdef KRB5
{ "cache-type", 0, arg_string, &typename_arg },
#endif
{ "version", 0, arg_flag, &version_flag },
{ "help", 'h', arg_flag, &help_flag },
};
@ -90,94 +100,140 @@ usage(int ecode)
int
main(int argc, char **argv)
{
int f;
char tf[1024];
char *p;
int f;
char tf[1024];
char *p;
char *path;
char **args;
int i;
int optind = 0;
char *path;
char **args;
int i;
int optind = 0;
set_progname(argv[0]);
if(getarg(getargs, num_args, argc, argv, &optind))
usage(1);
if(help_flag)
usage(0);
if(version_flag) {
print_version(NULL);
exit(0);
}
setprogname(argv[0]);
if(getarg(getargs, num_args, argc, argv, &optind))
usage(1);
if(help_flag)
usage(0);
if(version_flag) {
print_version(NULL);
exit(0);
}
argc -= optind;
argv += optind;
argc -= optind;
argv += optind;
#ifdef KRB5
snprintf (tf, sizeof(tf), "%sXXXXXX", KRB5_DEFAULT_CCROOT);
f = mkstemp (tf + 5);
close (f);
unlink (tf + 5);
esetenv("KRB5CCNAME", tf, 1);
#endif
{
const krb5_cc_ops *type;
krb5_error_code ret;
krb5_context context;
krb5_ccache id;
const char *name;
#ifdef KRB4
snprintf (tf, sizeof(tf), "%s_XXXXXX", TKT_ROOT);
f = mkstemp (tf);
close (f);
unlink (tf);
esetenv("KRBTKFILE", tf, 1);
#endif
ret = krb5_init_context(&context);
if (ret) /* XXX should this really call exit ? */
errx(1, "no kerberos 5 support");
i = 0;
if (typename_arg == NULL) {
char *s;
args = (char **) malloc((argc + 10)*sizeof(char *));
if (args == NULL)
errx (1, "Out of memory allocating %lu bytes",
(unsigned long)((argc + 10)*sizeof(char *)));
if(*argv == NULL) {
path = getenv("SHELL");
if(path == NULL){
struct passwd *pw = k_getpwuid(geteuid());
path = strdup(pw->pw_shell);
name = krb5_cc_default_name(context);
if (name == NULL)
krb5_errx(context, 1, "Failed getting default "
"credential cache type");
typename_arg = strdup(name);
if (typename_arg == NULL)
errx(1, "strdup");
s = strchr(typename_arg, ':');
if (s)
*s = '\0';
}
type = krb5_cc_get_prefix_ops(context, typename_arg);
if (type == NULL)
krb5_err(context, 1, ret, "Failed getting ops for %s "
"credential cache", typename_arg);
ret = krb5_cc_gen_new(context, type, &id);
if (ret)
krb5_err(context, 1, ret, "Failed generating credential cache");
name = krb5_cc_get_name(context, id);
if (name == NULL)
krb5_errx(context, 1, "Generated credential cache have no name");
snprintf(tf, sizeof(tf), "%s:%s", typename_arg, name);
ret = krb5_cc_close(context, id);
if (ret)
krb5_err(context, 1, ret, "Failed closing credential cache");
krb5_free_context(context);
esetenv("KRB5CCNAME", tf, 1);
}
} else {
path = strdup(*argv++);
}
if (path == NULL)
errx (1, "Out of memory copying path");
#endif
snprintf (tf, sizeof(tf), "%s_XXXXXX", TKT_ROOT);
f = mkstemp (tf);
if (f < 0)
err(1, "mkstemp failed");
close (f);
unlink (tf);
esetenv("KRBTKFILE", tf, 1);
i = 0;
args = (char **) malloc((argc + 10)*sizeof(char *));
if (args == NULL)
errx (1, "Out of memory allocating %lu bytes",
(unsigned long)((argc + 10)*sizeof(char *)));
p=strrchr(path, '/');
if(p)
args[i] = strdup(p+1);
else
args[i] = strdup(path);
if (args[i++] == NULL)
errx (1, "Out of memory copying arguments");
if(*argv == NULL) {
path = getenv("SHELL");
if(path == NULL){
struct passwd *pw = k_getpwuid(geteuid());
path = strdup(pw->pw_shell);
}
} else {
path = strdup(*argv++);
}
if (path == NULL)
errx (1, "Out of memory copying path");
while(*argv)
args[i++] = *argv++;
p=strrchr(path, '/');
if(p)
args[i] = strdup(p+1);
else
args[i] = strdup(path);
args[i++] = NULL;
if (args[i++] == NULL)
errx (1, "Out of memory copying arguments");
while(*argv)
args[i++] = *argv++;
if(k_hasafs())
k_setpag();
args[i++] = NULL;
unsetenv("PAGPID");
execvp(path, args);
if (errno == ENOENT) {
char **sh_args = malloc ((i + 2) * sizeof(char *));
int j;
if(k_hasafs())
k_setpag();
if (sh_args == NULL)
errx (1, "Out of memory copying sh arguments");
for (j = 1; j < i; ++j)
sh_args[j + 2] = args[j];
sh_args[0] = "sh";
sh_args[1] = "-c";
sh_args[2] = path;
execv ("/bin/sh", sh_args);
}
err (1, "execvp");
unsetenv("PAGPID");
execvp(path, args);
if (errno == ENOENT || c_flag) {
char **sh_args = malloc ((i + 2) * sizeof(char *));
int j;
if (sh_args == NULL)
errx (1, "Out of memory copying sh arguments");
for (j = 1; j < i; ++j)
sh_args[j + 2] = args[j];
sh_args[0] = "sh";
sh_args[1] = "-c";
sh_args[2] = path;
execv ("/bin/sh", sh_args);
}
err (1, "execvp");
}

View File

@ -1,6 +1,189 @@
2004-08-20 Love Hörnquist Åstrand <lha@it.su.se>
2007-07-12 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/ftp.c: 1.77: send ABOR protect with security layer if its there
* ftp/gssapi.c: Fix pointer vs strict alias rules.
2007-06-20 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/security.c: if no mech have no session, its ok, just don't
call it.
* ftp/security.h: provide prototype for sec_userok().
* move ksetpag after initgroups to make it work on Linux when its
without syscall hooks to change sys_setgroups preserve the
pag. From Alexsander Boström.
2007-06-09 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/Makefile.am: don't clean yacc/lex files in CLEANFILES,
maintainers clean will do that for us.
2006-10-07 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/Makefile.am: Add man_MANS to EXTRA_DIST
* ftp/Makefile.am: Add man_MANS to EXTRA_DIST
2006-08-08 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c: Add comment by seteuid call isn't not needed.
* ftpd/ftpd.c: Check return values from seteuid, prompted by MIT
advisory. Thanks to Tom Yu at MIT, and Michael Calmer and Marcus
Meissner at SUSE. Either of CVE-2006-3083 or CVE-2006-3084.
2006-06-27 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/gss_userok.c (gss_userok): create a local krb5_context and
use that instead of the libgssapi context (that might not exist).
2006-05-05 Love Hörnquist Åstrand <lha@it.su.se>
* Rename u_intXX_t to uintXX_t
2006-03-23 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/ftp.1: Add undocument flags and spelling, from Ted Percival
<Ted.Percival@quest.com>
2006-02-27 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.8: fix grammar in --no-insecure-oob option (partly
from Thomas Klausner)
2006-01-24 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/ftp.c: Indent.
2006-01-12 Johan Danielsson <joda@pdc.kth.se>
* ftpd/ftpd.c (pass): remove unused variable in the !OTP case
2005-10-22 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ls.c: Check return value from asprintf instead of string !=
NULL since it undefined behavior on Linux. From Björn Sandell
* ftpd/gss_userok.c: Check return value from asprintf instead of
string != NULL since it undefined behavior on Linux. From Björn
Sandell
* ftpd/ftpd.c: Check return value from asprintf instead of string
!= NULL since it undefined behavior on Linux. From Björn Sandell
* ftp/gssapi.c: Check return value from asprintf instead of string
!= NULL since it undefined behavior on Linux. From Björn Sandell
2005-10-12 Johan Danielsson <joda@pdc.kth.se>
* ftp/ftp.1: document -x
* ftp/security.h: implement cprotect (from MIT)
* ftp/security.c: add -x (encrypt) option; implement cprotect
(from MIT); make sure we CCC if switching to clear-text command
channel
* ftp/cmdtab.c: implement cprotect (from MIT)
* ftp/ruserpass.c: if doing command line encryption (-x), ignore
prot commands in .netrc
* ftp/ftp_var.h: add -x (encrypt) option
* ftp/globals.c: add -x (encrypt) option
* ftp/main.c: add -x (encrypt) option
2005-07-19 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpcmd.y: Fix shadow warning.
* ftp/security.c: Fix shadow warning.
* ftp/security.c: Fix shadow warnings.
* ftp/ruserpass.c: Fix shadow warnings.
* ftp/ftp.c: Fix shadow warnings.
* ftp/cmds.c: fix shadow warnings
* Add Kerberos 5 klist, old patch from Tomas Nyström (remove krb4
support). Support klist in client for kerberos 5 clase.
Clean up delegation of gss tokens and do afslog.
2005-07-13 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/gssapi.c (gss_adat): avoid leaking memory
(gss_auth): always try next kname if there is one, independant of
min_stat
* ftp/gssapi.c: avoid const warning, use sin4 instead of sin to
avoid shadow warning, free target_name
2005-07-09 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/security.c: keep track of if CCC was passed
* ftpd/extern.h: variable to keep track of if CCC was passed
* ftpd/ftpcmd.y: sprinkel check_secure, check if CCC was passed in
check_secure
2005-06-02 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c (filename_check): change signednes of p to avoid
warning, move typecasts
2005-05-29 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c: avoid 'unused variable' warnings
2005-05-10 David Love <fx@gnu.org>
* ftpd/pathnames.h: #ifdef protect _PATH_ISSUE
2005-04-25 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/domacro.c: handle string trunctions
2005-04-24 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/security.c: use strlcat
* ftp/domacro.c: use strlcpy
2005-04-20 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/security.c: cast size_t to unsigned long
2005-04-18 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c (statcmd): cast argument to isdigit to unsigned char
* ftp/cmds.c (mget): cast char to unsigned char to make sure its
not negative when passing it to tolower
2005-04-07 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/ftp.c: fix 3 'var' might be used uninitialized warnings
2005-04-04 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/cmds.c: MacOS is also a unix that doesn't define
__unix__/unix While here, rewrite this part of the function to not
modify that string, but rather take a copy of it and them modify
is, all this just to pacify gcc
2005-01-09 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/domacro.c: cast argument to is* to unsigned char
* ftp/ftp.c: cast argument to tolower to unsigned char
2004-08-20 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/ftp.c: send ABOR protect with security layer if its there
* ftpd/{ftpd_locl.h, extern.h, ftpcmd.y, ftpd.8, ftpd.c}:
Remove all traces of setjmp/longjmp.
@ -12,51 +195,95 @@
most places since the code no longer look and is structured the same
way.
extern.h: 1.25
ftpcmd.y: 1.65
ftpd.8: 1.22
ftpd.c: 1.170
ftpd_locl.h: 1.14
2004-08-16 Johan Danielsson <joda@pdc.kth.se>
* ftp/main.c: reverse help strings for --no-gss-bindings and
--no-gss-delegate
2004-06-20 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpcmd.y: make cbuf 64k to handle lager tickets From:
MAAAAA MOOOR <huaraz@btinternet.com>
2004-06-21 Love Hörnquist Åstrand <lha@it.su.se>
2004-03-14 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpcmd.y: 1.64: make cbuf 64k to handle lager tickets From:
MAAAAA MOOOR <huaraz@btinternet.com> 1.63: strncasecmp returns
integer so don't compare with NULL
* ftpd/ftpd.c (main): setpag if there is krb4 OR krb5 support
2004-03-14 Love Hörnquist Åstrand <lha@it.su.se>
2003-12-19 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c: 1.169: (main): setpag if there is krb4 OR krb5
support
2003-08-20 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.8: 1.20->1.21: document --gss-bindings
* ftp/security.h: add ftp_do_gss_delegate
* ftpd/ftpd.c: 1.166->1.168: wrap gssapi stuff with KRB5,
(args): add gss-bindings
* ftp/main.c (getargs): negative flag for delegating gss creds
* ftp/gssapi.c (ftp_do_gss_delegate): delegate creds (default on)
2003-09-03 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/main.c: 1.33->1.35: wrap gssapi stuff with KRB5,
(args): add gss-bindings
* ftp/ftp.c: s/des_read_pw_string/UI_UTIL_read_pw_string/
* ftp/cmds.c: s/des_read_pw_string/UI_UTIL_read_pw_string/
2003-07-19 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/security.h: add ftp_do_gss_bindings
* ftp/ftp.1: fix mdoc bug
* ftp/ftp.1: document --no-gss-bindings
* ftp/gssapi.c: Optionally support gss bindings, client does it by
default, server not. This is to make it work for clients behind
NAT.
* ftp/main.c (args): add gss-bindings
(main): set ftp_do_gss_bindings to 1 to make client use them
* ftp/security.h: 1.9->1.10: add ftp_do_gss_bindings
* ftp/gssapi.c: 1.24->1.25: Optionally support gss bindings,
client does it by default, server not. This is to make it work
for clients behind NAT.
* ftp/ftp.1: 1.12->1.15: gssapi bindings + madoc fixes
* ftpd/ftpd.c (args): add gss-bindings
2003-08-15 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.8: document --gss-bindings
2003-06-13 Johan Danielsson <joda@pdc.kth.se>
* ftp/gssapi.c: 1.23->1.24: (gss_adat): fix name allocation bug
* ftp/gssapi.c (gss_adat): fix name allocation bug
2003-05-21 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/gss_userok.c (gss_userok): release delegated cred handle
2003-04-16 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/gssapi.c (gss_adat): remove poking inside the delegated
handle, also fixes problem where to much memory was allocated
* ftpd/gss_userok.c (gss_userok): remove poking inside the
delegated handle
2003-05-14 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpcmd.y: support afslog <cell> and afslog when compiled
with krb5
2003-05-07 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/cmdtab.c: include afslog in both the krb4 and krb5 case
* ftp/kauth.c: include afslog in both the krb4 and krb5 case
* ftp/Makefile.am: always include auth.c
2003-05-07 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/Makefile.am: always include auth.c
* ftpd/kauth.c: do afslog in the krb5 case too
2003-04-22 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/ftp.1: replace > with \*[Gt]
2003-04-16 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c: make sure argument to is* functions are unsigned
2003-04-06 Love Hörnquist Åstrand <lha@it.su.se>
2003-04-06 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.8: s/kerberos/Kerberos/
@ -64,7 +291,7 @@
* ftpd/pathnames.h (_PATH_FTPUSERS): conditionalize
2003-03-18 Love Hörnquist Åstrand <lha@it.su.se>
2003-03-18 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ftpd.c (krb5_verify): always do krb5_afslog, remove setpag
(its done in main)
@ -78,17 +305,17 @@
* ftpd/ftpd_locl.h: always include kafs
2003-03-16 Love Hörnquist Åstrand <lha@it.su.se>
2003-03-16 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/gssapi.c (gss_adat): now that gss_export_name exports a
principal, bandaid with gss_display_name, and check that oid is
GSS_KRB5_NT_PRINCIPAL_NAME, also free memory
2003-02-25 Love Hörnquist Åstrand <lha@it.su.se>
2003-02-25 Love Hörnquist Åstrand <lha@it.su.se>
* ftp/gssapi.c (gss_auth): print out the name we authenticated too
2003-02-25 Love Hörnquist Åstrand <lha@it.su.se>
2003-02-25 Love Hörnquist Åstrand <lha@it.su.se>
* ftpd/ls.c: use readlink with bufsize - 1, From NetBSD

View File

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.5 1999/03/20 13:58:14 joda Exp $
# $Id: Makefile.am 5652 1999-03-20 13:58:20Z joda $
include $(top_srcdir)/Makefile.am.common

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,20 +14,16 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.5 1999/03/20 13:58:14 joda Exp $
# $Id: Makefile.am 5652 1999-03-20 13:58:20Z joda $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -39,6 +35,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -46,16 +43,14 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = appl/ftp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -68,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -76,16 +72,20 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
depcomp =
@ -94,22 +94,19 @@ SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -119,8 +116,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -131,11 +126,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -143,42 +137,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -196,12 +175,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -211,15 +187,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -228,6 +203,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -239,15 +215,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -255,74 +226,79 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -339,12 +315,13 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
SUBDIRS = common ftp ftpd
all: all-recursive
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -381,10 +358,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@ -392,7 +365,13 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@set fnord $$MAKEFLAGS; amf=$$2; \
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -404,15 +383,20 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -433,7 +417,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -458,14 +442,16 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
@ -475,9 +461,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -502,23 +490,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../.. $(distdir)/../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -529,15 +515,19 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
list='$(SUBDIRS)'; for subdir in $$list; do \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| mkdir "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="../$(top_distdir)" \
distdir="../$(distdir)/$$subdir" \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
@ -570,7 +560,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -581,8 +571,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@ -598,14 +587,22 @@ install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-recursive
install-exec-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@ -624,22 +621,27 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-info: uninstall-info-recursive
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-data-am install-exec-am install-strip uninstall-am
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local check \
check-am check-local clean clean-generic clean-libtool \
clean-recursive ctags ctags-recursive distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local check check-am check-local clean \
clean-generic clean-libtool ctags ctags-recursive dist-hook \
distclean distclean-generic distclean-libtool distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-data-hook \
install-dvi install-dvi-am install-exec install-exec-am \
install-exec-hook install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-hook
install-suid-programs:
@ -654,8 +656,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -665,19 +667,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -693,7 +707,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -763,14 +777,39 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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

@ -1,8 +1,8 @@
# $Id: Makefile.am,v 1.9 1999/07/28 21:15:06 assar Exp $
# $Id: Makefile.am 14164 2004-08-26 11:55:29Z joda $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
AM_CPPFLAGS += $(INCLUDE_krb4)
noinst_LIBRARIES = libcommon.a

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.9 1999/07/28 21:15:06 assar Exp $
# $Id: Makefile.am 14164 2004-08-26 11:55:29Z joda $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(libcommon_a_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,6 +36,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -49,16 +44,14 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
subdir = appl/ftp/common
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -71,6 +64,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -79,48 +73,47 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
ARFLAGS = cru
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libcommon_a_AR = $(AR) $(ARFLAGS)
libcommon_a_LIBADD =
am_libcommon_a_OBJECTS = sockbuf.$(OBJEXT) buffer.$(OBJEXT)
libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libcommon_a_SOURCES)
DIST_SOURCES = $(libcommon_a_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -130,8 +123,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -142,11 +133,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -154,42 +144,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -207,12 +182,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -222,15 +194,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -239,6 +210,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -250,15 +222,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -266,74 +233,80 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken) \
$(INCLUDE_krb4)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -350,6 +323,7 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = \
@ -360,7 +334,7 @@ libcommon_a_SOURCES = \
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -419,10 +393,6 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@ -443,9 +413,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -470,23 +442,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../../.. $(distdir)/../../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -524,7 +494,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -537,7 +507,7 @@ clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -553,14 +523,22 @@ install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -580,19 +558,26 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-generic clean-libtool clean-noinstLIBRARIES ctags \
distclean distclean-compile distclean-generic \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am
install-data-am install-data-hook install-dvi install-dvi-am \
install-exec install-exec-am install-exec-hook install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook
install-suid-programs:
@ -607,8 +592,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -618,19 +603,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -646,7 +643,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -716,14 +713,39 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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

@ -36,7 +36,7 @@
#include <err.h>
#include "roken.h"
RCSID("$Id: buffer.c,v 1.4 2000/10/23 04:49:25 joda Exp $");
RCSID("$Id: buffer.c 9129 2000-10-23 04:49:25Z joda $");
/*
* Allocate a buffer enough to handle st->st_blksize, if

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: common.h,v 1.12 1999/12/02 16:58:29 joda Exp $ */
/* $Id: common.h 7463 1999-12-02 16:58:55Z joda $ */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@ -39,7 +39,7 @@
#include <sys/socket.h>
#endif
RCSID("$Id: sockbuf.c,v 1.3 1999/12/02 16:58:29 joda Exp $");
RCSID("$Id: sockbuf.c 7463 1999-12-02 16:58:55Z joda $");
void
set_buffer_size(int fd, int read)

View File

@ -1,15 +1,15 @@
# $Id: Makefile.am,v 1.15 2001/08/28 08:31:21 assar Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
include $(top_srcdir)/Makefile.am.common
INCLUDES += -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4) $(INCLUDE_des)
AM_CPPFLAGS += -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4) $(INCLUDE_hcrypto)
bin_PROGRAMS = ftp
CHECK_LOCAL =
if KRB4
krb4_sources = krb4.c kauth.c
krb4_sources = krb4.c
endif
if KRB5
krb5_sources = gssapi.c
@ -29,10 +29,11 @@ ftp_SOURCES = \
globals.c \
security.c \
security.h \
kauth.c \
$(krb4_sources) \
$(krb5_sources)
EXTRA_ftp_SOURCES = krb4.c kauth.c gssapi.c
EXTRA_ftp_SOURCES = krb4.c gssapi.c
man_MANS = ftp.1
@ -41,6 +42,8 @@ LDADD = \
$(LIB_gssapi) \
$(LIB_krb5) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_hcrypto) \
$(LIB_roken) \
$(LIB_readline)
EXTRA_DIST = $(man_MANS)

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.15 2001/08/28 08:31:21 assar Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(ftp_SOURCES) $(EXTRA_ftp_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,6 +36,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -50,16 +45,14 @@ bin_PROGRAMS = ftp$(EXEEXT)
subdir = appl/ftp/ftp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -72,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -80,16 +74,20 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
@ -97,35 +95,31 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am__ftp_SOURCES_DIST = 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.c kauth.c gssapi.c
@KRB4_TRUE@am__objects_1 = krb4.$(OBJEXT) kauth.$(OBJEXT)
security.c security.h kauth.c krb4.c gssapi.c
@KRB4_TRUE@am__objects_1 = krb4.$(OBJEXT)
@KRB5_TRUE@am__objects_2 = gssapi.$(OBJEXT)
am_ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) ftp.$(OBJEXT) \
main.$(OBJEXT) ruserpass.$(OBJEXT) domacro.$(OBJEXT) \
globals.$(OBJEXT) security.$(OBJEXT) $(am__objects_1) \
$(am__objects_2)
globals.$(OBJEXT) security.$(OBJEXT) kauth.$(OBJEXT) \
$(am__objects_1) $(am__objects_2)
ftp_OBJECTS = $(am_ftp_OBJECTS)
ftp_LDADD = $(LDADD)
@KRB5_TRUE@am__DEPENDENCIES_1 = \
@KRB5_TRUE@ $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
am__DEPENDENCIES_3 =
ftp_DEPENDENCIES = ../common/libcommon.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_3) \
$(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
am__DEPENDENCIES_1 =
ftp_DEPENDENCIES = ../common/libcommon.a $(LIB_gssapi) $(LIB_krb5) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(ftp_SOURCES) $(EXTRA_ftp_SOURCES)
DIST_SOURCES = $(am__ftp_SOURCES_DIST) $(EXTRA_ftp_SOURCES)
man1dir = $(mandir)/man1
@ -134,13 +128,7 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -150,8 +138,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -162,11 +148,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -174,42 +159,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -227,12 +197,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -242,15 +209,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -259,6 +225,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -270,15 +237,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -286,74 +248,81 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4) $(INCLUDE_des)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken) \
-I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_krb4) \
$(INCLUDE_hcrypto)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -370,9 +339,10 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
CHECK_LOCAL =
@KRB4_TRUE@krb4_sources = krb4.c kauth.c
@KRB4_TRUE@krb4_sources = krb4.c
@KRB5_TRUE@krb5_sources = gssapi.c
ftp_SOURCES = \
cmds.c \
@ -388,24 +358,26 @@ ftp_SOURCES = \
globals.c \
security.c \
security.h \
kauth.c \
$(krb4_sources) \
$(krb5_sources)
EXTRA_ftp_SOURCES = krb4.c kauth.c gssapi.c
EXTRA_ftp_SOURCES = krb4.c gssapi.c
man_MANS = ftp.1
LDADD = \
../common/libcommon.a \
$(LIB_gssapi) \
$(LIB_krb5) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_hcrypto) \
$(LIB_roken) \
$(LIB_readline)
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -437,7 +409,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -465,7 +437,7 @@ clean-binPROGRAMS:
done
ftp$(EXEEXT): $(ftp_OBJECTS) $(ftp_DEPENDENCIES)
@rm -f ftp$(EXEEXT)
$(LINK) $(ftp_LDFLAGS) $(ftp_OBJECTS) $(ftp_LDADD) $(LIBS)
$(LINK) $(ftp_OBJECTS) $(ftp_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -487,13 +459,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -557,9 +525,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -584,23 +554,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../../.. $(distdir)/../../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -620,7 +588,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -641,7 +609,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -653,7 +621,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -669,14 +637,22 @@ install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man: install-man1
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -696,23 +672,30 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
uninstall-am: uninstall-binPROGRAMS uninstall-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man1
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-binPROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-man1 \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am uninstall-man \
uninstall-man1
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-exec-hook \
install-html install-html-am install-info install-info-am \
install-man install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-hook \
uninstall-man uninstall-man1
install-suid-programs:
@ -727,8 +710,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -738,19 +721,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -766,7 +761,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -836,14 +831,39 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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

@ -36,7 +36,7 @@
*/
#include "ftp_locl.h"
RCSID("$Id: cmds.c,v 1.44 2001/08/05 06:39:14 assar Exp $");
RCSID("$Id: cmds.c 15673 2005-07-19 18:19:33Z lha $");
typedef void (*sighand)(int);
@ -142,7 +142,7 @@ setpeer(int argc, char **argv)
if (autologin)
login(argv[1]);
#if (defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(_CRAY) || defined(__NetBSD__)) && NBBY == 8
#if (defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(_CRAY) || defined(__NetBSD__) || defined(__APPLE__)) && NBBY == 8
/*
* this ifdef is to keep someone form "porting" this to an incompatible
* system and not checking this out. This way they have to think about it.
@ -150,22 +150,23 @@ setpeer(int argc, char **argv)
overbose = verbose;
if (debug == 0)
verbose = -1;
if (command("SYST") == COMPLETE && overbose) {
char *cp, c;
cp = strchr(reply_string+4, ' ');
if (command("SYST") == COMPLETE && overbose && strlen(reply_string) > 4) {
char *cp, *p;
cp = strdup(reply_string + 4);
if (cp == NULL)
cp = strchr(reply_string+4, '\r');
if (cp) {
if (cp[-1] == '.')
cp--;
c = *cp;
*cp = '\0';
errx(1, "strdup: out of memory");
p = strchr(cp, ' ');
if (p == NULL)
p = strchr(cp, '\r');
if (p) {
if (p[-1] == '.')
p--;
*p = '\0';
}
printf("Remote system type is %s.\n",
reply_string+4);
if (cp)
*cp = c;
printf("Remote system type is %s.\n", cp);
free(cp);
}
if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) {
if (proxy)
@ -573,28 +574,28 @@ reget(int argc, char **argv)
void
get(int argc, char **argv)
{
char *mode;
char *filemode;
if (restart_point) {
if (curtype == TYPE_I)
mode = "r+wb";
filemode = "r+wb";
else
mode = "r+w";
filemode = "r+w";
} else {
if (curtype == TYPE_I)
mode = "wb";
filemode = "wb";
else
mode = "w";
filemode = "w";
}
getit(argc, argv, 0, mode);
getit(argc, argv, 0, filemode);
}
/*
* Receive one file.
*/
int
getit(int argc, char **argv, int restartit, char *mode)
getit(int argc, char **argv, int restartit, char *filemode)
{
int loc = 0;
int local_given = 1;
@ -695,7 +696,7 @@ getit(int argc, char **argv, int restartit, char *mode)
}
}
recvrequest("RETR", argv[2], argv[1], mode,
recvrequest("RETR", argv[2], argv[1], filemode,
argv[1] != oldargv1 || argv[2] != oldargv2, local_given);
restart_point = 0;
return (0);
@ -736,7 +737,7 @@ mget(int argc, char **argv)
if (mflag && confirm(argv[0], cp)) {
tp = cp;
if (mcase) {
for (tp2 = tmpbuf; (ch = *tp++);)
for (tp2 = tmpbuf;(ch = (unsigned char)*tp++);)
*tp2++ = tolower(ch);
*tp2 = '\0';
tp = tmpbuf;
@ -772,7 +773,7 @@ remglob(char **argv, int doswitch)
static FILE *ftemp = NULL;
static char **args;
int oldverbose, oldhash;
char *cp, *mode;
char *cp, *filemode;
if (!mflag) {
if (!doglob) {
@ -807,8 +808,8 @@ remglob(char **argv, int doswitch)
if (doswitch) {
pswitch(!proxy);
}
for (mode = "w"; *++argv != NULL; mode = "a")
recvrequest ("NLST", temp, *argv, mode, 0, 0);
for (filemode = "w"; *++argv != NULL; filemode = "a")
recvrequest ("NLST", temp, *argv, filemode, 0, 0);
if (doswitch) {
pswitch(!proxy);
}
@ -1187,7 +1188,7 @@ mls(int argc, char **argv)
{
sighand oldintr;
int ointer, i;
char *cmd, mode[1], *dest;
char *cmd, filemode[2], *dest;
if (argc < 2 && !another(&argc, &argv, "remote-files"))
goto usage;
@ -1210,9 +1211,10 @@ mls(int argc, char **argv)
mflag = 1;
oldintr = signal(SIGINT, mabort);
setjmp(jabort);
filemode[1] = '\0';
for (i = 1; mflag && i < argc-1; ++i) {
*mode = (i == 1) ? 'w' : 'a';
recvrequest(cmd, dest, argv[i], mode, 0, 1);
*filemode = (i == 1) ? 'w' : 'a';
recvrequest(cmd, dest, argv[i], filemode, 0, 1);
if (!mflag && fromatty) {
ointer = interactive;
interactive = 1;
@ -1235,8 +1237,8 @@ shell(int argc, char **argv)
{
pid_t pid;
RETSIGTYPE (*old1)(int), (*old2)(int);
char shellnam[40], *shell, *namep;
int status;
char shellnam[40], *shellpath, *namep;
int waitstatus;
old1 = signal (SIGINT, SIG_IGN);
old2 = signal (SIGQUIT, SIG_IGN);
@ -1245,32 +1247,32 @@ shell(int argc, char **argv)
close(pid);
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
shell = getenv("SHELL");
if (shell == NULL)
shell = _PATH_BSHELL;
namep = strrchr(shell,'/');
shellpath = getenv("SHELL");
if (shellpath == NULL)
shellpath = _PATH_BSHELL;
namep = strrchr(shellpath, '/');
if (namep == NULL)
namep = shell;
namep = shellpath;
snprintf (shellnam, sizeof(shellnam),
"-%s", ++namep);
if (strcmp(namep, "sh") != 0)
shellnam[0] = '+';
if (debug) {
printf ("%s\n", shell);
printf ("%s\n", shellpath);
fflush (stdout);
}
if (argc > 1) {
execl(shell,shellnam,"-c",altarg,(char *)0);
execl(shellpath,shellnam,"-c",altarg,(char *)0);
}
else {
execl(shell,shellnam,(char *)0);
execl(shellpath,shellnam,(char *)0);
}
warn("%s", shell);
warn("%s", shellpath);
code = -1;
exit(1);
}
if (pid > 0)
while (waitpid(-1, &status, 0) != pid)
while (waitpid(-1, &waitstatus, 0) != pid)
;
signal(SIGINT, old1);
signal(SIGQUIT, old2);
@ -1289,7 +1291,7 @@ shell(int argc, char **argv)
void
user(int argc, char **argv)
{
char acct[80];
char acctstr[80];
int n, aflag = 0;
char tmp[256];
@ -1303,7 +1305,7 @@ user(int argc, char **argv)
n = command("USER %s", argv[1]);
if (n == CONTINUE) {
if (argc < 3 ) {
des_read_pw_string (tmp,
UI_UTIL_read_pw_string (tmp,
sizeof(tmp),
"Password: ", 0);
argv[2] = tmp;
@ -1314,9 +1316,9 @@ user(int argc, char **argv)
if (n == CONTINUE) {
if (argc < 4) {
printf("Account: "); fflush(stdout);
fgets(acct, sizeof(acct) - 1, stdin);
acct[strlen(acct) - 1] = '\0';
argv[3] = acct; argc++;
fgets(acctstr, sizeof(acctstr) - 1, stdin);
acctstr[strcspn(acctstr, "\r\n")] = '\0';
argv[3] = acctstr; argc++;
}
n = command("ACCT %s", argv[3]);
aflag++;
@ -1532,15 +1534,15 @@ disconnect(int argc, char **argv)
int
confirm(char *cmd, char *file)
{
char line[BUFSIZ];
char buf[BUFSIZ];
if (!interactive)
return (1);
printf("%s %s? ", cmd, file);
fflush(stdout);
if (fgets(line, sizeof line, stdin) == NULL)
if (fgets(buf, sizeof buf, stdin) == NULL)
return (0);
return (*line == 'y' || *line == 'Y');
return (*buf == 'y' || *buf == 'Y');
}
void
@ -1581,22 +1583,22 @@ globulize(char **cpp)
void
account(int argc, char **argv)
{
char acct[50];
char acctstr[50];
if (argc > 1) {
++argv;
--argc;
strlcpy (acct, *argv, sizeof(acct));
strlcpy (acctstr, *argv, sizeof(acctstr));
while (argc > 1) {
--argc;
++argv;
strlcat(acct, *argv, sizeof(acct));
strlcat(acctstr, *argv, sizeof(acctstr));
}
}
else {
des_read_pw_string(acct, sizeof(acct), "Account:", 0);
UI_UTIL_read_pw_string(acctstr, sizeof(acctstr), "Account:", 0);
}
command("ACCT %s", acct);
command("ACCT %s", acctstr);
}
jmp_buf abortprox;
@ -2125,3 +2127,17 @@ newer(int argc, char **argv)
printf("Local file \"%s\" is newer than remote file \"%s\"\n",
argv[2], argv[1]);
}
void
klist(int argc, char **argv)
{
int ret;
if(argc != 1){
printf("usage: %s\n", argv[0]);
code = -1;
return;
}
ret = command("SITE KLIST");
code = (ret == COMPLETE);
}

View File

@ -105,11 +105,18 @@ char userhelp[] = "send new user information";
char verbosehelp[] = "toggle verbose mode";
char prothelp[] = "set protection level";
char prothelp_c[] = "set command protection level";
#ifdef KRB4
char kauthhelp[] = "get remote tokens";
#endif
#if defined(KRB4) || defined(KRB5)
char klisthelp[] = "show remote tickets";
#endif
#ifdef KRB4
char kdestroyhelp[] = "destroy remote tickets";
char krbtkfilehelp[] = "set filename of remote tickets";
#endif
#if defined(KRB4) || defined(KRB5)
char afsloghelp[] = "obtain remote AFS tokens";
#endif
@ -187,12 +194,20 @@ struct cmd cmdtab[] = {
{ "verbose", verbosehelp, 0, 0, 0, setverbose },
{ "?", helphelp, 0, 0, 1, help },
{ "prot", prothelp, 0, 1, 0, sec_prot },
{ "protect", prothelp, 0, 1, 0, sec_prot },
/* what MIT uses */
{ "cprotect", prothelp_c, 0, 1, 1, sec_prot_command },
#ifdef KRB4
{ "kauth", kauthhelp, 0, 1, 0, kauth },
#endif
#if defined(KRB4) || defined(KRB5)
{ "klist", klisthelp, 0, 1, 0, klist },
#endif
#ifdef KRB4
{ "kdestroy", kdestroyhelp, 0, 1, 0, kdestroy },
{ "krbtkfile", krbtkfilehelp, 0, 1, 0, krbtkfile },
#endif
#if defined(KRB4) || defined(KRB5)
{ "afslog", afsloghelp, 0, 1, 0, afslog },
#endif

View File

@ -32,7 +32,7 @@
*/
#include "ftp_locl.h"
RCSID("$Id: domacro.c,v 1.7 1999/09/16 20:37:29 assar Exp $");
RCSID("$Id: domacro.c 14951 2005-04-25 13:09:26Z lha $");
void
domacro(int argc, char **argv)
@ -60,24 +60,29 @@ domacro(int argc, char **argv)
TOP:
cp1 = macros[i].mac_start;
while (cp1 != macros[i].mac_end) {
while (isspace(*cp1)) {
while (isspace((unsigned char)*cp1)) {
cp1++;
}
cp2 = line;
while (*cp1 != '\0') {
size_t len;
switch(*cp1) {
case '\\':
*cp2++ = *++cp1;
if (line + sizeof(line) - 2 < cp2)
goto out;
*cp2++ = *++cp1;
break;
case '$':
if (isdigit(*(cp1+1))) {
if (isdigit((unsigned char)*(cp1+1))) {
j = 0;
while (isdigit(*++cp1)) {
while (isdigit((unsigned char)*++cp1)) {
j = 10*j + *cp1 - '0';
}
cp1--;
if (argc - 2 >= j) {
strcpy(cp2, argv[j+1]);
len = sizeof(line) - (cp2 - line) - 1;
if (strlcpy(cp2, argv[j+1], len) >= len)
goto out;
cp2 += strlen(argv[j+1]);
}
break;
@ -86,13 +91,17 @@ domacro(int argc, char **argv)
loopflg = 1;
cp1++;
if (count < argc) {
strcpy(cp2, argv[count]);
len = sizeof(line) - (cp2 - line) - 1;
if (strlcpy(cp2, argv[count], len) >= len)
goto out;
cp2 += strlen(argv[count]);
}
break;
}
/* intentional drop through */
default:
if (line + sizeof(line) - 2 < cp2)
goto out;
*cp2++ = *cp1;
break;
}
@ -100,6 +109,7 @@ domacro(int argc, char **argv)
cp1++;
}
}
out:
*cp2 = '\0';
makeargv();
c = getcmd(margv[0]);
@ -123,7 +133,7 @@ domacro(int argc, char **argv)
if (bell && c->c_bell) {
putchar('\007');
}
strcpy(line, line2);
strlcpy(line, line2, sizeof(line));
makeargv();
argc = margc;
argv = margv;

View File

@ -33,7 +33,7 @@
* @(#)extern.h 8.3 (Berkeley) 10/9/94
*/
/* $Id: extern.h,v 1.19 2000/09/19 13:15:12 assar Exp $ */
/* $Id: extern.h 9075 2000-09-19 13:15:12Z assar $ */
#include <setjmp.h>
#include <stdlib.h>

View File

@ -33,7 +33,7 @@
.\"
.\" @(#)ftp.1 8.3 (Berkeley) 10/9/94
.\"
.Dd April 27, 1996
.Dd March 23, 2006
.Dt FTP 1
.Os BSD 4.2
.Sh NAME
@ -43,30 +43,35 @@
file transfer program
.Sh SYNOPSIS
.Nm ftp
.Op Fl K
.Op Fl d
.Op Fl g
.Op Fl i
.Op Fl l
.Op Fl n
.Op Fl p
.Op Fl t
.Op Fl v
.Op Fl d
.Op Fl i
.Op Fl n
.Op Fl g
.Op Fl p
.Op Fl l
.Op Fl x
.Op Fl -no-gss-bindings
.Op Fl -no-gss-delegate
.Op Ar host
.Sh DESCRIPTION
.Nm Ftp
.Nm
is the user interface to the
.Tn ARPANET
standard File Transfer Protocol.
The program allows a user to transfer files to and from a
remote network site.
.Pp
Modifications has been made so that it almost follows the ftpsec
Internet draft.
Modifications have been made so that it almost follows the FTP
Security Extensions, RFC 2228.
.Pp
Options may be specified at the command line, or to the
command interpreter.
.Bl -tag -width flag
.It Fl K
Disable Kerberos authentication.
.It Fl t
Enables packet tracing.
.It Fl v
@ -98,10 +103,15 @@ Turn on passive mode.
Enables debugging.
.It Fl g
Disables file name globbing.
.It Fl -no-gss-bindings
use GSS-API bindings when talking to peer (ie make sure IP addresses match).
.It Fl -no-gss-bindings
Don't use GSS-API bindings when talking to peer. IP addresses will not
be checked to ensure they match.
.It Fl -no-gss-delegate
Disable delegation of GSSAPI credentials.
.It Fl l
Disables command line editing.
.It Fl x
Encrypt command and data channel.
.El
.Pp
The client host with which

View File

@ -32,7 +32,7 @@
*/
#include "ftp_locl.h"
RCSID ("$Id: ftp.c,v 1.75.2.1 2004/08/20 14:59:06 lha Exp $");
RCSID ("$Id: ftp.c 16650 2006-01-24 08:16:08Z lha $");
struct sockaddr_storage hisctladdr_ss;
struct sockaddr *hisctladdr = (struct sockaddr *)&hisctladdr_ss;
@ -79,6 +79,7 @@ hookup (const char *host, int port)
strlcpy (hostnamebuf, host, sizeof(hostnamebuf));
hostname = hostnamebuf;
s = -1;
for (a = ai; a != NULL; a = a->ai_next) {
s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
if (s < 0)
@ -100,12 +101,13 @@ hookup (const char *host, int port)
warn ("connect %s", addrstr);
close (s);
s = -1;
continue;
}
break;
}
freeaddrinfo (ai);
if (error < 0) {
if (s < 0) {
warnx ("failed to contact %s", host);
code = -1;
return NULL;
@ -164,7 +166,7 @@ login (char *host)
{
char tmp[80];
char defaultpass[128];
char *user, *pass, *acct;
char *userstr, *pass, *acctstr;
int n, aflag = 0;
char *myname = NULL;
@ -173,7 +175,7 @@ login (char *host)
if (pw != NULL)
myname = pw->pw_name;
user = pass = acct = 0;
userstr = pass = acctstr = 0;
if(sec_login(host))
printf("\n*** Using plaintext user and password ***\n\n");
@ -181,11 +183,11 @@ login (char *host)
printf("Authentication successful.\n\n");
}
if (ruserpass (host, &user, &pass, &acct) < 0) {
if (ruserpass (host, &userstr, &pass, &acctstr) < 0) {
code = -1;
return (0);
}
while (user == NULL) {
while (userstr == NULL) {
if (myname)
printf ("Name (%s:%s): ", host, myname);
else
@ -194,19 +196,19 @@ login (char *host)
if (fgets (tmp, sizeof (tmp) - 1, stdin) != NULL)
tmp[strlen (tmp) - 1] = '\0';
if (*tmp == '\0')
user = myname;
userstr = myname;
else
user = tmp;
userstr = tmp;
}
strlcpy(username, user, sizeof(username));
n = command("USER %s", user);
strlcpy(username, userstr, sizeof(username));
n = command("USER %s", userstr);
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(userstr, "ftp") || !strcmp(userstr, "anonymous"))) {
snprintf(defaultpass, sizeof(defaultpass),
"%s@%s", myname, mydomain);
snprintf(prompt, sizeof(prompt),
@ -219,7 +221,7 @@ login (char *host)
}
if (pass == NULL) {
pass = defaultpass;
des_read_pw_string (tmp, sizeof (tmp), prompt, 0);
UI_UTIL_read_pw_string (tmp, sizeof (tmp), prompt, 0);
if (tmp[0])
pass = tmp;
}
@ -228,16 +230,16 @@ login (char *host)
}
if (n == CONTINUE) {
aflag++;
acct = tmp;
des_read_pw_string (acct, 128, "Account:", 0);
n = command ("ACCT %s", acct);
acctstr = tmp;
UI_UTIL_read_pw_string (acctstr, 128, "Account:", 0);
n = command ("ACCT %s", acctstr);
}
if (n != COMPLETE) {
warnx ("Login failed.");
return (0);
}
if (!aflag && acct != NULL)
command ("ACCT %s", acct);
if (!aflag && acctstr != NULL)
command ("ACCT %s", acctstr);
if (proxy)
return (1);
for (n = 0; n < macnum; ++n) {
@ -351,7 +353,7 @@ getreply (int expecteof)
continue;
case '\n':
*p++ = '\0';
if(isdigit(buf[0])){
if(isdigit((unsigned char)buf[0])){
sscanf(buf, "%d", &code);
if(code == 631){
code = 0;
@ -390,15 +392,15 @@ getreply (int expecteof)
osa.sa_handler (SIGINT);
#endif
if (code == 227 || code == 229) {
char *p;
char *q;
p = strchr (reply_string, '(');
if (p) {
p++;
strlcpy(pasv, p, sizeof(pasv));
p = strrchr(pasv, ')');
if (p)
*p = '\0';
q = strchr (reply_string, '(');
if (q) {
q++;
strlcpy(pasv, q, sizeof(pasv));
q = strrchr(pasv, ')');
if (q)
*q = '\0';
}
}
return code / 100;
@ -727,6 +729,8 @@ sendrequest (char *cmd, char *local, char *remote, char *lmode, int printnames)
case TYPE_L:
rc = lseek (fileno (fin), restart_point, SEEK_SET);
break;
default:
abort();
}
if (rc < 0) {
warn ("local: %s", local);
@ -859,7 +863,7 @@ void
recvrequest (char *cmd, char *local, char *remote,
char *lmode, int printnames, int local_given)
{
FILE *fout, *din = 0;
FILE *fout = NULL, *din = NULL;
int (*closefunc) (FILE *);
sighand oldintr, oldintp;
int c, d, is_retr, tcrflag, bare_lfs = 0;
@ -1166,7 +1170,7 @@ parse_epsv (const char *str)
}
static int
parse_pasv (struct sockaddr_in *sin, const char *str)
parse_pasv (struct sockaddr_in *sin4, const char *str)
{
int a0, a1, a2, a3, p0, p1;
@ -1192,11 +1196,11 @@ parse_pasv (struct sockaddr_in *sin, const char *str)
printf ("Can't parse passive mode string.\n");
return -1;
}
memset (sin, 0, sizeof(*sin));
sin->sin_family = AF_INET;
sin->sin_addr.s_addr = htonl ((a0 << 24) | (a1 << 16) |
memset (sin4, 0, sizeof(*sin4));
sin4->sin_family = AF_INET;
sin4->sin_addr.s_addr = htonl ((a0 << 24) | (a1 << 16) |
(a2 << 8) | a3);
sin->sin_port = htons ((p0 << 8) | p1);
sin4->sin_port = htons ((p0 << 8) | p1);
return 0;
}
@ -1318,10 +1322,10 @@ active_mode (void)
verbose = overbose;
if (result == ERROR) {
struct sockaddr_in *sin = (struct sockaddr_in *)data_addr;
struct sockaddr_in *sin4 = (struct sockaddr_in *)data_addr;
unsigned int a = ntohl(sin->sin_addr.s_addr);
unsigned int p = ntohs(sin->sin_port);
unsigned int a = ntohl(sin4->sin_addr.s_addr);
unsigned int p = ntohs(sin4->sin_port);
if (data_addr->sa_family != AF_INET) {
warnx ("remote server doesn't support EPRT");
@ -1544,7 +1548,7 @@ abortpt (int sig)
void
proxtrans (char *cmd, char *local, char *remote)
{
sighand oldintr;
sighand oldintr = NULL;
int secndflag = 0, prox_type, nfnd;
char *cmd2;
fd_set mask;
@ -1616,7 +1620,8 @@ proxtrans (char *cmd, char *local, char *remote)
pswitch (1);
if (ptabflg)
code = -1;
signal (SIGINT, oldintr);
if (oldintr)
signal (SIGINT, oldintr);
return;
}
if (cpend)
@ -1751,8 +1756,8 @@ abort_remote (FILE * din)
errx (1, "fd too large");
FD_SET (fileno (cin), &mask);
if (din) {
if (fileno (din) >= FD_SETSIZE)
errx (1, "fd too large");
if (fileno (din) >= FD_SETSIZE)
errx (1, "fd too large");
FD_SET (fileno (din), &mask);
}
if ((nfnd = empty (&mask, 10)) <= 0) {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: ftp_locl.h,v 1.37 2002/09/10 20:03:46 joda Exp $ */
/* $Id: ftp_locl.h 11444 2002-09-10 20:03:49Z joda $ */
#ifndef __FTP_LOCL_H__
#define __FTP_LOCL_H__

View File

@ -57,6 +57,7 @@ extern int debug; /* debugging level */
extern int bell; /* ring bell on cmd completion */
extern int doglob; /* glob local file names */
extern int autologin; /* establish user account on connection */
extern int doencrypt;
extern int proxy; /* proxy server connection active */
extern int proxflag; /* proxy connection exists */
extern int sunique; /* store files on server with unique name */

View File

@ -1,5 +1,5 @@
#include "ftp_locl.h"
RCSID("$Id: globals.c,v 1.8 2000/11/15 22:56:08 assar Exp $");
RCSID("$Id: globals.c 16160 2005-10-12 09:42:47Z joda $");
/*
* Options and other state info.
@ -15,6 +15,7 @@ int lineedit; /* use line-editing */
int debug; /* debugging level */
int bell; /* ring bell on cmd completion */
int doglob; /* glob local file names */
int doencrypt; /* try to use encryption */
int autologin; /* establish user account on connection */
int proxy; /* proxy server connection active */
int proxflag; /* proxy connection exists */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998 - 2003 Kungliga Tekniska Högskolan
* Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -39,14 +39,16 @@
#include <gssapi.h>
#include <krb5_err.h>
RCSID("$Id: gssapi.c,v 1.22.2.2 2003/08/20 16:41:24 lha Exp $");
RCSID("$Id: gssapi.c 21513 2007-07-12 12:45:25Z lha $");
int ftp_do_gss_bindings = 0;
int ftp_do_gss_delegate = 1;
struct gss_data {
gss_ctx_id_t context_hdl;
char *client_name;
gss_cred_id_t delegated_cred_handle;
void *mech_data;
};
static int
@ -54,7 +56,7 @@ gss_init(void *app_data)
{
struct gss_data *d = app_data;
d->context_hdl = GSS_C_NO_CONTEXT;
d->delegated_cred_handle = NULL;
d->delegated_cred_handle = GSS_C_NO_CREDENTIAL;
#if defined(FTP_SERVER)
return 0;
#else
@ -62,7 +64,7 @@ gss_init(void *app_data)
#ifdef KRB5
return !use_kerberos;
#else
return 0
return 0;
#endif /* KRB5 */
#endif /* FTP_SERVER */
}
@ -130,7 +132,7 @@ gss_encode(void *app_data, void *from, int length, int level, void **to)
}
static void
sockaddr_to_gss_address (const struct sockaddr *sa,
sockaddr_to_gss_address (struct sockaddr *sa,
OM_uint32 *addr_type,
gss_buffer_desc *gss_addr)
{
@ -146,10 +148,10 @@ sockaddr_to_gss_address (const struct sockaddr *sa,
}
#endif
case AF_INET : {
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
struct sockaddr_in *sin4 = (struct sockaddr_in *)sa;
gss_addr->length = 4;
gss_addr->value = &sin->sin_addr;
gss_addr->value = &sin4->sin_addr;
*addr_type = GSS_C_AF_INET;
break;
}
@ -193,15 +195,6 @@ 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,
GSS_C_NO_CREDENTIAL,
@ -222,6 +215,7 @@ gss_adat(void *app_data, void *buf, size_t len)
reply(535, "Out of memory base64-encoding.");
return -1;
}
gss_release_buffer(&min_stat, &output_token);
}
if(maj_stat == GSS_S_COMPLETE){
char *name;
@ -277,11 +271,14 @@ gss_adat(void *app_data, void *buf, size_t len)
reply(431, "Security resource unavailable");
}
out:
if (client_name)
gss_release_name(&min_stat, &client_name);
free(p);
return 0;
}
int gss_userok(void*, char*);
int gss_session(void*, char*);
struct sec_server_mech gss_server_mech = {
"GSSAPI",
@ -297,7 +294,8 @@ struct sec_server_mech gss_server_mech = {
gss_adat,
NULL, /* pbsz */
NULL, /* ccc */
gss_userok
gss_userok,
gss_session
};
#else /* FTP_SERVER */
@ -309,12 +307,14 @@ import_name(const char *kname, const char *host, gss_name_t *target_name)
{
OM_uint32 maj_stat, min_stat;
gss_buffer_desc name;
char *str;
name.length = asprintf((char**)&name.value, "%s@%s", kname, host);
if (name.value == NULL) {
name.length = asprintf(&str, "%s@%s", kname, host);
if (str == NULL) {
printf("Out of memory\n");
return AUTH_ERROR;
}
name.value = str;
maj_stat = gss_import_name(&min_stat,
&name,
@ -334,6 +334,7 @@ import_name(const char *kname, const char *host, gss_name_t *target_name)
printf("Error importing name %s: %s\n",
(char *)name.value,
(char *)status_string.value);
free(name.value);
gss_release_buffer(&new_stat, &status_string);
return AUTH_ERROR;
}
@ -353,6 +354,7 @@ gss_auth(void *app_data, char *host)
int n;
gss_channel_bindings_t bindings;
struct gss_data *d = app_data;
OM_uint32 mech_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG;
const char *knames[] = { "ftp", "host", NULL }, **kname = knames;
@ -380,14 +382,16 @@ gss_auth(void *app_data, char *host)
} else
bindings = GSS_C_NO_CHANNEL_BINDINGS;
if (ftp_do_gss_delegate)
mech_flags |= GSS_C_DELEG_FLAG;
while(!context_established) {
maj_stat = gss_init_sec_context(&min_stat,
GSS_C_NO_CREDENTIAL,
&d->context_hdl,
target_name,
GSS_C_NO_OID,
GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG
| GSS_C_DELEG_FLAG,
mech_flags,
0,
bindings,
&input,
@ -400,7 +404,12 @@ gss_auth(void *app_data, char *host)
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
if(min_stat == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN && *kname != NULL) {
d->context_hdl = GSS_C_NO_CONTEXT;
gss_release_name(&min_stat, &target_name);
if(*kname != NULL) {
if(import_name(*kname++, host, &target_name)) {
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
@ -466,6 +475,8 @@ gss_auth(void *app_data, char *host)
}
}
gss_release_name(&min_stat, &target_name);
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
if (input.value)

View File

@ -32,8 +32,10 @@
*/
#include "ftp_locl.h"
RCSID("$Id: kauth.c 15666 2005-07-19 17:08:11Z lha $");
#ifdef KRB4
#include <krb.h>
RCSID("$Id: kauth.c,v 1.20 1999/12/02 16:58:29 joda Exp $");
void
kauth(int argc, char **argv)
@ -141,20 +143,6 @@ kauth(int argc, char **argv)
code = 0;
}
void
klist(int argc, char **argv)
{
int ret;
if(argc != 1){
printf("usage: %s\n", argv[0]);
code = -1;
return;
}
ret = command("SITE KLIST");
code = (ret == COMPLETE);
}
void
kdestroy(int argc, char **argv)
{
@ -180,6 +168,9 @@ krbtkfile(int argc, char **argv)
ret = command("SITE KRBTKFILE %s", argv[1]);
code = (ret == COMPLETE);
}
#endif
#if defined(KRB4) || defined(KRB5)
void
afslog(int argc, char **argv)
@ -196,3 +187,7 @@ afslog(int argc, char **argv)
ret = command("SITE AFSLOG");
code = (ret == COMPLETE);
}
#else
int ftp_afslog_placeholder;
#endif

View File

@ -38,7 +38,7 @@
#endif
#include <krb.h>
RCSID("$Id: krb4.c,v 1.38 2000/06/21 02:46:09 assar Exp $");
RCSID("$Id: krb4.c 17450 2006-05-05 11:11:43Z lha $");
#ifdef FTP_SERVER
#define LOCAL_ADDR ctrl_addr
@ -121,7 +121,7 @@ krb4_adat(void *app_data, void *buf, size_t len)
AUTH_DAT auth_dat;
char *p;
int kerror;
u_int32_t cs;
uint32_t cs;
char msg[35]; /* size of encrypted block */
int tmp_len;
struct krb4_data *d = app_data;
@ -240,7 +240,7 @@ krb4_auth(void *app_data, char *host)
KTEXT_ST adat;
MSG_DAT msg_data;
int checksum;
u_int32_t cs;
uint32_t cs;
struct krb4_data *d = app_data;
struct sockaddr_in *localaddr = (struct sockaddr_in *)LOCAL_ADDR;
struct sockaddr_in *remoteaddr = (struct sockaddr_in *)REMOTE_ADDR;

View File

@ -38,7 +38,7 @@
#include "ftp_locl.h"
#include <getarg.h>
RCSID("$Id: main.c,v 1.33.2.1 2003/08/20 16:43:14 lha Exp $");
RCSID("$Id: main.c 16160 2005-10-12 09:42:47Z joda $");
static int help_flag;
static int version_flag;
@ -61,12 +61,16 @@ struct getargs getargs[] = {
"Packet tracing", NULL},
#ifdef KRB5
{ "gss-bindings", 0, arg_negative_flag, &ftp_do_gss_bindings,
"Use GSS-API bindings", NULL},
"Don't use GSS-API bindings", NULL},
{ "gss-delegate", 0, arg_negative_flag, &ftp_do_gss_delegate,
"Disable delegation of GSS-API credentials", NULL},
#endif
{ NULL, 'v', arg_counter, &verbose,
"verbosity", NULL},
{ NULL, 'K', arg_negative_flag, &use_kerberos,
"Disable kerberos authentication", NULL},
{ "encrypt", 'x', arg_flag, &doencrypt,
"Encrypt command and data channel if possible" },
{ "version", 0, arg_flag, &version_flag },
{ "help", 'h', arg_flag, &help_flag },
};

View File

@ -32,7 +32,7 @@
*/
#include "ftp_locl.h"
RCSID("$Id: ruserpass.c,v 1.19 2000/01/08 07:45:11 assar Exp $");
RCSID("$Id: ruserpass.c 16161 2005-10-12 09:44:24Z joda $");
static int token (void);
static FILE *cfile;
@ -69,39 +69,39 @@ static struct toktab {
*/
static char *
guess_domain (char *hostname, size_t sz)
guess_domain (char *hostname_str, size_t sz)
{
struct addrinfo *ai, *a;
struct addrinfo hints;
int error;
char *dot;
if (gethostname (hostname, sz) < 0) {
strlcpy (hostname, "", sz);
if (gethostname (hostname_str, sz) < 0) {
strlcpy (hostname_str, "", sz);
return "";
}
dot = strchr (hostname, '.');
dot = strchr (hostname_str, '.');
if (dot != NULL)
return dot + 1;
memset (&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
error = getaddrinfo (hostname, NULL, &hints, &ai);
error = getaddrinfo (hostname_str, NULL, &hints, &ai);
if (error)
return hostname;
return hostname_str;
for (a = ai; a != NULL; a = a->ai_next)
if (a->ai_canonname != NULL) {
strlcpy (hostname, ai->ai_canonname, sz);
strlcpy (hostname_str, ai->ai_canonname, sz);
break;
}
freeaddrinfo (ai);
dot = strchr (hostname, '.');
dot = strchr (hostname_str, '.');
if (dot != NULL)
return dot + 1;
else
return hostname;
return hostname_str;
}
int
@ -256,7 +256,7 @@ ruserpass(char *host, char **aname, char **apass, char **aacct)
break;
case PROT:
token();
if(sec_request_prot(tokval) < 0)
if(doencrypt == 0 && sec_request_prot(tokval) < 0)
warnx("Unknown protection level \"%s\"", tokval);
break;
default:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2002 Kungliga Tekniska Högskolan
* Copyright (c) 1998-2002, 2005 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.19 2002/09/04 22:01:28 joda Exp $");
RCSID("$Id: security.c 21225 2007-06-20 10:16:02Z lha $");
static enum protection_level command_prot;
static enum protection_level data_prot;
@ -189,16 +189,16 @@ sec_get_data(int fd, struct buffer *buf, int level)
}
static size_t
buffer_read(struct buffer *buf, void *data, size_t len)
buffer_read(struct buffer *buf, void *dataptr, size_t len)
{
len = min(len, buf->size - buf->index);
memcpy(data, (char*)buf->data + buf->index, len);
memcpy(dataptr, (char*)buf->data + buf->index, len);
buf->index += len;
return len;
}
static size_t
buffer_write(struct buffer *buf, void *data, size_t len)
buffer_write(struct buffer *buf, void *dataptr, size_t len)
{
if(buf->index + len > buf->size) {
void *tmp;
@ -211,29 +211,29 @@ buffer_write(struct buffer *buf, void *data, size_t len)
buf->data = tmp;
buf->size = buf->index + len;
}
memcpy((char*)buf->data + buf->index, data, len);
memcpy((char*)buf->data + buf->index, dataptr, len);
buf->index += len;
return len;
}
int
sec_read(int fd, void *data, int length)
sec_read(int fd, void *dataptr, int length)
{
size_t len;
int rx = 0;
if(sec_complete == 0 || data_prot == 0)
return read(fd, data, length);
return read(fd, dataptr, length);
if(in_buffer.eof_flag){
in_buffer.eof_flag = 0;
return 0;
}
len = buffer_read(&in_buffer, data, length);
len = buffer_read(&in_buffer, dataptr, length);
length -= len;
rx += len;
data = (char*)data + len;
dataptr = (char*)dataptr + len;
while(length){
int ret;
@ -246,10 +246,10 @@ sec_read(int fd, void *data, int length)
in_buffer.eof_flag = 1;
return rx;
}
len = buffer_read(&in_buffer, data, length);
len = buffer_read(&in_buffer, dataptr, length);
length -= len;
rx += len;
data = (char*)data + len;
dataptr = (char*)dataptr + len;
}
return rx;
}
@ -282,21 +282,21 @@ sec_fflush(FILE *F)
}
int
sec_write(int fd, char *data, int length)
sec_write(int fd, char *dataptr, int length)
{
int len = buffer_size;
int tx = 0;
if(data_prot == prot_clear)
return write(fd, data, length);
return write(fd, dataptr, length);
len -= (*mech->overhead)(app_data, data_prot, len);
while(length){
if(length < len)
len = length;
sec_send(fd, data, len);
sec_send(fd, dataptr, len);
length -= len;
data += len;
dataptr += len;
tx += len;
}
return tx;
@ -310,8 +310,11 @@ sec_vfprintf2(FILE *f, const char *fmt, va_list ap)
if(data_prot == prot_clear)
return vfprintf(f, fmt, ap);
else {
vasprintf(&buf, fmt, ap);
ret = buffer_write(&out_buffer, buf, strlen(buf));
int len;
len = vasprintf(&buf, fmt, ap);
if (len == -1)
return len;
ret = buffer_write(&out_buffer, buf, len);
free(buf);
return ret;
}
@ -348,7 +351,7 @@ sec_read_msg(char *s, int level)
{
int len;
char *buf;
int code;
int return_code;
buf = malloc(strlen(s));
len = base64_decode(s + 4, buf); /* XXX */
@ -360,14 +363,14 @@ sec_read_msg(char *s, int level)
buf[len] = '\0';
if(buf[3] == '-')
code = 0;
return_code = 0;
else
sscanf(buf, "%d", &code);
sscanf(buf, "%d", &return_code);
if(buf[len-1] == '\n')
buf[len-1] = '\0';
strcpy(s, buf);
free(buf);
return code;
return return_code;
}
int
@ -379,7 +382,10 @@ sec_vfprintf(FILE *f, const char *fmt, va_list ap)
if(!sec_complete)
return vfprintf(f, fmt, ap);
vasprintf(&buf, fmt, ap);
if (vasprintf(&buf, fmt, ap) == -1) {
printf("Failed to allocate command.\n");
return -1;
}
len = (*mech->encode)(app_data, buf, strlen(buf), command_prot, &enc);
free(buf);
if(len < 0) {
@ -426,6 +432,8 @@ sec_fprintf(FILE *f, const char *fmt, ...)
#ifdef FTP_SERVER
int ccc_passed;
void
auth(char *auth_name)
{
@ -529,9 +537,10 @@ prot(char *pl)
void ccc(void)
{
if(sec_complete){
if(mech->ccc && (*mech->ccc)(app_data) == 0)
if(mech->ccc && (*mech->ccc)(app_data) == 0) {
command_prot = data_prot = prot_clear;
else
ccc_passed = 1;
} else
reply(534, "You must be joking.");
}else
reply(503, "Incomplete security data exchange.");
@ -540,13 +549,13 @@ void ccc(void)
void mec(char *msg, enum protection_level level)
{
void *buf;
size_t len;
size_t len, buf_size;
if(!sec_complete) {
reply(503, "Incomplete security data exchange.");
return;
}
buf = malloc(strlen(msg) + 2); /* XXX go figure out where that 2
comes from :-) */
buf_size = strlen(msg) + 2;
buf = malloc(buf_size);
len = base64_decode(msg, buf);
command_prot = level;
if(len == (size_t)-1) {
@ -560,17 +569,25 @@ void mec(char *msg, enum protection_level level)
}
((char*)buf)[len] = '\0';
if(strstr((char*)buf, "\r\n") == NULL)
strcat((char*)buf, "\r\n");
strlcat((char*)buf, "\r\n", buf_size);
new_ftp_command(buf);
}
/* ------------------------------------------------------------ */
int
sec_userok(char *user)
sec_userok(char *userstr)
{
if(sec_complete)
return (*mech->userok)(app_data, user);
return (*mech->userok)(app_data, userstr);
return 0;
}
int
sec_session(char *user)
{
if(sec_complete && mech->session)
return (*mech->session)(app_data, user);
return 0;
}
@ -660,7 +677,15 @@ sec_prot_internal(int level)
enum protection_level
set_command_prot(enum protection_level level)
{
int ret;
enum protection_level old = command_prot;
if(level != command_prot && level == prot_clear) {
ret = command("CCC");
if(ret != COMPLETE) {
printf("Failed to clear command channel.\n");
return -1;
}
}
command_prot = level;
return old;
}
@ -670,8 +695,13 @@ sec_prot(int argc, char **argv)
{
int level = -1;
if(argc < 2 || argc > 3)
if(argc > 3)
goto usage;
if(argc == 1) {
sec_status();
return;
}
if(!sec_complete) {
printf("No security data exchange has taken place.\n");
code = -1;
@ -694,9 +724,12 @@ sec_prot(int argc, char **argv)
code = -1;
return;
}
} else if(strncasecmp(argv[1], "command", strlen(argv[1])) == 0)
set_command_prot(level);
else
} else if(strncasecmp(argv[1], "command", strlen(argv[1])) == 0) {
if(set_command_prot(level) < 0) {
code = -1;
return;
}
} else
goto usage;
code = 0;
return;
@ -706,6 +739,46 @@ sec_prot(int argc, char **argv)
code = -1;
}
void
sec_prot_command(int argc, char **argv)
{
int level;
if(argc > 2)
goto usage;
if(!sec_complete) {
printf("No security data exchange has taken place.\n");
code = -1;
return;
}
if(argc == 1) {
sec_status();
} else {
level = name_to_level(argv[1]);
if(level == -1)
goto usage;
if((*mech->check_prot)(app_data, level)) {
printf("%s does not implement %s protection.\n",
mech->name, level_to_name(level));
code = -1;
return;
}
if(set_command_prot(level) < 0) {
code = -1;
return;
}
}
code = 0;
return;
usage:
printf("usage: %s [clear|safe|confidential|private]\n",
argv[0]);
code = -1;
}
static enum protection_level request_data_prot;
void
@ -741,7 +814,7 @@ sec_login(char *host)
tmp = realloc(app_data, (*m)->size);
if (tmp == NULL) {
warnx ("realloc %u failed", (*m)->size);
warnx ("realloc %lu failed", (unsigned long)(*m)->size);
return -1;
}
app_data = tmp;
@ -777,7 +850,12 @@ sec_login(char *host)
}
mech = *m;
sec_complete = 1;
command_prot = prot_safe;
if(doencrypt) {
command_prot = prot_private;
request_data_prot = prot_private;
} else {
command_prot = prot_safe;
}
break;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
* Copyright (c) 1998 - 2005 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: security.h,v 1.9.12.1 2003/08/20 16:41:53 lha Exp $ */
/* $Id: security.h 21224 2007-06-20 10:15:13Z lha $ */
#ifndef __security_h__
#define __security_h__
@ -70,6 +70,7 @@ struct sec_server_mech {
size_t (*pbsz)(void *, size_t);
int (*ccc)(void*);
int (*userok)(void*, char*);
int (*session)(void*, char*);
};
#define AUTH_OK 0
@ -77,6 +78,7 @@ struct sec_server_mech {
#define AUTH_ERROR 2
extern int ftp_do_gss_bindings;
extern int ftp_do_gss_delegate;
#ifdef FTP_SERVER
extern struct sec_server_mech krb4_server_mech, gss_server_mech;
#else
@ -119,12 +121,14 @@ void prot (char *);
void delete_ftp_command (void);
void new_ftp_command (char *);
int sec_userok (char *);
int sec_session(char *);
int secure_command (void);
enum protection_level get_command_prot(void);
#else
void sec_end (void);
int sec_login (char *);
void sec_prot (int, char **);
void sec_prot_command (int, char **);
int sec_request_prot (char *);
void sec_set_protection_level (void);
void sec_status (void);

View File

@ -1,15 +1,15 @@
# $Id: Makefile.am,v 1.26 2001/09/06 12:18:34 assar Exp $
# $Id: Makefile.am 21031 2007-06-09 05:00:27Z lha $
include $(top_srcdir)/Makefile.am.common
INCLUDES += -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
AM_CPPFLAGS += -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
libexec_PROGRAMS = ftpd
CHECK_LOCAL =
if KRB4
krb4_sources = krb4.c kauth.c
krb4_sources = krb4.c
endif
if KRB5
krb5_sources = gssapi.c gss_userok.c
@ -25,6 +25,8 @@ ftpd_SOURCES = \
pathnames.h \
popen.c \
security.c \
kauth.c \
klist.c \
$(krb4_sources) \
$(krb5_sources)
@ -41,7 +43,7 @@ krb4.c:
gssapi.c:
@test -f gssapi.c || $(LN_S) $(srcdir)/../ftp/gssapi.c .
CLEANFILES = security.c security.h krb4.c gssapi.c ftpcmd.c
CLEANFILES = security.c security.h krb4.c gssapi.c
man_MANS = ftpd.8 ftpusers.5
@ -51,5 +53,7 @@ LDADD = ../common/libcommon.a \
$(LIB_krb5) \
$(LIB_kafs) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_hcrypto) \
$(LIB_roken)
EXTRA_DIST = $(man_MANS)

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.26 2001/09/06 12:18:34 assar Exp $
# $Id: Makefile.am 21031 2007-06-09 05:00:27Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(ftpd_SOURCES) $(EXTRA_ftpd_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,6 +36,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -50,16 +45,14 @@ libexec_PROGRAMS = ftpd$(EXEEXT)
subdir = appl/ftp/ftpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -72,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -80,56 +74,61 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man5dir)" \
"$(DESTDIR)$(man8dir)"
libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(libexec_PROGRAMS)
am__ftpd_SOURCES_DIST = extern.h ftpcmd.y ftpd.c ftpd_locl.h logwtmp.c \
ls.c pathnames.h popen.c security.c krb4.c kauth.c gssapi.c \
gss_userok.c
@KRB4_TRUE@am__objects_1 = krb4.$(OBJEXT) kauth.$(OBJEXT)
ls.c pathnames.h popen.c security.c kauth.c klist.c krb4.c \
gssapi.c gss_userok.c
@KRB4_TRUE@am__objects_1 = krb4.$(OBJEXT)
@KRB5_TRUE@am__objects_2 = gssapi.$(OBJEXT) gss_userok.$(OBJEXT)
am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) logwtmp.$(OBJEXT) \
ls.$(OBJEXT) popen.$(OBJEXT) security.$(OBJEXT) \
$(am__objects_1) $(am__objects_2)
kauth.$(OBJEXT) klist.$(OBJEXT) $(am__objects_1) \
$(am__objects_2)
ftpd_OBJECTS = $(am_ftpd_OBJECTS)
ftpd_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
@KRB5_TRUE@am__DEPENDENCIES_2 = \
@KRB5_TRUE@ $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@am__DEPENDENCIES_3 = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
am__DEPENDENCIES_4 = $(top_builddir)/lib/kafs/libkafs.la \
am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \
$(am__DEPENDENCIES_1)
ftpd_DEPENDENCIES = ../common/libcommon.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
$(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
$(LIB_gssapi) $(LIB_krb5) $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
$(AM_YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
YLWRAP = $(top_srcdir)/ylwrap
SOURCES = $(ftpd_SOURCES) $(EXTRA_ftpd_SOURCES)
DIST_SOURCES = $(am__ftpd_SOURCES_DIST) $(EXTRA_ftpd_SOURCES)
man5dir = $(mandir)/man5
@ -139,13 +138,7 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -155,8 +148,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -167,11 +158,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -179,42 +169,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -232,12 +207,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -247,15 +219,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -264,6 +235,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -275,15 +247,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -291,74 +258,80 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken) \
-I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -375,9 +348,10 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
CHECK_LOCAL =
@KRB4_TRUE@krb4_sources = krb4.c kauth.c
@KRB4_TRUE@krb4_sources = krb4.c
@KRB5_TRUE@krb5_sources = gssapi.c gss_userok.c
ftpd_SOURCES = \
extern.h \
@ -389,11 +363,13 @@ ftpd_SOURCES = \
pathnames.h \
popen.c \
security.c \
kauth.c \
klist.c \
$(krb4_sources) \
$(krb5_sources)
EXTRA_ftpd_SOURCES = krb4.c kauth.c gssapi.c gss_userok.c
CLEANFILES = security.c security.h krb4.c gssapi.c ftpcmd.c
CLEANFILES = security.c security.h krb4.c gssapi.c
man_MANS = ftpd.8 ftpusers.5
LDADD = ../common/libcommon.a \
$(LIB_otp) \
@ -401,13 +377,14 @@ LDADD = ../common/libcommon.a \
$(LIB_krb5) \
$(LIB_kafs) \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_hcrypto) \
$(LIB_roken)
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj .y
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -439,7 +416,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -467,7 +444,7 @@ clean-libexecPROGRAMS:
done
ftpd$(EXEEXT): $(ftpd_OBJECTS) $(ftpd_DEPENDENCIES)
@rm -f ftpd$(EXEEXT)
$(LINK) $(ftpd_LDFLAGS) $(ftpd_OBJECTS) $(ftpd_LDADD) $(LIBS)
$(LINK) $(ftpd_OBJECTS) $(ftpd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -485,37 +462,16 @@ distclean-compile:
$(LTCOMPILE) -c -o $@ $<
.y.c:
$(YACCCOMPILE) $<
if test -f y.tab.h; then \
to=`echo "$*_H" | sed \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
-e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \
sed "/^#/ s/Y_TAB_H/$$to/g" y.tab.h >$*.ht; \
rm -f y.tab.h; \
if cmp -s $*.ht $*.h; then \
rm -f $*.ht ;\
else \
mv $*.ht $*.h; \
fi; \
fi
if test -f y.output; then \
mv y.output $*.output; \
fi
sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@
rm -f y.tab.c
$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man5: $(man5_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -560,7 +516,7 @@ uninstall-man5:
done
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -624,9 +580,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -651,23 +609,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../../.. $(distdir)/../../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -687,7 +643,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -709,7 +665,7 @@ clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -723,7 +679,7 @@ clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -739,14 +695,22 @@ install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am: install-libexecPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man: install-man5 install-man8
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -766,23 +730,29 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS \
uninstall-man
uninstall-am: uninstall-libexecPROGRAMS uninstall-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man5 uninstall-man8
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-generic clean-libexecPROGRAMS clean-libtool ctags \
distclean distclean-compile distclean-generic \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-libexecPROGRAMS install-man \
install-man5 install-man8 install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
install-data-am install-data-hook install-dvi install-dvi-am \
install-exec install-exec-am install-exec-hook install-html \
install-html-am install-info install-info-am \
install-libexecPROGRAMS install-man install-man5 install-man8 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook \
uninstall-libexecPROGRAMS uninstall-man uninstall-man5 \
uninstall-man8
@ -799,8 +769,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -810,19 +780,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -838,7 +820,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -908,15 +890,40 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
$(ftpd_OBJECTS): security.h
security.c:

View File

@ -107,9 +107,12 @@ void klist(void);
void cond_kdestroy(void);
void kdestroy(void);
void krbtkfile(const char *tkfile);
void afslog(const char *cell);
void afslog(const char *, int);
void afsunlog(void);
extern int do_destroy_tickets;
extern char *k5ccname;
int find(char *);
int builtin_ls(FILE*, const char*);
@ -130,6 +133,7 @@ extern int logging;
extern int type;
extern off_t file_size;
extern off_t byte_count;
extern int ccc_passed;
extern int form;
extern int debug;

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@
%{
#include "ftpd_locl.h"
RCSID("$Id: ftpcmd.y,v 1.61.10.2 2004/08/20 15:15:46 lha Exp $");
RCSID("$Id: ftpcmd.y 15677 2005-07-19 18:33:08Z lha $");
off_t restart_point;
@ -137,30 +137,35 @@ cmd_list
;
cmd
: USER SP username CRLF
: USER SP username CRLF check_secure
{
if ($5)
user($3);
free($3);
free($3);
}
| PASS SP password CRLF
| PASS SP password CRLF check_secure
{
if ($5)
pass($3);
memset ($3, 0, strlen($3));
free($3);
memset ($3, 0, strlen($3));
free($3);
}
| PORT SP host_port CRLF
| PORT SP host_port CRLF check_secure
{
if ($5) {
usedefault = 0;
if (pdata >= 0) {
close(pdata);
pdata = -1;
}
reply(200, "PORT command successful.");
}
}
| EPRT SP STRING CRLF
| EPRT SP STRING CRLF check_secure
{
if ($5)
eprt ($3);
free ($3);
free ($3);
}
| PASV CRLF check_login
{
@ -178,8 +183,9 @@ cmd
epsv ($3);
free ($3);
}
| TYPE SP type_code CRLF
| TYPE SP type_code CRLF check_secure
{
if ($5) {
switch (cmd_type) {
case TYPE_A:
@ -212,9 +218,11 @@ cmd
UNIMPLEMENTED for NBBY != 8
#endif /* NBBY == 8 */
}
}
}
| STRU SP struct_code CRLF
| STRU SP struct_code CRLF check_secure
{
if ($5) {
switch ($3) {
case STRU_F:
@ -224,9 +232,11 @@ cmd
default:
reply(504, "Unimplemented STRU type.");
}
}
}
| MODE SP mode_code CRLF
| MODE SP mode_code CRLF check_secure
{
if ($5) {
switch ($3) {
case MODE_S:
@ -236,14 +246,19 @@ cmd
default:
reply(502, "Unimplemented MODE type.");
}
}
}
| ALLO SP NUMBER CRLF
| ALLO SP NUMBER CRLF check_secure
{
if ($5) {
reply(202, "ALLO command ignored.");
}
}
| ALLO SP NUMBER SP R SP NUMBER CRLF
| ALLO SP NUMBER SP R SP NUMBER CRLF check_secure
{
if ($9) {
reply(202, "ALLO command ignored.");
}
}
| RETR SP pathname CRLF check_login
{
@ -304,10 +319,11 @@ cmd
if ($3 != NULL)
free($3);
}
| sTAT CRLF
| sTAT CRLF check_secure
{
if ($3)
statcmd();
}
}
| DELE SP pathname CRLF check_login_no_guest
{
if ($5 && $3 != NULL)
@ -329,8 +345,9 @@ cmd
if ($3 != NULL)
free($3);
}
| ABOR CRLF
| ABOR CRLF check_secure
{
if ($3)
reply(225, "ABOR command successful.");
}
| CWD CRLF check_login
@ -345,12 +362,14 @@ cmd
if ($3 != NULL)
free($3);
}
| HELP CRLF
| HELP CRLF check_secure
{
if ($3)
help(cmdtab, (char *) 0);
}
| HELP SP STRING CRLF
| HELP SP STRING CRLF check_secure
{
if ($5) {
char *cp = $3;
if (strncasecmp(cp, "SITE", 4) == 0) {
@ -363,9 +382,11 @@ cmd
help(sitetab, (char *) 0);
} else
help(cmdtab, $3);
}
}
| NOOP CRLF
| NOOP CRLF check_secure
{
if ($3)
reply(200, "NOOP command successful.");
}
| MKD SP pathname CRLF check_login
@ -392,26 +413,31 @@ cmd
if ($3)
cwd("..");
}
| FEAT CRLF
| FEAT CRLF check_secure
{
if ($3) {
lreply(211, "Supported features:");
lreply(0, " MDTM");
lreply(0, " REST STREAM");
lreply(0, " SIZE");
reply(211, "End");
}
}
| OPTS SP STRING CRLF
| OPTS SP STRING CRLF check_secure
{
free ($3);
if ($5)
reply(501, "Bad options");
free ($3);
}
| SITE SP HELP CRLF
| SITE SP HELP CRLF check_secure
{
if ($5)
help(sitetab, (char *) 0);
}
| SITE SP HELP SP STRING CRLF
| SITE SP HELP SP STRING CRLF check_secure
{
if ($7)
help(sitetab, $5);
}
| SITE SP UMASK CRLF check_login
@ -449,14 +475,16 @@ cmd
if ($7 != NULL)
free($7);
}
| SITE SP IDLE CRLF
| SITE SP IDLE CRLF check_secure
{
if ($5)
reply(200,
"Current IDLE time limit is %d seconds; max %d",
ftpd_timeout, maxtimeout);
}
| SITE SP IDLE SP NUMBER CRLF
| SITE SP IDLE SP NUMBER CRLF check_secure
{
if ($7) {
if ($5 < 30 || $5 > maxtimeout) {
reply(501,
"Maximum IDLE time must be between 30 and %d seconds",
@ -468,6 +496,7 @@ cmd
"Maximum IDLE time set to %d seconds",
ftpd_timeout);
}
}
}
| SITE SP KAUTH SP STRING CRLF check_login
@ -495,12 +524,8 @@ cmd
}
| SITE SP KLIST CRLF check_login
{
#ifdef KRB4
if($5)
klist();
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP KDESTROY CRLF check_login
{
@ -526,22 +551,22 @@ cmd
}
| SITE SP AFSLOG CRLF check_login
{
#ifdef KRB4
#if defined(KRB4) || defined(KRB5)
if(guest)
reply(500, "Can't be done as guest.");
else if($5)
afslog(NULL);
afslog(NULL, 0);
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP AFSLOG SP STRING CRLF check_login
{
#ifdef KRB4
#if defined(KRB4) || defined(KRB5)
if(guest)
reply(500, "Can't be done as guest.");
else if($7)
afslog($5);
afslog($5, 0);
if($5)
free($5);
#else
@ -555,9 +580,10 @@ cmd
if($5 != NULL)
free($5);
}
| SITE SP URL CRLF
| SITE SP URL CRLF check_secure
{
reply(200, "http://www.pdc.kth.se/kth-krb/");
if ($5)
reply(200, "http://www.pdc.kth.se/heimdal/");
}
| STOU SP pathname CRLF check_login
{
@ -566,13 +592,15 @@ cmd
if ($3 != NULL)
free($3);
}
| SYST CRLF
| SYST CRLF check_secure
{
if ($3) {
#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__)
reply(215, "UNIX Type: L%d", NBBY);
reply(215, "UNIX Type: L%d", NBBY);
#else
reply(215, "UNKNOWN Type: L%d", NBBY);
reply(215, "UNKNOWN Type: L%d", NBBY);
#endif
}
}
/*
@ -627,10 +655,12 @@ cmd
if ($3 != NULL)
free($3);
}
| QUIT CRLF
| QUIT CRLF check_secure
{
if ($3) {
reply(221, "Goodbye.");
dologout(0);
}
}
| error CRLF
{
@ -648,13 +678,15 @@ rcmd
}
}
}
| REST SP byte_size CRLF
| REST SP byte_size CRLF check_secure
{
if ($5) {
fromname = (char *) 0;
restart_point = $3; /* XXX $3 is only "int" */
reply(350, "Restarting at %ld. %s",
(long)restart_point,
"Send STORE or RETRIEVE to initiate transfer.");
}
}
| AUTH SP STRING CRLF
{
@ -666,16 +698,19 @@ rcmd
adat($3);
free($3);
}
| PBSZ SP NUMBER CRLF
| PBSZ SP NUMBER CRLF check_secure
{
if ($5)
pbsz($3);
}
| PROT SP STRING CRLF
| PROT SP STRING CRLF check_secure
{
if ($5)
prot($3);
}
| CCC CRLF
| CCC CRLF check_secure
{
if ($3)
ccc();
}
| MIC SP STRING CRLF
@ -715,11 +750,11 @@ host_port
: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
NUMBER COMMA NUMBER
{
struct sockaddr_in *sin = (struct sockaddr_in *)data_dest;
struct sockaddr_in *sin4 = (struct sockaddr_in *)data_dest;
sin->sin_family = AF_INET;
sin->sin_port = htons($9 * 256 + $11);
sin->sin_addr.s_addr =
sin4->sin_family = AF_INET;
sin4->sin_port = htons($9 * 256 + $11);
sin4->sin_addr.s_addr =
htonl(($1 << 24) | ($3 << 16) | ($5 << 8) | $7);
}
;
@ -892,7 +927,7 @@ check_login : check_secure
check_secure : /* empty */
{
$$ = 1;
if(sec_complete && !secure_command()) {
if(sec_complete && !ccc_passed && !secure_command()) {
$$ = 0;
reply(533, "Command protection level denied "
"for paranoid reasons.");
@ -1352,13 +1387,13 @@ help(struct tab *ctab, char *s)
{
struct tab *c;
int width, NCMDS;
char *type;
char *t;
char buf[1024];
if (ctab == sitetab)
type = "SITE ";
t = "SITE ";
else
type = "";
t = "";
width = 0, NCMDS = 0;
for (c = ctab; c->name != NULL; c++) {
int len = strlen(c->name);
@ -1373,7 +1408,7 @@ help(struct tab *ctab, char *s)
int columns, lines;
lreply(214, "The following %scommands are recognized %s.",
type, "(* =>'s unimplemented)");
t, "(* =>'s unimplemented)");
columns = 76 / width;
if (columns == 0)
columns = 1;
@ -1409,9 +1444,9 @@ help(struct tab *ctab, char *s)
return;
}
if (c->implemented)
reply(214, "Syntax: %s%s %s", type, c->name, c->help);
reply(214, "Syntax: %s%s %s", t, c->name, c->help);
else
reply(214, "%s%-*s\t%s; unimplemented.", type, width,
reply(214, "%s%-*s\t%s; unimplemented.", t, width,
c->name, c->help);
}

View File

@ -156,8 +156,8 @@ allowed anonymous upload filename chars
.Fl -no-insecure-oob
.Xc
don't allow insecure out of band.
Heimdal ftp client before 0.7 doesn't support secure oob, so turning
on this options makes them no longer work.
Heimdal ftp clients before 0.6.3 doesn't support secure oob, so turning
on this option makes them no longer work.
.El
.Pp
The file

View File

@ -38,7 +38,7 @@
#endif
#include "getarg.h"
RCSID("$Id: ftpd.c,v 1.166.2.3 2004/08/20 15:16:37 lha Exp $");
RCSID("$Id: ftpd.c 21222 2007-06-20 10:11:14Z lha $");
static char version[] = "Version 6.00";
@ -138,9 +138,9 @@ static int handleoobcmd(void);
static int checkuser (char *, char *);
static int checkaccess (char *);
static FILE *dataconn (const char *, off_t, const char *);
static void dolog (struct sockaddr *sa, int len);
static void dolog (struct sockaddr *, int);
static void end_login (void);
static FILE *getdatasock (const char *);
static FILE *getdatasock (const char *, int);
static char *gunique (char *);
static RETSIGTYPE lostconn (int);
static int receive_data (FILE *, FILE *);
@ -280,10 +280,6 @@ main(int argc, char **argv)
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);
@ -595,14 +591,15 @@ user(char *name)
if (logging)
strlcpy(curname, name, sizeof(curname));
if(sec_complete) {
if(sec_userok(name) == 0)
if(sec_userok(name) == 0) {
do_login(232, name);
else
sec_session(name);
} else
reply(530, "User %s access denied.", name);
} else {
#ifdef OTP
char ss[256];
#ifdef OTP
if (otp_challenge(&otp_ctx, name, ss, sizeof(ss)) == 0) {
reply(331, "Password %s for %s required.",
ss, name);
@ -613,9 +610,9 @@ user(char *name)
reply(331, "Password required for %s.", name);
askpasswd = 1;
} else {
char *s;
#ifdef OTP
char *s;
if ((s = otp_error (&otp_ctx)) != NULL)
lreply(530, "OTP: %s", s);
#endif
@ -727,6 +724,10 @@ int do_login(int code, char *passwd)
return -1;
}
initgroups(pw->pw_name, pw->pw_gid);
#if defined(KRB4) || defined(KRB5)
if(k_hasafs())
k_setpag();
#endif
/* open wtmp before chroot */
ftpd_logwtmp(ttyline, pw->pw_name, remotehost);
@ -835,7 +836,8 @@ static void
end_login(void)
{
seteuid((uid_t)0);
if (seteuid((uid_t)0) < 0)
fatal("Failed to seteuid");
if (logged_in)
ftpd_logwtmp(ttyline, "", "");
pw = NULL;
@ -933,9 +935,8 @@ pass(char *passwd)
if (rval)
rval = unix_verify_user(pw->pw_name, passwd);
} else {
char *s;
#ifdef OTP
char *s;
if ((s = otp_error(&otp_ctx)) != NULL)
lreply(530, "OTP: %s", s);
#endif
@ -1023,9 +1024,10 @@ retrieve(const char *cmd, char *name)
*tail = c;
if (p->rev_cmd != NULL) {
char *ext;
int ret;
asprintf(&ext, "%s%s", name, p->ext);
if (ext != NULL) {
ret = asprintf(&ext, "%s%s", name, p->ext);
if (ret != -1) {
if (access(ext, R_OK) == 0) {
snprintf (line, sizeof(line),
p->rev_cmd, ext);
@ -1107,17 +1109,17 @@ retrieve(const char *cmd, char *name)
int
filename_check(char *filename)
{
unsigned char *p;
char *p;
p = (unsigned char *)strrchr(filename, '/');
p = strrchr(filename, '/');
if(p)
filename = p + 1;
p = filename;
if(isalnum(*p)){
if(isalnum((unsigned char)*p)){
p++;
while(*p && (isalnum(*p) || strchr(good_chars, *p)))
while(*p && (isalnum((unsigned char)*p) || strchr(good_chars, (unsigned char)*p)))
p++;
if(*p == '\0')
return 0;
@ -1208,14 +1210,15 @@ do_store(char *name, char *mode, int unique)
}
static FILE *
getdatasock(const char *mode)
getdatasock(const char *mode, int domain)
{
int s, t, tries;
if (data >= 0)
return (fdopen(data, mode));
seteuid(0);
s = socket(ctrl_addr->sa_family, SOCK_STREAM, 0);
if (seteuid(0) < 0)
fatal("Failed to seteuid");
s = socket(domain, SOCK_STREAM, 0);
if (s < 0)
goto bad;
socket_set_reuseaddr (s, 1);
@ -1232,7 +1235,8 @@ getdatasock(const char *mode)
goto bad;
sleep(tries);
}
seteuid(pw->pw_uid);
if (seteuid(pw->pw_uid) < 0)
fatal("Failed to seteuid");
#ifdef IPTOS_THROUGHPUT
socket_set_tos (s, IPTOS_THROUGHPUT);
#endif
@ -1240,7 +1244,8 @@ getdatasock(const char *mode)
bad:
/* Return the real value of errno (close may change it) */
t = errno;
seteuid((uid_t)pw->pw_uid);
if (seteuid((uid_t)pw->pw_uid) < 0)
fatal("Failed to seteuid");
close(s);
errno = t;
return (NULL);
@ -1271,7 +1276,7 @@ dataconn(const char *name, off_t size, const char *mode)
{
char sizebuf[32];
FILE *file;
int retry = 0;
int domain, retry = 0;
file_size = size;
byte_count = 0;
@ -1318,7 +1323,15 @@ dataconn(const char *name, off_t size, const char *mode)
if (usedefault)
data_dest = his_addr;
usedefault = 1;
file = getdatasock(mode);
/*
* Default to using the same socket type as the ctrl address,
* unless we know the type of the data address.
*/
domain = data_dest->sa_family;
if (domain == PF_UNSPEC)
domain = ctrl_addr->sa_family;
file = getdatasock(mode, domain);
if (file == NULL) {
char data_addr[256];
@ -1625,7 +1638,7 @@ statcmd(void)
lreply(211, "%s FTP server (%s) status:", hostname, version);
printf(" %s\r\n", version);
printf(" Connected to %s", remotehost);
if (!isdigit(remotehost[0]))
if (!isdigit((unsigned char)remotehost[0]))
printf(" (%s)", inet_ntoa(his_addr.sin_addr));
printf("\r\n");
if (logged_in) {
@ -1889,11 +1902,11 @@ dologout(int status)
transflag = 0;
urgflag = 0;
if (logged_in) {
seteuid((uid_t)0);
ftpd_logwtmp(ttyline, "", "");
#ifdef KRB4
#if KRB4 || KRB5
cond_kdestroy();
#endif
seteuid((uid_t)0); /* No need to check, we call exit() below */
ftpd_logwtmp(ttyline, "", "");
}
/* beware of flushing buffers after a SIGPIPE */
#ifdef XXX
@ -2006,12 +2019,15 @@ pasv(void)
0);
socket_set_portrange(pdata, restricted_data_ports,
pasv_addr->sa_family);
seteuid(0);
if (seteuid(0) < 0)
fatal("Failed to seteuid");
if (bind(pdata, pasv_addr, socket_sockaddr_size (pasv_addr)) < 0) {
seteuid(pw->pw_uid);
if (seteuid(pw->pw_uid) < 0)
fatal("Failed to seteuid");
goto pasv_error;
}
seteuid(pw->pw_uid);
if (seteuid(pw->pw_uid) < 0)
fatal("Failed to seteuid");
len = sizeof(pasv_addr_ss);
if (getsockname(pdata, pasv_addr, &len) < 0)
goto pasv_error;
@ -2050,12 +2066,15 @@ epsv(char *proto)
0);
socket_set_portrange(pdata, restricted_data_ports,
pasv_addr->sa_family);
seteuid(0);
if (seteuid(0) < 0)
fatal("Failed to seteuid");
if (bind(pdata, pasv_addr, socket_sockaddr_size (pasv_addr)) < 0) {
seteuid(pw->pw_uid);
if (seteuid(pw->pw_uid))
fatal("Failed to seteuid");
goto pasv_error;
}
seteuid(pw->pw_uid);
if (seteuid(pw->pw_uid) < 0)
fatal("Failed to seteuid");
len = sizeof(pasv_addr_ss);
if (getsockname(pdata, pasv_addr, &len) < 0)
goto pasv_error;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: ftpd_locl.h,v 1.13.2.1 2004/08/20 15:17:07 lha Exp $ */
/* $Id: ftpd_locl.h 14933 2005-04-24 19:58:14Z lha $ */
#ifndef __ftpd_locl_h__
#define __ftpd_locl_h__
@ -166,7 +166,7 @@ extern int LIBPREFIX(fclose) (FILE *);
int fclose(FILE *stream);
int yyparse();
int yyparse(void);
#ifndef LOG_FTP
#define LOG_FTP LOG_DAEMON

View File

@ -1,4 +1,4 @@
.\" $Id: ftpusers.5,v 1.5 2002/08/20 17:07:04 joda Exp $
.\" $Id: ftpusers.5 11176 2002-08-20 17:07:29Z joda $
.\"
.Dd May 7, 1997
.Dt FTPUSERS 5

View File

@ -35,90 +35,121 @@
#include <gssapi.h>
#include <krb5.h>
RCSID("$Id: gss_userok.c,v 1.10 2003/03/18 13:56:35 lha Exp $");
RCSID("$Id: gss_userok.c 21222 2007-06-20 10:11:14Z lha $");
/* XXX a bit too much of krb5 dependency here...
What is the correct way to do this?
*/
extern krb5_context gssapi_krb5_context;
struct gss_krb5_data {
krb5_context context;
};
/* XXX sync with gssapi.c */
struct gss_data {
gss_ctx_id_t context_hdl;
char *client_name;
gss_cred_id_t delegated_cred_handle;
void *mech_data;
};
int gss_userok(void*, char*); /* to keep gcc happy */
int gss_session(void*, char*); /* to keep gcc happy */
int
gss_userok(void *app_data, char *username)
{
struct gss_data *data = app_data;
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;
}
krb5_error_code ret;
krb5_principal client;
struct gss_krb5_data *kdata;
asprintf (&ticketfile, "%s%u", KRB5_DEFAULT_CCROOT,
(unsigned)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);
if (k_hasafs()) {
krb5_afslog(gssapi_krb5_context, ccache, 0, 0);
}
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;
kdata = calloc(1, sizeof(struct gss_krb5_data));
if (kdata == NULL)
return 1;
data->mech_data = kdata;
ret = krb5_init_context(&(kdata->context));
if (ret) {
free(kdata);
return 1;
}
return 1;
ret = krb5_parse_name(kdata->context, data->client_name, &client);
if(ret) {
krb5_free_context(kdata->context);
free(kdata);
return 1;
}
ret = krb5_kuserok(kdata->context, client, username);
if (!ret) {
krb5_free_principal(kdata->context, client);
krb5_free_context(kdata->context);
free(kdata);
return 1;
}
ret = 0;
krb5_free_principal(kdata->context, client);
return ret;
}
int
gss_session(void *app_data, char *username)
{
struct gss_data *data = app_data;
krb5_error_code ret;
OM_uint32 minor_status;
struct gss_krb5_data *kdata;
ret = 0;
kdata = (struct gss_krb5_data *)(data->mech_data);
/* more of krb-depend stuff :-( */
/* gss_add_cred() ? */
if (data->delegated_cred_handle != GSS_C_NO_CREDENTIAL) {
krb5_ccache ccache = NULL;
const char* ticketfile;
struct passwd *kpw;
ret = krb5_cc_gen_new(kdata->context, &krb5_fcc_ops, &ccache);
if (ret)
goto fail;
ticketfile = krb5_cc_get_name(kdata->context, ccache);
ret = gss_krb5_copy_ccache(&minor_status,
data->delegated_cred_handle,
ccache);
if (ret) {
ret = 0;
goto fail;
}
do_destroy_tickets = 1;
kpw = getpwnam(username);
if (kpw == NULL) {
unlink(ticketfile);
ret = 1;
goto fail;
}
chown (ticketfile, kpw->pw_uid, kpw->pw_gid);
if (asprintf(&k5ccname, "FILE:%s", ticketfile) != -1) {
esetenv ("KRB5CCNAME", k5ccname, 1);
}
afslog(NULL, 1);
fail:
if (ccache)
krb5_cc_close(kdata->context, ccache);
}
gss_release_cred(&minor_status, &data->delegated_cred_handle);
krb5_free_context(kdata->context);
free(kdata);
return ret;
}

View File

@ -0,0 +1,528 @@
/*
* Copyright (c) 1998 - 2005 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.
*/
#ifdef FTP_SERVER
#include "ftpd_locl.h"
#else
#include "ftp_locl.h"
#endif
#include <gssapi.h>
#include <krb5_err.h>
RCSID("$Id: gssapi.c 21513 2007-07-12 12:45:25Z lha $");
int ftp_do_gss_bindings = 0;
int ftp_do_gss_delegate = 1;
struct gss_data {
gss_ctx_id_t context_hdl;
char *client_name;
gss_cred_id_t delegated_cred_handle;
void *mech_data;
};
static int
gss_init(void *app_data)
{
struct gss_data *d = app_data;
d->context_hdl = GSS_C_NO_CONTEXT;
d->delegated_cred_handle = GSS_C_NO_CREDENTIAL;
#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
gss_check_prot(void *app_data, int level)
{
if(level == prot_confidential)
return -1;
return 0;
}
static int
gss_decode(void *app_data, void *buf, int len, int level)
{
OM_uint32 maj_stat, min_stat;
gss_buffer_desc input, output;
gss_qop_t qop_state;
int conf_state;
struct gss_data *d = app_data;
size_t ret_len;
input.length = len;
input.value = buf;
maj_stat = gss_unwrap (&min_stat,
d->context_hdl,
&input,
&output,
&conf_state,
&qop_state);
if(GSS_ERROR(maj_stat))
return -1;
memmove(buf, output.value, output.length);
ret_len = output.length;
gss_release_buffer(&min_stat, &output);
return ret_len;
}
static int
gss_overhead(void *app_data, int level, int len)
{
return 100; /* dunno? */
}
static int
gss_encode(void *app_data, void *from, int length, int level, void **to)
{
OM_uint32 maj_stat, min_stat;
gss_buffer_desc input, output;
int conf_state;
struct gss_data *d = app_data;
input.length = length;
input.value = from;
maj_stat = gss_wrap (&min_stat,
d->context_hdl,
level == prot_private,
GSS_C_QOP_DEFAULT,
&input,
&conf_state,
&output);
*to = output.value;
return output.length;
}
static void
sockaddr_to_gss_address (struct sockaddr *sa,
OM_uint32 *addr_type,
gss_buffer_desc *gss_addr)
{
switch (sa->sa_family) {
#ifdef HAVE_IPV6
case AF_INET6 : {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
gss_addr->length = 16;
gss_addr->value = &sin6->sin6_addr;
*addr_type = GSS_C_AF_INET6;
break;
}
#endif
case AF_INET : {
struct sockaddr_in *sin4 = (struct sockaddr_in *)sa;
gss_addr->length = 4;
gss_addr->value = &sin4->sin_addr;
*addr_type = GSS_C_AF_INET;
break;
}
default :
errx (1, "unknown address family %d", sa->sa_family);
}
}
/* end common stuff */
#ifdef FTP_SERVER
static int
gss_adat(void *app_data, void *buf, size_t len)
{
char *p = NULL;
gss_buffer_desc input_token, output_token;
OM_uint32 maj_stat, min_stat;
gss_name_t client_name;
struct gss_data *d = app_data;
gss_channel_bindings_t bindings;
if (ftp_do_gss_bindings) {
bindings = malloc(sizeof(*bindings));
if (bindings == NULL)
errx(1, "out of memory");
sockaddr_to_gss_address (his_addr,
&bindings->initiator_addrtype,
&bindings->initiator_address);
sockaddr_to_gss_address (ctrl_addr,
&bindings->acceptor_addrtype,
&bindings->acceptor_address);
bindings->application_data.length = 0;
bindings->application_data.value = NULL;
} else
bindings = GSS_C_NO_CHANNEL_BINDINGS;
input_token.value = buf;
input_token.length = len;
maj_stat = gss_accept_sec_context (&min_stat,
&d->context_hdl,
GSS_C_NO_CREDENTIAL,
&input_token,
bindings,
&client_name,
NULL,
&output_token,
NULL,
NULL,
&d->delegated_cred_handle);
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
if(output_token.length) {
if(base64_encode(output_token.value, output_token.length, &p) < 0) {
reply(535, "Out of memory base64-encoding.");
return -1;
}
gss_release_buffer(&min_stat, &output_token);
}
if(maj_stat == GSS_S_COMPLETE){
char *name;
gss_buffer_desc export_name;
gss_OID oid;
maj_stat = gss_display_name(&min_stat, client_name,
&export_name, &oid);
if(maj_stat != 0) {
reply(500, "Error displaying name");
goto out;
}
/* XXX kerberos */
if(oid != GSS_KRB5_NT_PRINCIPAL_NAME) {
reply(500, "OID not kerberos principal name");
gss_release_buffer(&min_stat, &export_name);
goto out;
}
name = malloc(export_name.length + 1);
if(name == NULL) {
reply(500, "Out of memory");
gss_release_buffer(&min_stat, &export_name);
goto out;
}
memcpy(name, export_name.value, export_name.length);
name[export_name.length] = '\0';
gss_release_buffer(&min_stat, &export_name);
d->client_name = name;
if(p)
reply(235, "ADAT=%s", p);
else
reply(235, "ADAT Complete");
sec_complete = 1;
} else if(maj_stat == GSS_S_CONTINUE_NEEDED) {
if(p)
reply(335, "ADAT=%s", p);
else
reply(335, "OK, need more data");
} else {
OM_uint32 new_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
gss_display_status(&new_stat,
min_stat,
GSS_C_MECH_CODE,
GSS_C_NO_OID,
&msg_ctx,
&status_string);
syslog(LOG_ERR, "gss_accept_sec_context: %s",
(char*)status_string.value);
gss_release_buffer(&new_stat, &status_string);
reply(431, "Security resource unavailable");
}
out:
if (client_name)
gss_release_name(&min_stat, &client_name);
free(p);
return 0;
}
int gss_userok(void*, char*);
int gss_session(void*, char*);
struct sec_server_mech gss_server_mech = {
"GSSAPI",
sizeof(struct gss_data),
gss_init, /* init */
NULL, /* end */
gss_check_prot,
gss_overhead,
gss_encode,
gss_decode,
/* */
NULL,
gss_adat,
NULL, /* pbsz */
NULL, /* ccc */
gss_userok,
gss_session
};
#else /* FTP_SERVER */
extern struct sockaddr *hisctladdr, *myctladdr;
static int
import_name(const char *kname, const char *host, gss_name_t *target_name)
{
OM_uint32 maj_stat, min_stat;
gss_buffer_desc name;
char *str;
name.length = asprintf(&str, "%s@%s", kname, host);
if (str == NULL) {
printf("Out of memory\n");
return AUTH_ERROR;
}
name.value = str;
maj_stat = gss_import_name(&min_stat,
&name,
GSS_C_NT_HOSTBASED_SERVICE,
target_name);
if (GSS_ERROR(maj_stat)) {
OM_uint32 new_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
gss_display_status(&new_stat,
min_stat,
GSS_C_MECH_CODE,
GSS_C_NO_OID,
&msg_ctx,
&status_string);
printf("Error importing name %s: %s\n",
(char *)name.value,
(char *)status_string.value);
free(name.value);
gss_release_buffer(&new_stat, &status_string);
return AUTH_ERROR;
}
free(name.value);
return 0;
}
static int
gss_auth(void *app_data, char *host)
{
OM_uint32 maj_stat, min_stat;
gss_name_t target_name;
gss_buffer_desc input, output_token;
int context_established = 0;
char *p;
int n;
gss_channel_bindings_t bindings;
struct gss_data *d = app_data;
OM_uint32 mech_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG;
const char *knames[] = { "ftp", "host", NULL }, **kname = knames;
if(import_name(*kname++, host, &target_name))
return AUTH_ERROR;
input.length = 0;
input.value = NULL;
if (ftp_do_gss_bindings) {
bindings = malloc(sizeof(*bindings));
if (bindings == NULL)
errx(1, "out of memory");
sockaddr_to_gss_address (myctladdr,
&bindings->initiator_addrtype,
&bindings->initiator_address);
sockaddr_to_gss_address (hisctladdr,
&bindings->acceptor_addrtype,
&bindings->acceptor_address);
bindings->application_data.length = 0;
bindings->application_data.value = NULL;
} else
bindings = GSS_C_NO_CHANNEL_BINDINGS;
if (ftp_do_gss_delegate)
mech_flags |= GSS_C_DELEG_FLAG;
while(!context_established) {
maj_stat = gss_init_sec_context(&min_stat,
GSS_C_NO_CREDENTIAL,
&d->context_hdl,
target_name,
GSS_C_NO_OID,
mech_flags,
0,
bindings,
&input,
NULL,
&output_token,
NULL,
NULL);
if (GSS_ERROR(maj_stat)) {
OM_uint32 new_stat;
OM_uint32 msg_ctx = 0;
gss_buffer_desc status_string;
d->context_hdl = GSS_C_NO_CONTEXT;
gss_release_name(&min_stat, &target_name);
if(*kname != NULL) {
if(import_name(*kname++, host, &target_name)) {
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
return AUTH_ERROR;
}
continue;
}
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
gss_display_status(&new_stat,
min_stat,
GSS_C_MECH_CODE,
GSS_C_NO_OID,
&msg_ctx,
&status_string);
printf("Error initializing security context: %s\n",
(char*)status_string.value);
gss_release_buffer(&new_stat, &status_string);
return AUTH_CONTINUE;
}
if (input.value) {
free(input.value);
input.value = NULL;
input.length = 0;
}
if (output_token.length != 0) {
base64_encode(output_token.value, output_token.length, &p);
gss_release_buffer(&min_stat, &output_token);
n = command("ADAT %s", p);
free(p);
}
if (GSS_ERROR(maj_stat)) {
if (d->context_hdl != GSS_C_NO_CONTEXT)
gss_delete_sec_context (&min_stat,
&d->context_hdl,
GSS_C_NO_BUFFER);
break;
}
if (maj_stat & GSS_S_CONTINUE_NEEDED) {
p = strstr(reply_string, "ADAT=");
if(p == NULL){
printf("Error: expected ADAT in reply. got: %s\n",
reply_string);
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
return AUTH_ERROR;
} else {
p+=5;
input.value = malloc(strlen(p));
input.length = base64_decode(p, input.value);
}
} else {
if(code != 235) {
printf("Unrecognized response code: %d\n", code);
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
return AUTH_ERROR;
}
context_established = 1;
}
}
gss_release_name(&min_stat, &target_name);
if (bindings != GSS_C_NO_CHANNEL_BINDINGS)
free(bindings);
if (input.value)
free(input.value);
{
gss_name_t targ_name;
maj_stat = gss_inquire_context(&min_stat,
d->context_hdl,
NULL,
&targ_name,
NULL,
NULL,
NULL,
NULL,
NULL);
if (GSS_ERROR(maj_stat) == 0) {
gss_buffer_desc name;
maj_stat = gss_display_name (&min_stat,
targ_name,
&name,
NULL);
if (GSS_ERROR(maj_stat) == 0) {
printf("Authenticated to <%s>\n", (char *)name.value);
gss_release_buffer(&min_stat, &name);
}
gss_release_name(&min_stat, &targ_name);
} else
printf("Failed to get gss name of peer.\n");
}
return AUTH_OK;
}
struct sec_client_mech gss_client_mech = {
"GSSAPI",
sizeof(struct gss_data),
gss_init,
gss_auth,
NULL, /* end */
gss_check_prot,
gss_overhead,
gss_encode,
gss_decode,
};
#endif /* FTP_SERVER */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 1996, 1997, 1998 Kungliga Tekniska Högskolan
* Copyright (c) 1995 - 1999, 2003 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@ -33,7 +33,16 @@
#include "ftpd_locl.h"
RCSID("$Id: kauth.c,v 1.25 1999/12/02 16:58:31 joda Exp $");
RCSID("$Id: kauth.c 15666 2005-07-19 17:08:11Z lha $");
#if defined(KRB4) || defined(KRB5)
int do_destroy_tickets = 1;
char *k5ccname;
#endif
#ifdef KRB4
static KTEXT_ST cip;
static unsigned int lifetime;
@ -41,8 +50,6 @@ static time_t local_time;
static krb_principal pr;
static int do_destroy_tickets = 1;
static int
save_tkt(const char *user,
const char *instance,
@ -237,87 +244,42 @@ short_date(int32_t dp)
}
void
klist(void)
krbtkfile(const char *tkfile)
{
int err;
char *file = tkt_string();
krb_principal pr;
char buf1[128], buf2[128];
int header = 1;
CREDENTIALS c;
err = tf_init(file, R_TKT_FIL);
if(err != KSUCCESS){
reply(500, "%s", krb_get_err_text(err));
return;
}
tf_close();
/*
* We must find the realm of the ticket file here before calling
* tf_init because since the realm of the ticket file is not
* really stored in the principal section of the file, the
* routine we use must itself call tf_init and tf_close.
*/
err = krb_get_tf_realm(file, pr.realm);
if(err != KSUCCESS){
reply(500, "%s", krb_get_err_text(err));
return;
}
err = tf_init(file, R_TKT_FIL);
if(err != KSUCCESS){
reply(500, "%s", krb_get_err_text(err));
return;
}
err = tf_get_pname(pr.name);
if(err != KSUCCESS){
reply(500, "%s", krb_get_err_text(err));
return;
}
err = tf_get_pinst(pr.instance);
if(err != KSUCCESS){
reply(500, "%s", krb_get_err_text(err));
return;
}
/*
* You may think that this is the obvious place to get the
* realm of the ticket file, but it can't be done here as the
* routine to do this must open the ticket file. This is why
* it was done before tf_init.
*/
lreply(200, "Ticket file: %s", tkt_string());
lreply(200, "Principal: %s", krb_unparse_name(&pr));
while ((err = tf_get_cred(&c)) == KSUCCESS) {
if (header) {
lreply(200, "%-15s %-15s %s",
" Issued", " Expires", " Principal (kvno)");
header = 0;
}
strlcpy(buf1, short_date(c.issue_date), sizeof(buf1));
c.issue_date = krb_life_to_time(c.issue_date, c.lifetime);
if (time(0) < (unsigned long) c.issue_date)
strlcpy(buf2, short_date(c.issue_date), sizeof(buf2));
else
strlcpy(buf2, ">>> Expired <<< ", sizeof(buf2));
lreply(200, "%s %s %s (%d)", buf1, buf2,
krb_unparse_name_long(c.service, c.instance, c.realm), c.kvno);
}
if (header && err == EOF) {
lreply(200, "No tickets in file.");
}
reply(200, " ");
do_destroy_tickets = 0;
krb_set_tkt_string(tkfile);
reply(200, "Using ticket file %s", tkfile);
}
#endif /* KRB4 */
#ifdef KRB5
static void
dest_cc(void)
{
krb5_context context;
krb5_error_code ret;
krb5_ccache id;
ret = krb5_init_context(&context);
if (ret == 0) {
if (k5ccname)
ret = krb5_cc_resolve(context, k5ccname, &id);
else
ret = krb5_cc_default (context, &id);
if (ret)
krb5_free_context(context);
}
if (ret == 0) {
krb5_cc_destroy(context, id);
krb5_free_context (context);
}
}
#endif
#if defined(KRB4) || defined(KRB5)
/*
* Only destroy if we created the tickets
*/
@ -325,35 +287,64 @@ klist(void)
void
cond_kdestroy(void)
{
if (do_destroy_tickets)
if (do_destroy_tickets) {
#if KRB4
dest_tkt();
#endif
#if KRB5
dest_cc();
#endif
do_destroy_tickets = 0;
}
afsunlog();
}
void
kdestroy(void)
{
#if KRB4
dest_tkt();
#endif
#if KRB5
dest_cc();
#endif
afsunlog();
reply(200, "Tickets destroyed");
}
void
krbtkfile(const char *tkfile)
{
do_destroy_tickets = 0;
krb_set_tkt_string(tkfile);
reply(200, "Using ticket file %s", tkfile);
}
void
afslog(const char *cell)
afslog(const char *cell, int quiet)
{
if(k_hasafs()) {
#ifdef KRB5
krb5_context context;
krb5_error_code ret;
krb5_ccache id;
ret = krb5_init_context(&context);
if (ret == 0) {
if (k5ccname)
ret = krb5_cc_resolve(context, k5ccname, &id);
else
ret = krb5_cc_default(context, &id);
if (ret)
krb5_free_context(context);
}
if (ret == 0) {
krb5_afslog(context, id, cell, 0);
krb5_cc_close (context, id);
krb5_free_context (context);
}
#endif
#ifdef KRB4
krb_afslog(cell, 0);
reply(200, "afslog done");
#endif
if (!quiet)
reply(200, "afslog done");
} else {
reply(200, "no AFS present");
if (!quiet)
reply(200, "no AFS present");
}
}
@ -363,3 +354,7 @@ afsunlog(void)
if(k_hasafs())
k_unlog();
}
#else
int ftpd_afslog_placeholder;
#endif /* KRB4 || KRB5 */

View File

@ -0,0 +1,178 @@
/*
* Copyright (c) 1995 - 2005 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 "ftpd_locl.h"
#ifdef KRB5
static int
print_cred(krb5_context context, krb5_creds *cred)
{
char t1[128], t2[128], *str;
krb5_error_code ret;
krb5_timestamp sec;
krb5_timeofday (context, &sec);
if(cred->times.starttime)
krb5_format_time(context, cred->times.starttime, t1, sizeof(t1), 1);
else
krb5_format_time(context, cred->times.authtime, t1, sizeof(t1), 1);
if(cred->times.endtime > sec)
krb5_format_time(context, cred->times.endtime, t2, sizeof(t2), 1);
else
strlcpy(t2, ">>>Expired<<<", sizeof(t2));
ret = krb5_unparse_name (context, cred->server, &str);
if (ret) {
lreply(500, "krb5_unparse_name: %d", ret);
return 1;
}
lreply(200, "%-20s %-20s %s", t1, t2, str);
free(str);
return 0;
}
static int
print_tickets (krb5_context context,
krb5_ccache ccache,
krb5_principal principal)
{
krb5_error_code ret;
krb5_cc_cursor cursor;
krb5_creds cred;
char *str;
ret = krb5_unparse_name (context, principal, &str);
if (ret) {
lreply(500, "krb5_unparse_name: %d", ret);
return 500;
}
lreply(200, "%17s: %s:%s",
"Credentials cache",
krb5_cc_get_type(context, ccache),
krb5_cc_get_name(context, ccache));
lreply(200, "%17s: %s", "Principal", str);
free (str);
ret = krb5_cc_start_seq_get (context, ccache, &cursor);
if (ret) {
lreply(500, "krb5_cc_start_seq_get: %d", ret);
return 500;
}
lreply(200, " Issued Expires Principal");
while ((ret = krb5_cc_next_cred (context,
ccache,
&cursor,
&cred)) == 0) {
if (print_cred(context, &cred))
return 500;
krb5_free_cred_contents (context, &cred);
}
if (ret != KRB5_CC_END) {
lreply(500, "krb5_cc_get_next: %d", ret);
return 500;
}
ret = krb5_cc_end_seq_get (context, ccache, &cursor);
if (ret) {
lreply(500, "krb5_cc_end_seq_get: %d", ret);
return 500;
}
return 200;
}
static int
klist5(void)
{
krb5_error_code ret;
krb5_context context;
krb5_ccache ccache;
krb5_principal principal;
int exit_status = 200;
ret = krb5_init_context (&context);
if (ret) {
lreply(500, "krb5_init_context failed: %d", ret);
return 500;
}
if (k5ccname)
ret = krb5_cc_resolve(context, k5ccname, &ccache);
else
ret = krb5_cc_default (context, &ccache);
if (ret) {
lreply(500, "krb5_cc_default: %d", ret);
return 500;
}
ret = krb5_cc_get_principal (context, ccache, &principal);
if (ret) {
if(ret == ENOENT)
lreply(500, "No ticket file: %s",
krb5_cc_get_name(context, ccache));
else
lreply(500, "krb5_cc_get_principal: %d", ret);
return 500;
}
exit_status = print_tickets (context, ccache, principal);
ret = krb5_cc_close (context, ccache);
if (ret) {
lreply(500, "krb5_cc_close: %d", ret);
exit_status = 500;
}
krb5_free_principal (context, principal);
krb5_free_context (context);
return exit_status;
}
#endif
void
klist(void)
{
#if KRB5
int res = klist5();
reply(res, " ");
#else
reply(500, "Command not implemented.");
#endif
}

View File

@ -0,0 +1,340 @@
/*
* Copyright (c) 1995, 1996, 1997, 1998, 1999 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.
*/
#ifdef FTP_SERVER
#include "ftpd_locl.h"
#else
#include "ftp_locl.h"
#endif
#include <krb.h>
RCSID("$Id: krb4.c 17450 2006-05-05 11:11:43Z lha $");
#ifdef FTP_SERVER
#define LOCAL_ADDR ctrl_addr
#define REMOTE_ADDR his_addr
#else
#define LOCAL_ADDR myctladdr
#define REMOTE_ADDR hisctladdr
#endif
extern struct sockaddr *LOCAL_ADDR, *REMOTE_ADDR;
struct krb4_data {
des_cblock key;
des_key_schedule schedule;
char name[ANAME_SZ];
char instance[INST_SZ];
char realm[REALM_SZ];
};
static int
krb4_check_prot(void *app_data, int level)
{
if(level == prot_confidential)
return -1;
return 0;
}
static int
krb4_decode(void *app_data, void *buf, int len, int level)
{
MSG_DAT m;
int e;
struct krb4_data *d = app_data;
if(level == prot_safe)
e = krb_rd_safe(buf, len, &d->key,
(struct sockaddr_in *)REMOTE_ADDR,
(struct sockaddr_in *)LOCAL_ADDR, &m);
else
e = krb_rd_priv(buf, len, d->schedule, &d->key,
(struct sockaddr_in *)REMOTE_ADDR,
(struct sockaddr_in *)LOCAL_ADDR, &m);
if(e){
syslog(LOG_ERR, "krb4_decode: %s", krb_get_err_text(e));
return -1;
}
memmove(buf, m.app_data, m.app_length);
return m.app_length;
}
static int
krb4_overhead(void *app_data, int level, int len)
{
return 31;
}
static int
krb4_encode(void *app_data, void *from, int length, int level, void **to)
{
struct krb4_data *d = app_data;
*to = malloc(length + 31);
if(level == prot_safe)
return krb_mk_safe(from, *to, length, &d->key,
(struct sockaddr_in *)LOCAL_ADDR,
(struct sockaddr_in *)REMOTE_ADDR);
else if(level == prot_private)
return krb_mk_priv(from, *to, length, d->schedule, &d->key,
(struct sockaddr_in *)LOCAL_ADDR,
(struct sockaddr_in *)REMOTE_ADDR);
else
return -1;
}
#ifdef FTP_SERVER
static int
krb4_adat(void *app_data, void *buf, size_t len)
{
KTEXT_ST tkt;
AUTH_DAT auth_dat;
char *p;
int kerror;
uint32_t cs;
char msg[35]; /* size of encrypted block */
int tmp_len;
struct krb4_data *d = app_data;
char inst[INST_SZ];
struct sockaddr_in *his_addr_sin = (struct sockaddr_in *)his_addr;
memcpy(tkt.dat, buf, len);
tkt.length = len;
k_getsockinst(0, inst, sizeof(inst));
kerror = krb_rd_req(&tkt, "ftp", inst,
his_addr_sin->sin_addr.s_addr, &auth_dat, "");
if(kerror == RD_AP_UNDEC){
k_getsockinst(0, inst, sizeof(inst));
kerror = krb_rd_req(&tkt, "rcmd", inst,
his_addr_sin->sin_addr.s_addr, &auth_dat, "");
}
if(kerror){
reply(535, "Error reading request: %s.", krb_get_err_text(kerror));
return -1;
}
memcpy(d->key, auth_dat.session, sizeof(d->key));
des_set_key(&d->key, d->schedule);
strlcpy(d->name, auth_dat.pname, sizeof(d->name));
strlcpy(d->instance, auth_dat.pinst, sizeof(d->instance));
strlcpy(d->realm, auth_dat.prealm, sizeof(d->instance));
cs = auth_dat.checksum + 1;
{
unsigned char tmp[4];
KRB_PUT_INT(cs, tmp, 4, sizeof(tmp));
tmp_len = krb_mk_safe(tmp, msg, 4, &d->key,
(struct sockaddr_in *)LOCAL_ADDR,
(struct sockaddr_in *)REMOTE_ADDR);
}
if(tmp_len < 0){
reply(535, "Error creating reply: %s.", strerror(errno));
return -1;
}
len = tmp_len;
if(base64_encode(msg, len, &p) < 0) {
reply(535, "Out of memory base64-encoding.");
return -1;
}
reply(235, "ADAT=%s", p);
sec_complete = 1;
free(p);
return 0;
}
static int
krb4_userok(void *app_data, char *user)
{
struct krb4_data *d = app_data;
return krb_kuserok(d->name, d->instance, d->realm, user);
}
struct sec_server_mech krb4_server_mech = {
"KERBEROS_V4",
sizeof(struct krb4_data),
NULL, /* init */
NULL, /* end */
krb4_check_prot,
krb4_overhead,
krb4_encode,
krb4_decode,
/* */
NULL,
krb4_adat,
NULL, /* pbsz */
NULL, /* ccc */
krb4_userok
};
#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)
{
int ret;
CREDENTIALS cred;
char sname[SNAME_SZ], inst[INST_SZ], realm[REALM_SZ];
strlcpy(sname, service, sizeof(sname));
strlcpy(inst, krb_get_phost(host), sizeof(inst));
strlcpy(realm, krb_realmofhost(host), sizeof(realm));
ret = krb_mk_req(adat, sname, inst, realm, checksum);
if(ret)
return ret;
strlcpy(sname, service, sizeof(sname));
strlcpy(inst, krb_get_phost(host), sizeof(inst));
strlcpy(realm, krb_realmofhost(host), sizeof(realm));
ret = krb_get_cred(sname, inst, realm, &cred);
memmove(&d->key, &cred.session, sizeof(des_cblock));
des_key_sched(&d->key, d->schedule);
memset(&cred, 0, sizeof(cred));
return ret;
}
static int
krb4_auth(void *app_data, char *host)
{
int ret;
char *p;
int len;
KTEXT_ST adat;
MSG_DAT msg_data;
int checksum;
uint32_t cs;
struct krb4_data *d = app_data;
struct sockaddr_in *localaddr = (struct sockaddr_in *)LOCAL_ADDR;
struct sockaddr_in *remoteaddr = (struct sockaddr_in *)REMOTE_ADDR;
checksum = getpid();
ret = mk_auth(d, &adat, "ftp", host, checksum);
if(ret == KDC_PR_UNKNOWN)
ret = mk_auth(d, &adat, "rcmd", host, checksum);
if(ret){
printf("%s\n", krb_get_err_text(ret));
return AUTH_CONTINUE;
}
#ifdef HAVE_KRB_GET_OUR_IP_FOR_REALM
if (krb_get_config_bool("nat_in_use")) {
struct in_addr natAddr;
if (krb_get_our_ip_for_realm(krb_realmofhost(host),
&natAddr) != KSUCCESS
&& krb_get_our_ip_for_realm(NULL, &natAddr) != KSUCCESS)
printf("Can't get address for realm %s\n",
krb_realmofhost(host));
else {
if (natAddr.s_addr != localaddr->sin_addr.s_addr) {
printf("Using NAT IP address (%s) for kerberos 4\n",
inet_ntoa(natAddr));
localaddr->sin_addr = natAddr;
/*
* This not the best place to do this, but it
* is here we know that (probably) NAT is in
* use!
*/
passivemode = 1;
printf("Setting: Passive mode on.\n");
}
}
}
#endif
printf("Local address is %s\n", inet_ntoa(localaddr->sin_addr));
printf("Remote address is %s\n", inet_ntoa(remoteaddr->sin_addr));
if(base64_encode(adat.dat, adat.length, &p) < 0) {
printf("Out of memory base64-encoding.\n");
return AUTH_CONTINUE;
}
ret = command("ADAT %s", p);
free(p);
if(ret != COMPLETE){
printf("Server didn't accept auth data.\n");
return AUTH_ERROR;
}
p = strstr(reply_string, "ADAT=");
if(!p){
printf("Remote host didn't send adat reply.\n");
return AUTH_ERROR;
}
p += 5;
len = base64_decode(p, adat.dat);
if(len < 0){
printf("Failed to decode base64 from server.\n");
return AUTH_ERROR;
}
adat.length = len;
ret = krb_rd_safe(adat.dat, adat.length, &d->key,
(struct sockaddr_in *)hisctladdr,
(struct sockaddr_in *)myctladdr, &msg_data);
if(ret){
printf("Error reading reply from server: %s.\n",
krb_get_err_text(ret));
return AUTH_ERROR;
}
krb_get_int(msg_data.app_data, &cs, 4, 0);
if(cs - checksum != 1){
printf("Bad checksum returned from server.\n");
return AUTH_ERROR;
}
return AUTH_OK;
}
struct sec_client_mech krb4_client_mech = {
"KERBEROS_V4",
sizeof(struct krb4_data),
krb4_init, /* init */
krb4_auth,
NULL, /* end */
krb4_check_prot,
krb4_overhead,
krb4_encode,
krb4_decode
};
#endif /* FTP_SERVER */

View File

@ -33,7 +33,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: logwtmp.c,v 1.15 2000/09/19 13:17:05 assar Exp $");
RCSID("$Id: logwtmp.c 9079 2000-09-19 13:17:20Z assar $");
#endif
#include <stdio.h>

View File

@ -33,7 +33,7 @@
#ifndef TEST
#include "ftpd_locl.h"
RCSID("$Id: ls.c,v 1.26 2003/02/25 10:51:30 lha Exp $");
RCSID("$Id: ls.c 16216 2005-10-22 13:15:43Z lha $");
#else
#include <stdio.h>
@ -146,16 +146,16 @@ block_convert(size_t blocks)
#endif
}
static void
static int
make_fileinfo(FILE *out, 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;
file->bsize = block_convert(st->st_blocks);
if(S_ISDIR(st->st_mode)) {
file->mode[0] = 'd';
file_type = '/';
@ -218,31 +218,51 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags)
{
struct passwd *pwd;
pwd = getpwuid(st->st_uid);
if(pwd == NULL)
asprintf(&file->user, "%u", (unsigned)st->st_uid);
else
if(pwd == NULL) {
if (asprintf(&file->user, "%u", (unsigned)st->st_uid) == -1)
file->user = NULL;
} else
file->user = strdup(pwd->pw_name);
if (file->user == NULL) {
syslog(LOG_ERR, "out of memory");
return -1;
}
}
{
struct group *grp;
grp = getgrgid(st->st_gid);
if(grp == NULL)
asprintf(&file->group, "%u", (unsigned)st->st_gid);
else
if(grp == NULL) {
if (asprintf(&file->group, "%u", (unsigned)st->st_gid) == -1)
file->group = NULL;
} else
file->group = strdup(grp->gr_name);
if (file->group == NULL) {
syslog(LOG_ERR, "out of memory");
return -1;
}
}
if(S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
#if defined(major) && defined(minor)
asprintf(&file->major, "%u", (unsigned)major(st->st_rdev));
asprintf(&file->minor, "%u", (unsigned)minor(st->st_rdev));
if (asprintf(&file->major, "%u", (unsigned)major(st->st_rdev)) == -1)
file->major = NULL;
if (asprintf(&file->minor, "%u", (unsigned)minor(st->st_rdev)) == -1)
file->minor = NULL;
#else
/* Don't want to use the DDI/DKI crap. */
asprintf(&file->major, "%u", (unsigned)st->st_rdev);
asprintf(&file->minor, "%u", 0);
if (asprintf(&file->major, "%u", (unsigned)st->st_rdev) == -1)
file->major = NULL;
if (asprintf(&file->minor, "%u", 0) == -1)
file->minor = NULL;
#endif
} else
asprintf(&file->size, "%lu", (unsigned long)st->st_size);
if (file->major == NULL || file->minor == NULL) {
syslog(LOG_ERR, "out of memory");
return -1;
}
} else {
if (asprintf(&file->size, "%lu", (unsigned long)st->st_size) == -1)
file->size = NULL;
}
{
time_t t = time(NULL);
@ -254,6 +274,10 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags)
else
strftime(buf, sizeof(buf), "%b %e %H:%M", tm);
file->date = strdup(buf);
if (file->date == NULL) {
syslog(LOG_ERR, "out of memory");
return -1;
}
}
{
const char *p = strrchr(filename, '/');
@ -261,10 +285,15 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags)
p++;
else
p = filename;
if((flags & LS_TYPE) && file_type != 0)
asprintf(&file->filename, "%s%c", p, file_type);
else
if((flags & LS_TYPE) && file_type != 0) {
if (asprintf(&file->filename, "%s%c", p, file_type) == -1)
file->filename = NULL;
} else
file->filename = strdup(p);
if (file->filename == NULL) {
syslog(LOG_ERR, "out of memory");
return -1;
}
}
if(S_ISLNK(st->st_mode)) {
int n;
@ -272,9 +301,14 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags)
if(n >= 0) {
buf[n] = '\0';
file->link = strdup(buf);
if (file->link == NULL) {
syslog(LOG_ERR, "out of memory");
return -1;
}
} else
sec_fprintf2(out, "readlink(%s): %s", filename, strerror(errno));
}
return 0;
}
static void
@ -356,7 +390,7 @@ compare_size(struct fileinfo *a, struct fileinfo *b)
static int list_dir(FILE*, const char*, int);
static int
log10(int num)
find_log10(int num)
{
int i = 1;
while(num > 10) {
@ -508,7 +542,9 @@ list_files(FILE *out, const char **files, int n_files, int flags)
include_in_list = 0;
}
if(include_in_list) {
make_fileinfo(out, files[i], &fi[i], flags);
ret = make_fileinfo(out, files[i], &fi[i], flags);
if (ret)
goto out;
n_print++;
}
}
@ -563,9 +599,9 @@ list_files(FILE *out, const char **files, int n_files, int flags)
max_size = max_major + max_minor + 2;
else if(max_size - max_minor - 2 > max_major)
max_major = max_size - max_minor - 2;
max_inode = log10(max_inode);
max_bsize = log10(max_bsize);
max_n_link = log10(max_n_link);
max_inode = find_log10(max_inode);
max_bsize = find_log10(max_bsize);
max_n_link = find_log10(max_n_link);
if(n_print > 0)
sec_fprintf2(out, "total %lu\r\n", (unsigned long)total_blocks);
@ -611,8 +647,8 @@ list_files(FILE *out, const char **files, int n_files, int flags)
}
if(strlen(fi[i].filename) > max_len)
max_len = strlen(fi[i].filename);
if(log10(fi[i].bsize) > size_len)
size_len = log10(fi[i].bsize);
if(find_log10(fi[i].bsize) > size_len)
size_len = find_log10(fi[i].bsize);
}
if(num_files == 0)
goto next;
@ -729,6 +765,7 @@ list_dir(FILE *out, const char *directory, int flags)
struct dirent *ent;
char **files = NULL;
int n_files = 0;
int ret;
if(d == NULL) {
syslog(LOG_ERR, "%s: %m", directory);
@ -747,8 +784,8 @@ list_dir(FILE *out, const char *directory, int flags)
return -1;
}
files = tmp;
asprintf(&files[n_files], "%s/%s", directory, ent->d_name);
if (files[n_files] == NULL) {
ret = asprintf(&files[n_files], "%s/%s", directory, ent->d_name);
if (ret == -1) {
syslog(LOG_ERR, "%s: out of memory", directory);
free_files (files, n_files);
closedir (d);

View File

@ -57,5 +57,7 @@
#define _PATH_FTPWELCOME SYSCONFDIR "/ftpwelcome"
#define _PATH_FTPLOGINMESG SYSCONFDIR "/motd"
#ifndef _PATH_ISSUE
#define _PATH_ISSUE SYSCONFDIR "/issue"
#endif
#define _PATH_ISSUE_NET SYSCONFDIR "/issue.net"

View File

@ -37,7 +37,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: popen.c,v 1.26 2002/04/02 11:57:39 joda Exp $");
RCSID("$Id: popen.c 10900 2002-04-02 11:57:39Z joda $");
#endif
#include <sys/types.h>

View File

@ -0,0 +1,883 @@
/*
* Copyright (c) 1998-2002, 2005 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.
*/
#ifdef FTP_SERVER
#include "ftpd_locl.h"
#else
#include "ftp_locl.h"
#endif
RCSID("$Id: security.c 21225 2007-06-20 10:16:02Z lha $");
static enum protection_level command_prot;
static enum protection_level data_prot;
static size_t buffer_size;
struct buffer {
void *data;
size_t size;
size_t index;
int eof_flag;
};
static struct buffer in_buffer, out_buffer;
int sec_complete;
static struct {
enum protection_level level;
const char *name;
} level_names[] = {
{ prot_clear, "clear" },
{ prot_safe, "safe" },
{ prot_confidential, "confidential" },
{ prot_private, "private" }
};
static const char *
level_to_name(enum protection_level level)
{
int i;
for(i = 0; i < sizeof(level_names) / sizeof(level_names[0]); i++)
if(level_names[i].level == level)
return level_names[i].name;
return "unknown";
}
#ifndef FTP_SERVER /* not used in server */
static enum protection_level
name_to_level(const char *name)
{
int i;
for(i = 0; i < sizeof(level_names) / sizeof(level_names[0]); i++)
if(!strncasecmp(level_names[i].name, name, strlen(name)))
return level_names[i].level;
return (enum protection_level)-1;
}
#endif
#ifdef FTP_SERVER
static struct sec_server_mech *mechs[] = {
#ifdef KRB5
&gss_server_mech,
#endif
#ifdef KRB4
&krb4_server_mech,
#endif
NULL
};
static struct sec_server_mech *mech;
#else
static struct sec_client_mech *mechs[] = {
#ifdef KRB5
&gss_client_mech,
#endif
#ifdef KRB4
&krb4_client_mech,
#endif
NULL
};
static struct sec_client_mech *mech;
#endif
static void *app_data;
int
sec_getc(FILE *F)
{
if(sec_complete && data_prot) {
char c;
if(sec_read(fileno(F), &c, 1) <= 0)
return EOF;
return c;
} else
return getc(F);
}
static int
block_read(int fd, void *buf, size_t len)
{
unsigned char *p = buf;
int b;
while(len) {
b = read(fd, p, len);
if (b == 0)
return 0;
else if (b < 0)
return -1;
len -= b;
p += b;
}
return p - (unsigned char*)buf;
}
static int
block_write(int fd, void *buf, size_t len)
{
unsigned char *p = buf;
int b;
while(len) {
b = write(fd, p, len);
if(b < 0)
return -1;
len -= b;
p += b;
}
return p - (unsigned char*)buf;
}
static int
sec_get_data(int fd, struct buffer *buf, int level)
{
int len;
int b;
void *tmp;
b = block_read(fd, &len, sizeof(len));
if (b == 0)
return 0;
else if (b < 0)
return -1;
len = ntohl(len);
tmp = realloc(buf->data, len);
if (tmp == NULL)
return -1;
buf->data = tmp;
b = block_read(fd, buf->data, len);
if (b == 0)
return 0;
else if (b < 0)
return -1;
buf->size = (*mech->decode)(app_data, buf->data, len, data_prot);
buf->index = 0;
return 0;
}
static size_t
buffer_read(struct buffer *buf, void *dataptr, size_t len)
{
len = min(len, buf->size - buf->index);
memcpy(dataptr, (char*)buf->data + buf->index, len);
buf->index += len;
return len;
}
static size_t
buffer_write(struct buffer *buf, void *dataptr, size_t len)
{
if(buf->index + len > buf->size) {
void *tmp;
if(buf->data == NULL)
tmp = malloc(1024);
else
tmp = realloc(buf->data, buf->index + len);
if(tmp == NULL)
return -1;
buf->data = tmp;
buf->size = buf->index + len;
}
memcpy((char*)buf->data + buf->index, dataptr, len);
buf->index += len;
return len;
}
int
sec_read(int fd, void *dataptr, int length)
{
size_t len;
int rx = 0;
if(sec_complete == 0 || data_prot == 0)
return read(fd, dataptr, length);
if(in_buffer.eof_flag){
in_buffer.eof_flag = 0;
return 0;
}
len = buffer_read(&in_buffer, dataptr, length);
length -= len;
rx += len;
dataptr = (char*)dataptr + len;
while(length){
int ret;
ret = sec_get_data(fd, &in_buffer, data_prot);
if (ret < 0)
return -1;
if(ret == 0 && in_buffer.size == 0) {
if(rx)
in_buffer.eof_flag = 1;
return rx;
}
len = buffer_read(&in_buffer, dataptr, length);
length -= len;
rx += len;
dataptr = (char*)dataptr + len;
}
return rx;
}
static int
sec_send(int fd, char *from, int length)
{
int bytes;
void *buf;
bytes = (*mech->encode)(app_data, from, length, data_prot, &buf);
bytes = htonl(bytes);
block_write(fd, &bytes, sizeof(bytes));
block_write(fd, buf, ntohl(bytes));
free(buf);
return length;
}
int
sec_fflush(FILE *F)
{
if(data_prot != prot_clear) {
if(out_buffer.index > 0){
sec_write(fileno(F), out_buffer.data, out_buffer.index);
out_buffer.index = 0;
}
sec_send(fileno(F), NULL, 0);
}
fflush(F);
return 0;
}
int
sec_write(int fd, char *dataptr, int length)
{
int len = buffer_size;
int tx = 0;
if(data_prot == prot_clear)
return write(fd, dataptr, length);
len -= (*mech->overhead)(app_data, data_prot, len);
while(length){
if(length < len)
len = length;
sec_send(fd, dataptr, len);
length -= len;
dataptr += len;
tx += len;
}
return tx;
}
int
sec_vfprintf2(FILE *f, const char *fmt, va_list ap)
{
char *buf;
int ret;
if(data_prot == prot_clear)
return vfprintf(f, fmt, ap);
else {
int len;
len = vasprintf(&buf, fmt, ap);
if (len == -1)
return len;
ret = buffer_write(&out_buffer, buf, len);
free(buf);
return ret;
}
}
int
sec_fprintf2(FILE *f, const char *fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = sec_vfprintf2(f, fmt, ap);
va_end(ap);
return ret;
}
int
sec_putc(int c, FILE *F)
{
char ch = c;
if(data_prot == prot_clear)
return putc(c, F);
buffer_write(&out_buffer, &ch, 1);
if(c == '\n' || out_buffer.index >= 1024 /* XXX */) {
sec_write(fileno(F), out_buffer.data, out_buffer.index);
out_buffer.index = 0;
}
return c;
}
int
sec_read_msg(char *s, int level)
{
int len;
char *buf;
int return_code;
buf = malloc(strlen(s));
len = base64_decode(s + 4, buf); /* XXX */
len = (*mech->decode)(app_data, buf, len, level);
if(len < 0)
return -1;
buf[len] = '\0';
if(buf[3] == '-')
return_code = 0;
else
sscanf(buf, "%d", &return_code);
if(buf[len-1] == '\n')
buf[len-1] = '\0';
strcpy(s, buf);
free(buf);
return return_code;
}
int
sec_vfprintf(FILE *f, const char *fmt, va_list ap)
{
char *buf;
void *enc;
int len;
if(!sec_complete)
return vfprintf(f, fmt, ap);
if (vasprintf(&buf, fmt, ap) == -1) {
printf("Failed to allocate command.\n");
return -1;
}
len = (*mech->encode)(app_data, buf, strlen(buf), command_prot, &enc);
free(buf);
if(len < 0) {
printf("Failed to encode command.\n");
return -1;
}
if(base64_encode(enc, len, &buf) < 0){
free(enc);
printf("Out of memory base64-encoding.\n");
return -1;
}
free(enc);
#ifdef FTP_SERVER
if(command_prot == prot_safe)
fprintf(f, "631 %s\r\n", buf);
else if(command_prot == prot_private)
fprintf(f, "632 %s\r\n", buf);
else if(command_prot == prot_confidential)
fprintf(f, "633 %s\r\n", buf);
#else
if(command_prot == prot_safe)
fprintf(f, "MIC %s", buf);
else if(command_prot == prot_private)
fprintf(f, "ENC %s", buf);
else if(command_prot == prot_confidential)
fprintf(f, "CONF %s", buf);
#endif
free(buf);
return 0;
}
int
sec_fprintf(FILE *f, const char *fmt, ...)
{
va_list ap;
int ret;
va_start(ap, fmt);
ret = sec_vfprintf(f, fmt, ap);
va_end(ap);
return ret;
}
/* end common stuff */
#ifdef FTP_SERVER
int ccc_passed;
void
auth(char *auth_name)
{
int i;
void *tmp;
for(i = 0; (mech = mechs[i]) != NULL; i++){
if(!strcasecmp(auth_name, mech->name)){
tmp = realloc(app_data, mech->size);
if (tmp == NULL) {
reply(431, "Unable to accept %s at this time", mech->name);
return;
}
app_data = tmp;
if(mech->init && (*mech->init)(app_data) != 0) {
reply(431, "Unable to accept %s at this time", mech->name);
return;
}
if(mech->auth) {
(*mech->auth)(app_data);
return;
}
if(mech->adat)
reply(334, "Send authorization data.");
else
reply(234, "Authorization complete.");
return;
}
}
free (app_data);
app_data = NULL;
reply(504, "%s is unknown to me", auth_name);
}
void
adat(char *auth_data)
{
if(mech && !sec_complete) {
void *buf = malloc(strlen(auth_data));
size_t len;
len = base64_decode(auth_data, buf);
(*mech->adat)(app_data, buf, len);
free(buf);
} else
reply(503, "You must %sissue an AUTH first.", mech ? "re-" : "");
}
void pbsz(int size)
{
size_t new = size;
if(!sec_complete)
reply(503, "Incomplete security data exchange.");
if(mech->pbsz)
new = (*mech->pbsz)(app_data, size);
if(buffer_size != new){
buffer_size = size;
}
if(new != size)
reply(200, "PBSZ=%lu", (unsigned long)new);
else
reply(200, "OK");
}
void
prot(char *pl)
{
int p = -1;
if(buffer_size == 0){
reply(503, "No protection buffer size negotiated.");
return;
}
if(!strcasecmp(pl, "C"))
p = prot_clear;
else if(!strcasecmp(pl, "S"))
p = prot_safe;
else if(!strcasecmp(pl, "E"))
p = prot_confidential;
else if(!strcasecmp(pl, "P"))
p = prot_private;
else {
reply(504, "Unrecognized protection level.");
return;
}
if(sec_complete){
if((*mech->check_prot)(app_data, p)){
reply(536, "%s does not support %s protection.",
mech->name, level_to_name(p));
}else{
data_prot = (enum protection_level)p;
reply(200, "Data protection is %s.", level_to_name(p));
}
}else{
reply(503, "Incomplete security data exchange.");
}
}
void ccc(void)
{
if(sec_complete){
if(mech->ccc && (*mech->ccc)(app_data) == 0) {
command_prot = data_prot = prot_clear;
ccc_passed = 1;
} else
reply(534, "You must be joking.");
}else
reply(503, "Incomplete security data exchange.");
}
void mec(char *msg, enum protection_level level)
{
void *buf;
size_t len, buf_size;
if(!sec_complete) {
reply(503, "Incomplete security data exchange.");
return;
}
buf_size = strlen(msg) + 2;
buf = malloc(buf_size);
len = base64_decode(msg, buf);
command_prot = level;
if(len == (size_t)-1) {
reply(501, "Failed to base64-decode command");
return;
}
len = (*mech->decode)(app_data, buf, len, level);
if(len == (size_t)-1) {
reply(535, "Failed to decode command");
return;
}
((char*)buf)[len] = '\0';
if(strstr((char*)buf, "\r\n") == NULL)
strlcat((char*)buf, "\r\n", buf_size);
new_ftp_command(buf);
}
/* ------------------------------------------------------------ */
int
sec_userok(char *userstr)
{
if(sec_complete)
return (*mech->userok)(app_data, userstr);
return 0;
}
int
sec_session(char *user)
{
if(sec_complete && mech->session)
return (*mech->session)(app_data, user);
return 0;
}
char *ftp_command;
void
new_ftp_command(char *command)
{
ftp_command = command;
}
void
delete_ftp_command(void)
{
free(ftp_command);
ftp_command = NULL;
}
int
secure_command(void)
{
return ftp_command != NULL;
}
enum protection_level
get_command_prot(void)
{
return command_prot;
}
#else /* FTP_SERVER */
void
sec_status(void)
{
if(sec_complete){
printf("Using %s for authentication.\n", mech->name);
printf("Using %s command channel.\n", level_to_name(command_prot));
printf("Using %s data channel.\n", level_to_name(data_prot));
if(buffer_size > 0)
printf("Protection buffer size: %lu.\n",
(unsigned long)buffer_size);
}else{
printf("Not using any security mechanism.\n");
}
}
static int
sec_prot_internal(int level)
{
int ret;
char *p;
unsigned int s = 1048576;
int old_verbose = verbose;
verbose = 0;
if(!sec_complete){
printf("No security data exchange has taken place.\n");
return -1;
}
if(level){
ret = command("PBSZ %u", s);
if(ret != COMPLETE){
printf("Failed to set protection buffer size.\n");
return -1;
}
buffer_size = s;
p = strstr(reply_string, "PBSZ=");
if(p)
sscanf(p, "PBSZ=%u", &s);
if(s < buffer_size)
buffer_size = s;
}
verbose = old_verbose;
ret = command("PROT %c", level["CSEP"]); /* XXX :-) */
if(ret != COMPLETE){
printf("Failed to set protection level.\n");
return -1;
}
data_prot = (enum protection_level)level;
return 0;
}
enum protection_level
set_command_prot(enum protection_level level)
{
int ret;
enum protection_level old = command_prot;
if(level != command_prot && level == prot_clear) {
ret = command("CCC");
if(ret != COMPLETE) {
printf("Failed to clear command channel.\n");
return -1;
}
}
command_prot = level;
return old;
}
void
sec_prot(int argc, char **argv)
{
int level = -1;
if(argc > 3)
goto usage;
if(argc == 1) {
sec_status();
return;
}
if(!sec_complete) {
printf("No security data exchange has taken place.\n");
code = -1;
return;
}
level = name_to_level(argv[argc - 1]);
if(level == -1)
goto usage;
if((*mech->check_prot)(app_data, level)) {
printf("%s does not implement %s protection.\n",
mech->name, level_to_name(level));
code = -1;
return;
}
if(argc == 2 || strncasecmp(argv[1], "data", strlen(argv[1])) == 0) {
if(sec_prot_internal(level) < 0){
code = -1;
return;
}
} else if(strncasecmp(argv[1], "command", strlen(argv[1])) == 0) {
if(set_command_prot(level) < 0) {
code = -1;
return;
}
} else
goto usage;
code = 0;
return;
usage:
printf("usage: %s [command|data] [clear|safe|confidential|private]\n",
argv[0]);
code = -1;
}
void
sec_prot_command(int argc, char **argv)
{
int level;
if(argc > 2)
goto usage;
if(!sec_complete) {
printf("No security data exchange has taken place.\n");
code = -1;
return;
}
if(argc == 1) {
sec_status();
} else {
level = name_to_level(argv[1]);
if(level == -1)
goto usage;
if((*mech->check_prot)(app_data, level)) {
printf("%s does not implement %s protection.\n",
mech->name, level_to_name(level));
code = -1;
return;
}
if(set_command_prot(level) < 0) {
code = -1;
return;
}
}
code = 0;
return;
usage:
printf("usage: %s [clear|safe|confidential|private]\n",
argv[0]);
code = -1;
}
static enum protection_level request_data_prot;
void
sec_set_protection_level(void)
{
if(sec_complete && data_prot != request_data_prot)
sec_prot_internal(request_data_prot);
}
int
sec_request_prot(char *level)
{
int l = name_to_level(level);
if(l == -1)
return -1;
request_data_prot = (enum protection_level)l;
return 0;
}
int
sec_login(char *host)
{
int ret;
struct sec_client_mech **m;
int old_verbose = verbose;
verbose = -1; /* shut up all messages this will produce (they
are usually not very user friendly) */
for(m = mechs; *m && (*m)->name; m++) {
void *tmp;
tmp = realloc(app_data, (*m)->size);
if (tmp == NULL) {
warnx ("realloc %lu failed", (unsigned long)(*m)->size);
return -1;
}
app_data = tmp;
if((*m)->init && (*(*m)->init)(app_data) != 0) {
printf("Skipping %s...\n", (*m)->name);
continue;
}
printf("Trying %s...\n", (*m)->name);
ret = command("AUTH %s", (*m)->name);
if(ret != CONTINUE){
if(code == 504){
printf("%s is not supported by the server.\n", (*m)->name);
}else if(code == 534){
printf("%s rejected as security mechanism.\n", (*m)->name);
}else if(ret == ERROR) {
printf("The server doesn't support the FTP "
"security extensions.\n");
verbose = old_verbose;
return -1;
}
continue;
}
ret = (*(*m)->auth)(app_data, host);
if(ret == AUTH_CONTINUE)
continue;
else if(ret != AUTH_OK){
/* mechanism is supposed to output error string */
verbose = old_verbose;
return -1;
}
mech = *m;
sec_complete = 1;
if(doencrypt) {
command_prot = prot_private;
request_data_prot = prot_private;
} else {
command_prot = prot_safe;
}
break;
}
verbose = old_verbose;
return *m == NULL;
}
void
sec_end(void)
{
if (mech != NULL) {
if(mech->end)
(*mech->end)(app_data);
if (app_data != NULL) {
memset(app_data, 0, mech->size);
free(app_data);
app_data = NULL;
}
}
sec_complete = 0;
data_prot = (enum protection_level)0;
}
#endif /* FTP_SERVER */

View File

@ -0,0 +1,12 @@
# $Id: Makefile.am 18468 2006-10-14 13:50:51Z lha $
include $(top_srcdir)/Makefile.am.common
noinst_PROGRAMS = gssmask gssmaestro
gssmask_SOURCES = gssmask.c common.c common.h protocol.h
gssmaestro_SOURCES = gssmaestro.c common.c common.h protocol.h
LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LIB_roken)

View File

@ -0,0 +1,760 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# $Id: Makefile.am 18468 2006-10-14 13:50:51Z lha $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
$(top_srcdir)/cf/Makefile.am.common
noinst_PROGRAMS = gssmask$(EXEEXT) gssmaestro$(EXEEXT)
subdir = appl/gssmask
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
$(top_srcdir)/cf/check-type-extra.m4 \
$(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \
$(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \
$(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \
$(top_srcdir)/cf/dlopen.m4 \
$(top_srcdir)/cf/find-func-no-libs.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
$(top_srcdir)/cf/krb-func-getlogin.m4 \
$(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_gssmaestro_OBJECTS = gssmaestro.$(OBJEXT) common.$(OBJEXT)
gssmaestro_OBJECTS = $(am_gssmaestro_OBJECTS)
gssmaestro_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
gssmaestro_DEPENDENCIES = $(top_builddir)/lib/gssapi/libgssapi.la \
$(am__DEPENDENCIES_1)
am_gssmask_OBJECTS = gssmask.$(OBJEXT) common.$(OBJEXT)
gssmask_OBJECTS = $(am_gssmask_OBJECTS)
gssmask_LDADD = $(LDADD)
gssmask_DEPENDENCIES = $(top_builddir)/lib/gssapi/libgssapi.la \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(gssmaestro_SOURCES) $(gssmask_SOURCES)
DIST_SOURCES = $(gssmaestro_SOURCES) $(gssmask_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@
LIB_NDBM = @LIB_NDBM@
LIB_XauFileName = @LIB_XauFileName@
LIB_XauReadAuth = @LIB_XauReadAuth@
LIB_XauWriteAuth = @LIB_XauWriteAuth@
LIB_bswap16 = @LIB_bswap16@
LIB_bswap32 = @LIB_bswap32@
LIB_com_err = @LIB_com_err@
LIB_com_err_a = @LIB_com_err_a@
LIB_com_err_so = @LIB_com_err_so@
LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
LIB_getaddrinfo = @LIB_getaddrinfo@
LIB_gethostbyname = @LIB_gethostbyname@
LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
LIB_openldap = @LIB_openldap@
LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
LIB_security = @LIB_security@
LIB_setsockopt = @LIB_setsockopt@
LIB_socket = @LIB_socket@
LIB_syslog = @LIB_syslog@
LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
buildinclude = $(top_builddir)/include
LIB_getattr = @LIB_getattr@
LIB_getpwent_r = @LIB_getpwent_r@
LIB_odm_initialize = @LIB_odm_initialize@
LIB_setpcred = @LIB_setpcred@
HESIODLIB = @HESIODLIB@
HESIODINCLUDE = @HESIODINCLUDE@
NROFF_MAN = groff -mandoc -Tascii
LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
gssmask_SOURCES = gssmask.c common.c common.h protocol.h
gssmaestro_SOURCES = gssmaestro.c common.c common.h protocol.h
LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LIB_roken)
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps appl/gssmask/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign --ignore-deps appl/gssmask/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
gssmaestro$(EXEEXT): $(gssmaestro_OBJECTS) $(gssmaestro_DEPENDENCIES)
@rm -f gssmaestro$(EXEEXT)
$(LINK) $(gssmaestro_OBJECTS) $(gssmaestro_LDADD) $(LIBS)
gssmask$(EXEEXT): $(gssmask_OBJECTS) $(gssmask_DEPENDENCIES)
@rm -f gssmask$(EXEEXT)
$(LINK) $(gssmask_OBJECTS) $(gssmask_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || 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
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
all-am: Makefile $(PROGRAMS) all-local
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-generic clean-libtool clean-noinstPROGRAMS ctags \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-hook install-dvi install-dvi-am \
install-exec install-exec-am install-exec-hook install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook
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) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
if test "$$foo"; then \
failed=0; all=0; \
for i in $$foo; do \
all=`expr $$all + 1`; \
if (./$$i --version && ./$$i --help) > /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 || exit 1; \
fi
.x.c:
@cmp -s $< $@ 2> /dev/null || cp $< $@
#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 "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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,97 @@
/*
* Copyright (c) 2006 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 KTH 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 KTH AND ITS 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 KTH OR ITS 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 <common.h>
RCSID("$Id: common.c 18900 2006-11-03 05:21:01Z lha $");
krb5_error_code
store_string(krb5_storage *sp, const char *str)
{
size_t len = strlen(str) + 1;
krb5_error_code ret;
ret = krb5_store_int32(sp, len);
if (ret)
return ret;
ret = krb5_storage_write(sp, str, len);
if (ret != len)
return EINVAL;
return 0;
}
static void
add_list(char ****list, size_t *listlen, char **str, size_t len)
{
size_t i;
*list = erealloc(*list, sizeof(**list) * (*listlen + 1));
(*list)[*listlen] = ecalloc(len, sizeof(**list));
for (i = 0; i < len; i++)
(*list)[*listlen][i] = str[i];
(*listlen)++;
}
static void
permute(char ****list, size_t *listlen,
char **str, const int start, const int len)
{
int i, j;
#define SWAP(s,i,j) { char *t = str[i]; str[i] = str[j]; str[j] = t; }
for (i = start; i < len - 1; i++) {
for (j = i+1; j < len; j++) {
SWAP(str,i,j);
permute(list, listlen, str, i+1, len);
SWAP(str,i,j);
}
}
add_list(list, listlen, str, len);
}
char ***
permutate_all(struct getarg_strings *strings, size_t *size)
{
char **list, ***all = NULL;
int i;
*size = 0;
list = ecalloc(strings->num_strings, sizeof(*list));
for (i = 0; i < strings->num_strings; i++)
list[i] = strings->strings[i];
permute(&all, size, list, 0, strings->num_strings);
free(list);
return all;
}

View File

@ -0,0 +1,112 @@
/*
* Copyright (c) 2006 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 KTH 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 KTH AND ITS 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 KTH OR ITS 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: common.h 18250 2006-10-06 07:22:00Z lha $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/*
* pthread support is disable because the pthread
* test have no "application pthread libflags" variable,
* when this is fixed pthread support can be enabled again.
*/
#undef ENABLE_PTHREAD_SUPPORT
#include <sys/param.h>
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <assert.h>
#include <krb5.h>
#include <gssapi.h>
#include <unistd.h>
#include <roken.h>
#include <getarg.h>
#include "protocol.h"
krb5_error_code store_string(krb5_storage *, const char *);
#define ret16(_client, num) \
do { \
if (krb5_ret_int16((_client)->sock, &(num)) != 0) \
errx(1, "krb5_ret_int16 " #num); \
} while(0)
#define ret32(_client, num) \
do { \
if (krb5_ret_int32((_client)->sock, &(num)) != 0) \
errx(1, "krb5_ret_int32 " #num); \
} while(0)
#define retdata(_client, data) \
do { \
if (krb5_ret_data((_client)->sock, &(data)) != 0) \
errx(1, "krb5_ret_data " #data); \
} while(0)
#define retstring(_client, data) \
do { \
if (krb5_ret_string((_client)->sock, &(data)) != 0) \
errx(1, "krb5_ret_data " #data); \
} while(0)
#define put32(_client, num) \
do { \
if (krb5_store_int32((_client)->sock, num) != 0) \
errx(1, "krb5_store_int32 " #num); \
} while(0)
#define putdata(_client, data) \
do { \
if (krb5_store_data((_client)->sock, data) != 0) \
errx(1, "krb5_store_data " #data); \
} while(0)
#define putstring(_client, str) \
do { \
if (store_string((_client)->sock, str) != 0) \
errx(1, "krb5_store_str " #str); \
} while(0)
char *** permutate_all(struct getarg_strings *, size_t *);

View File

@ -0,0 +1,851 @@
/*
* Copyright (c) 2006 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 KTH 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 KTH AND ITS 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 KTH OR ITS 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 <common.h>
RCSID("$Id: gssmaestro.c 21605 2007-07-17 06:51:57Z lha $");
static FILE *logfile;
/*
*
*/
struct client {
char *name;
struct sockaddr *sa;
socklen_t salen;
krb5_storage *sock;
int32_t capabilities;
char *target_name;
char *moniker;
krb5_storage *logsock;
int have_log;
#ifdef ENABLE_PTHREAD_SUPPORT
pthread_t thr;
#else
pid_t child;
#endif
};
static struct client **clients;
static int num_clients;
static int
init_sec_context(struct client *client,
int32_t *hContext, int32_t *hCred,
int32_t flags,
const char *targetname,
const krb5_data *itoken, krb5_data *otoken)
{
int32_t val;
krb5_data_zero(otoken);
put32(client, eInitContext);
put32(client, *hContext);
put32(client, *hCred);
put32(client, flags);
putstring(client, targetname);
putdata(client, *itoken);
ret32(client, *hContext);
ret32(client, val);
retdata(client, *otoken);
return val;
}
static int
accept_sec_context(struct client *client,
int32_t *hContext,
int32_t flags,
const krb5_data *itoken,
krb5_data *otoken,
int32_t *hDelegCred)
{
int32_t val;
krb5_data_zero(otoken);
put32(client, eAcceptContext);
put32(client, *hContext);
put32(client, flags);
putdata(client, *itoken);
ret32(client, *hContext);
ret32(client, val);
retdata(client, *otoken);
ret32(client, *hDelegCred);
return val;
}
static int
acquire_cred(struct client *client,
const char *username,
const char *password,
int32_t flags,
int32_t *hCred)
{
int32_t val;
put32(client, eAcquireCreds);
putstring(client, username);
putstring(client, password);
put32(client, flags);
ret32(client, val);
ret32(client, *hCred);
return val;
}
static int
toast_resource(struct client *client,
int32_t hCred)
{
int32_t val;
put32(client, eToastResource);
put32(client, hCred);
ret32(client, val);
return val;
}
static int
goodbye(struct client *client)
{
put32(client, eGoodBye);
return GSMERR_OK;
}
static int
get_targetname(struct client *client,
char **target)
{
put32(client, eGetTargetName);
retstring(client, *target);
return GSMERR_OK;
}
static int32_t
encrypt_token(struct client *client, int32_t hContext, int32_t flags,
krb5_data *in, krb5_data *out)
{
int32_t val;
put32(client, eEncrypt);
put32(client, hContext);
put32(client, flags);
put32(client, 0);
putdata(client, *in);
ret32(client, val);
retdata(client, *out);
return val;
}
static int32_t
decrypt_token(struct client *client, int32_t hContext, int flags,
krb5_data *in, krb5_data *out)
{
int32_t val;
put32(client, eDecrypt);
put32(client, hContext);
put32(client, flags);
put32(client, 0);
putdata(client, *in);
ret32(client, val);
retdata(client, *out);
return val;
}
static int32_t
get_mic(struct client *client, int32_t hContext,
krb5_data *in, krb5_data *mic)
{
int32_t val;
put32(client, eSign);
put32(client, hContext);
put32(client, 0);
put32(client, 0);
putdata(client, *in);
ret32(client, val);
retdata(client, *mic);
return val;
}
static int32_t
verify_mic(struct client *client, int32_t hContext,
krb5_data *in, krb5_data *mic)
{
int32_t val;
put32(client, eVerify);
put32(client, hContext);
put32(client, 0);
put32(client, 0);
putdata(client, *in);
putdata(client, *mic);
ret32(client, val);
return val;
}
static int32_t
get_version_capa(struct client *client,
int32_t *version, int32_t *capa,
char **version_str)
{
put32(client, eGetVersionAndCapabilities);
ret32(client, *version);
ret32(client, *capa);
retstring(client, *version_str);
return GSMERR_OK;
}
static int32_t
get_moniker(struct client *client,
char **moniker)
{
put32(client, eGetMoniker);
retstring(client, *moniker);
return GSMERR_OK;
}
static int
wait_log(struct client *c)
{
int32_t port;
struct sockaddr_storage sast;
socklen_t salen = sizeof(sast);
int fd, fd2, ret;
memset(&sast, 0, sizeof(sast));
assert(sizeof(sast) >= c->salen);
fd = socket(c->sa->sa_family, SOCK_STREAM, 0);
if (fd < 0)
err(1, "failed to build socket for %s's logging port", c->moniker);
((struct sockaddr *)&sast)->sa_family = c->sa->sa_family;
ret = bind(fd, (struct sockaddr *)&sast, c->salen);
if (ret < 0)
err(1, "failed to bind %s's logging port", c->moniker);
if (listen(fd, SOMAXCONN) < 0)
err(1, "failed to listen %s's logging port", c->moniker);
salen = sizeof(sast);
ret = getsockname(fd, (struct sockaddr *)&sast, &salen);
if (ret < 0)
err(1, "failed to get address of local socket for %s", c->moniker);
port = socket_get_port((struct sockaddr *)&sast);
put32(c, eSetLoggingSocket);
put32(c, ntohs(port));
salen = sizeof(sast);
fd2 = accept(fd, (struct sockaddr *)&sast, &salen);
if (fd2 < 0)
err(1, "failed to accept local socket for %s", c->moniker);
close(fd);
return fd2;
}
static int
build_context(struct client *ipeer, struct client *apeer,
int32_t flags, int32_t hCred,
int32_t *iContext, int32_t *aContext, int32_t *hDelegCred)
{
int32_t val = GSMERR_ERROR, ic = 0, ac = 0, deleg = 0;
krb5_data itoken, otoken;
int iDone = 0, aDone = 0;
int step = 0;
int first_call = 0x80;
if (apeer->target_name == NULL)
errx(1, "apeer %s have no target name", apeer->name);
krb5_data_zero(&itoken);
while (!iDone || !aDone) {
if (iDone) {
warnx("iPeer already done, aPeer want extra rtt");
val = GSMERR_ERROR;
goto out;
}
val = init_sec_context(ipeer, &ic, &hCred, flags|first_call,
apeer->target_name, &itoken, &otoken);
step++;
switch(val) {
case GSMERR_OK:
iDone = 1;
if (aDone)
continue;
break;
case GSMERR_CONTINUE_NEEDED:
break;
default:
warnx("iPeer %s failed with %d (step %d)",
ipeer->name, (int)val, step);
goto out;
}
if (aDone) {
warnx("aPeer already done, iPeer want extra rtt");
val = GSMERR_ERROR;
goto out;
}
val = accept_sec_context(apeer, &ac, flags|first_call,
&otoken, &itoken, &deleg);
step++;
switch(val) {
case GSMERR_OK:
aDone = 1;
if (iDone)
continue;
break;
case GSMERR_CONTINUE_NEEDED:
break;
default:
warnx("aPeer %s failed with %d (step %d)",
apeer->name, (int)val, step);
val = GSMERR_ERROR;
goto out;
}
first_call = 0;
val = GSMERR_OK;
}
if (iContext == NULL || val != GSMERR_OK) {
if (ic)
toast_resource(ipeer, ic);
if (iContext)
*iContext = 0;
} else
*iContext = ic;
if (aContext == NULL || val != GSMERR_OK) {
if (ac)
toast_resource(apeer, ac);
if (aContext)
*aContext = 0;
} else
*aContext = ac;
if (hDelegCred == NULL || val != GSMERR_OK) {
if (deleg)
toast_resource(apeer, deleg);
if (hDelegCred)
*hDelegCred = 0;
} else
*hDelegCred = deleg;
out:
return val;
}
static void
test_mic(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2)
{
krb5_data msg, mic;
int32_t val;
msg.data = "foo";
msg.length = 3;
krb5_data_zero(&mic);
val = get_mic(c1, hc1, &msg, &mic);
if (val)
errx(1, "get_mic failed to host: %s", c1->moniker);
val = verify_mic(c2, hc2, &msg, &mic);
if (val)
errx(1, "verify_mic failed to host: %s", c2->moniker);
krb5_data_free(&mic);
}
static int32_t
test_wrap(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2,
int conf)
{
krb5_data msg, wrapped, out;
int32_t val;
msg.data = "foo";
msg.length = 3;
krb5_data_zero(&wrapped);
krb5_data_zero(&out);
val = encrypt_token(c1, hc1, conf, &msg, &wrapped);
if (val) {
warnx("encrypt_token failed to host: %s", c1->moniker);
return val;
}
val = decrypt_token(c2, hc2, conf, &wrapped, &out);
if (val) {
krb5_data_free(&wrapped);
warnx("decrypt_token failed to host: %s", c2->moniker);
return val;
}
if (msg.length != out.length) {
warnx("decrypted'ed token have wrong length (%lu != %lu)",
(unsigned long)msg.length, (unsigned long)out.length);
val = GSMERR_ERROR;
} else if (memcmp(msg.data, out.data, msg.length) != 0) {
warnx("decryptd'ed token have wrong data");
val = GSMERR_ERROR;
}
krb5_data_free(&wrapped);
krb5_data_free(&out);
return val;
}
static int32_t
test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2)
{
int32_t val;
int i;
for (i = 0; i < 10; i++) {
test_mic(c1, hc1, c2, hc2);
test_mic(c2, hc2, c1, hc1);
val = test_wrap(c1, hc1, c2, hc2, 0);
if (val) return val;
val = test_wrap(c2, hc2, c1, hc1, 0);
if (val) return val;
val = test_wrap(c1, hc1, c2, hc2, 1);
if (val) return val;
val = test_wrap(c2, hc2, c1, hc1, 1);
if (val) return val;
}
return GSMERR_OK;
}
static int
log_function(void *ptr)
{
struct client *c = ptr;
int32_t cmd, line;
char *file, *string;
while (1) {
if (krb5_ret_int32(c->logsock, &cmd))
goto out;
switch (cmd) {
case eLogSetMoniker:
if (krb5_ret_string(c->logsock, &file))
goto out;
free(file);
break;
case eLogInfo:
case eLogFailure:
if (krb5_ret_string(c->logsock, &file))
goto out;
if (krb5_ret_int32(c->logsock, &line))
goto out;
if (krb5_ret_string(c->logsock, &string))
goto out;
printf("%s:%lu: %s\n",
file, (unsigned long)line, string);
fprintf(logfile, "%s:%lu: %s\n",
file, (unsigned long)line, string);
fflush(logfile);
free(file);
free(string);
if (krb5_store_int32(c->logsock, 0))
goto out;
break;
default:
errx(1, "client send bad log command: %d", (int)cmd);
}
}
out:
return 0;
}
static void
connect_client(const char *slave)
{
char *name, *port;
struct client *c = ecalloc(1, sizeof(*c));
struct addrinfo hints, *res0, *res;
int ret, fd;
name = estrdup(slave);
port = strchr(name, ':');
if (port == NULL)
errx(1, "port missing from %s", name);
*port++ = 0;
c->name = estrdup(slave);
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
ret = getaddrinfo(name, port, &hints, &res0);
if (ret)
errx(1, "error resolving %s", name);
for (res = res0, fd = -1; res; res = res->ai_next) {
fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (fd < 0)
continue;
if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) {
close(fd);
fd = -1;
continue;
}
c->sa = ecalloc(1, res->ai_addrlen);
memcpy(c->sa, res->ai_addr, res->ai_addrlen);
c->salen = res->ai_addrlen;
break; /* okay we got one */
}
if (fd < 0)
err(1, "connect to host: %s", name);
freeaddrinfo(res);
c->sock = krb5_storage_from_fd(fd);
close(fd);
if (c->sock == NULL)
errx(1, "krb5_storage_from_fd");
{
int32_t version;
char *str = NULL;
get_version_capa(c, &version, &c->capabilities, &str);
if (str) {
free(str);
}
if (c->capabilities & HAS_MONIKER)
get_moniker(c, &c->moniker);
else
c->moniker = c->name;
if (c->capabilities & ISSERVER)
get_targetname(c, &c->target_name);
}
if (logfile) {
int fd;
printf("starting log socket to client %s\n", c->moniker);
fd = wait_log(c);
c->logsock = krb5_storage_from_fd(fd);
close(fd);
if (c->logsock == NULL)
errx(1, "failed to create log krb5_storage");
#ifdef ENABLE_PTHREAD_SUPPORT
pthread_create(&c->thr, NULL, log_function, c);
#else
c->child = fork();
if (c->child == -1)
errx(1, "failed to fork");
else if (c->child == 0) {
log_function(c);
fclose(logfile);
exit(0);
}
#endif
}
clients = erealloc(clients, (num_clients + 1) * sizeof(*clients));
clients[num_clients] = c;
num_clients++;
free(name);
}
static struct client *
get_client(const char *slave)
{
size_t i;
for (i = 0; i < num_clients; i++)
if (strcmp(slave, clients[i]->name) == 0)
return clients[i];
errx(1, "failed to find client %s", slave);
}
/*
*
*/
static int version_flag;
static int help_flag;
static char *logfile_str;
static getarg_strings principals;
static getarg_strings slaves;
struct getargs args[] = {
{ "principals", 0, arg_strings, &principals, "Test principal",
NULL },
{ "slaves", 0, arg_strings, &slaves, "Slaves",
NULL },
{ "log-file", 0, arg_string, &logfile_str, "Logfile",
NULL },
{ "version", 0, arg_flag, &version_flag, "Print version",
NULL },
{ "help", 0, arg_flag, &help_flag, NULL,
NULL }
};
static void
usage(int ret)
{
arg_printusage (args,
sizeof(args) / sizeof(args[0]),
NULL,
"");
exit (ret);
}
int
main(int argc, char **argv)
{
int optidx= 0;
char *user;
char *password;
char ***list, **p;
size_t num_list, i, j, k;
int failed = 0;
setprogname (argv[0]);
if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx))
usage (1);
if (help_flag)
usage (0);
if (version_flag) {
print_version (NULL);
return 0;
}
if (optidx != argc)
usage (1);
if (principals.num_strings == 0)
errx(1, "no principals");
user = estrdup(principals.strings[0]);
password = strchr(user, ':');
if (password == NULL)
errx(1, "password missing from %s", user);
*password++ = 0;
if (slaves.num_strings == 0)
errx(1, "no principals");
if (logfile_str) {
printf("open logfile %s\n", logfile_str);
logfile = fopen(logfile_str, "w+");
if (logfile == NULL)
err(1, "failed to open: %s", logfile_str);
}
/*
*
*/
list = permutate_all(&slaves, &num_list);
/*
* Set up connection to all clients
*/
printf("Connecting to slaves\n");
for (i = 0; i < slaves.num_strings; i++)
connect_client(slaves.strings[i]);
/*
* Test acquire credentials
*/
printf("Test acquire credentials\n");
for (i = 0; i < slaves.num_strings; i++) {
int32_t hCred, val;
val = acquire_cred(clients[i], user, password, 1, &hCred);
if (val != GSMERR_OK) {
warnx("Failed to acquire_cred on host %s: %d",
clients[i]->moniker, (int)val);
failed = 1;
} else
toast_resource(clients[i], hCred);
}
if (failed)
goto out;
/*
* First test if all slaves can build context to them-self.
*/
printf("Self context tests\n");
for (i = 0; i < num_clients; i++) {
int32_t hCred, val, delegCred;
int32_t clientC, serverC;
struct client *c = clients[i];
if (c->target_name == NULL)
continue;
printf("%s connects to self using %s\n",
c->moniker, c->target_name);
val = acquire_cred(c, user, password, 1, &hCred);
if (val != GSMERR_OK)
errx(1, "failed to acquire_cred: %d", (int)val);
val = build_context(c, c,
GSS_C_REPLAY_FLAG|GSS_C_SEQUENCE_FLAG|
GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG|
GSS_C_DELEG_FLAG|GSS_C_MUTUAL_FLAG,
hCred, &clientC, &serverC, &delegCred);
if (val == GSMERR_OK) {
test_token(c, clientC, c, serverC);
toast_resource(c, clientC);
toast_resource(c, serverC);
if (delegCred)
toast_resource(c, delegCred);
} else {
warnx("build_context failed: %d", (int)val);
}
/*
*
*/
val = build_context(c, c,
GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG,
hCred, &clientC, &serverC, &delegCred);
if (val == GSMERR_OK) {
test_token(c, clientC, c, serverC);
toast_resource(c, clientC);
toast_resource(c, serverC);
if (delegCred)
toast_resource(c, delegCred);
} else {
warnx("build_context failed: %d", (int)val);
}
toast_resource(c, hCred);
}
/*
* Build contexts though all entries in each lists, including the
* step from the last entry to the first, ie treat the list as a
* circle.
*
* Only follow the delegated credential, but test "all"
* flags. (XXX only do deleg|mutual right now.
*/
printf("\"All\" permutation tests\n");
for (i = 0; i < num_list; i++) {
int32_t hCred, val, delegCred = 0;
int32_t clientC = 0, serverC = 0;
struct client *client, *server;
p = list[i];
client = get_client(p[0]);
val = acquire_cred(client, user, password, 1, &hCred);
if (val != GSMERR_OK)
errx(1, "failed to acquire_cred: %d", (int)val);
for (j = 1; j < num_clients + 1; j++) {
server = get_client(p[j % num_clients]);
if (server->target_name == NULL)
break;
for (k = 1; k < j; k++)
printf("\t");
printf("%s -> %s\n", client->moniker, server->moniker);
val = build_context(client, server,
GSS_C_REPLAY_FLAG|GSS_C_SEQUENCE_FLAG|
GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG|
GSS_C_DELEG_FLAG|GSS_C_MUTUAL_FLAG,
hCred, &clientC, &serverC, &delegCred);
if (val != GSMERR_OK) {
warnx("build_context failed: %d", (int)val);
break;
}
val = test_token(client, clientC, server, serverC);
if (val)
break;
toast_resource(client, clientC);
toast_resource(server, serverC);
if (!delegCred) {
warnx("no delegated cred on %s", server->moniker);
break;
}
toast_resource(client, hCred);
hCred = delegCred;
client = server;
}
if (hCred)
toast_resource(client, hCred);
}
/*
* Close all connections to clients
*/
out:
printf("sending goodbye and waiting for log sockets\n");
for (i = 0; i < num_clients; i++) {
goodbye(clients[i]);
if (clients[i]->logsock) {
#ifdef ENABLE_PTHREAD_SUPPORT
pthread_join(&clients[i]->thr, NULL);
#else
waitpid(clients[i]->child, NULL, 0);
#endif
}
}
printf("done\n");
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,286 @@
/*
* Copyright (c) 2006 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 KTH 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 KTH AND ITS 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 KTH OR ITS 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: protocol.h 18352 2006-10-08 13:53:28Z lha $
*/
/* missing from tests:
* - export context
* - import context
*/
/*
* wire encodings:
* int16: number, 2 bytes, in network order
* int32: number, 4 bytes, in network order
* length-encoded: [int32 length, data of length bytes]
* string: [int32 length, string of length + 1 bytes, includes trailing '\0' ]
*/
enum gssMaggotErrorCodes {
GSMERR_OK = 0,
GSMERR_ERROR,
GSMERR_CONTINUE_NEEDED,
GSMERR_INVALID_TOKEN,
GSMERR_AP_MODIFIED,
GSMERR_TEST_ISSUE,
GSMERR_NOT_SUPPORTED
};
/*
* input:
* int32: message OP (enum gssMaggotProtocol)
* ...
*
* return: -- on error
* int32: not support (GSMERR_NOT_SUPPORTED)
*
* return: -- on existing message OP
* int32: support (GSMERR_OK) -- only sent for extensions
* ...
*/
#define GSSMAGGOTPROTOCOL 14
enum gssMaggotOp {
eGetVersionInfo = 0,
/*
* input:
* none
* return:
* int32: last version handled
*/
eGoodBye,
/*
* input:
* none
* return:
* close socket
*/
eInitContext,
/*
* input:
* int32: hContext
* int32: hCred
* int32: Flags
* the lowest 0x7f flags maps directly to GSS-API flags
* DELEGATE 0x001
* MUTUAL_AUTH 0x002
* REPLAY_DETECT 0x004
* SEQUENCE_DETECT 0x008
* CONFIDENTIALITY 0x010
* INTEGRITY 0x020
* ANONYMOUS 0x040
*
* FIRST_CALL 0x080
*
* NTLM 0x100
* SPNEGO 0x200
* length-encoded: targetname
* length-encoded: token
* return:
* int32: hNewContextId
* int32: gssapi status val
* length-encoded: output token
*/
eAcceptContext,
/*
* input:
* int32: hContext
* int32: Flags -- unused ?
* flags are same as flags for eInitContext
* length-encoded: token
* return:
* int32: hNewContextId
* int32: gssapi status val
* length-encoded: output token
* int32: delegation cred id
*/
eToastResource,
/*
* input:
* int32: hResource
* return:
* int32: gsm status val
*/
eAcquireCreds,
/*
* input:
* string: principal name
* string: password
* int32: flags
* FORWARDABLE 0x001
* DEFAULT_CREDS 0x002
*
* NTLM 0x100
* SPNEGO 0x200
* return:
* int32: gsm status val
* int32: hCred
*/
eEncrypt,
/*
* input:
* int32: hContext
* int32: flags -- unused
* int32: seqno -- unused
* length-encode: plaintext
* return:
* int32: gsm status val
* length-encode: ciphertext
*/
eDecrypt,
/*
* input:
* int32: hContext
* int32: flags -- unused
* int32: seqno -- unused
* length-encode: ciphertext
* return:
* int32: gsm status val
* length-encode: plaintext
*/
eSign,
/* message same as eEncrypt */
eVerify,
/*
* input:
* int32: hContext
* int32: flags -- unused
* int32: seqno -- unused
* length-encode: message
* length-encode: signature
* return:
* int32: gsm status val
*/
eGetVersionAndCapabilities,
/*
* return:
* int32: protocol version
* int32: capability flags */
#define ISSERVER 0x01
#define ISKDC 0x02
#define MS_KERBEROS 0x04
#define LOGSERVER 0x08
#define HAS_MONIKER 0x10
/* string: version string
*/
eGetTargetName,
/*
* return:
* string: target principal name
*/
eSetLoggingSocket,
/*
* input:
* int32: hostPort
* return to the port on the host:
* int32: opcode - for example eLogSetMoniker
*/
eChangePassword,
/* here ended version 7 of the protocol */
/*
* input:
* string: principal name
* string: old password
* string: new password
* return:
* int32: gsm status val
*/
eSetPasswordSelf,
/* same as eChangePassword */
eWrap,
/* message same as eEncrypt */
eUnwrap,
/* message same as eDecrypt */
eConnectLoggingService2,
/*
* return1:
* int16: log port number
* int32: master log prototocol version (0)
*
* wait for master to connect on the master log socket
*
* return2:
* int32: gsm connection status
* int32: maggot log prototocol version (2)
*/
eGetMoniker,
/*
* return:
* string: moniker (Nickname the master can refer to maggot)
*/
eCallExtension,
/*
* input:
* string: extension name
* int32: message id
* return:
* int32: gsm status val
*/
eAcquirePKInitCreds,
/*
* input:
* int32: flags
* length-encode: certificate (pkcs12 data)
* return:
* int32: hResource
* int32: gsm status val (GSMERR_NOT_SUPPORTED)
*/
/* here ended version 7 of the protocol */
eLastProtocolMessage
};
enum gssMaggotLogOp{
eLogInfo = 0,
/*
string: File
int32: Line
string: message
reply:
int32: ackid
*/
eLogFailure,
/*
string: File
int32: Line
string: message
reply:
int32: ackid
*/
eLogSetMoniker
/*
string: moniker
*/
};

View File

@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.5 2000/11/15 22:51:08 assar Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
include $(top_srcdir)/Makefile.am.common
@ -13,6 +13,8 @@ kf_SOURCES = kf.c kf_locl.h
kfd_SOURCES = kfd.c kf_locl.h
LDADD = $(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_des) \
$(LIB_hcrypto) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken)
EXTRA_DIST = $(man_MANS)

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.5 2000/11/15 22:51:08 assar Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(kf_SOURCES) $(kfd_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,6 +36,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -51,16 +46,14 @@ libexec_PROGRAMS = kfd$(EXEEXT)
subdir = appl/kf
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -73,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -81,19 +75,24 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
@ -110,17 +109,18 @@ kfd_LDADD = $(LDADD)
kfd_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \
$(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(kf_SOURCES) $(kfd_SOURCES)
DIST_SOURCES = $(kf_SOURCES) $(kfd_SOURCES)
man1dir = $(mandir)/man1
@ -130,13 +130,7 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -146,8 +140,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -158,11 +150,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -170,42 +161,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -223,12 +199,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -238,15 +211,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -255,6 +227,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -266,15 +239,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -282,74 +250,79 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -366,19 +339,21 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
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 \
$(LIB_des) \
$(LIB_hcrypto) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken)
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -410,7 +385,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -438,7 +413,7 @@ clean-binPROGRAMS:
done
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(libexecdir)" || $(mkdir_p) "$(DESTDIR)$(libexecdir)"
test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -466,10 +441,10 @@ clean-libexecPROGRAMS:
done
kf$(EXEEXT): $(kf_OBJECTS) $(kf_DEPENDENCIES)
@rm -f kf$(EXEEXT)
$(LINK) $(kf_LDFLAGS) $(kf_OBJECTS) $(kf_LDADD) $(LIBS)
$(LINK) $(kf_OBJECTS) $(kf_LDADD) $(LIBS)
kfd$(EXEEXT): $(kfd_OBJECTS) $(kfd_DEPENDENCIES)
@rm -f kfd$(EXEEXT)
$(LINK) $(kfd_LDFLAGS) $(kfd_OBJECTS) $(kfd_LDADD) $(LIBS)
$(LINK) $(kfd_OBJECTS) $(kfd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -491,13 +466,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -542,7 +513,7 @@ uninstall-man1:
done
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -606,9 +577,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -633,23 +606,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../.. $(distdir)/../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -669,7 +640,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -690,7 +661,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -703,7 +674,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -719,14 +690,22 @@ install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man: install-man1 install-man8
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -746,26 +725,33 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
uninstall-libexecPROGRAMS uninstall-man
uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
uninstall-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man1 uninstall-man8
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool ctags distclean distclean-compile \
clean-libtool ctags dist-hook distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am \
install-libexecPROGRAMS install-man install-man1 install-man8 \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-info-am \
uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \
uninstall-man8
install-binPROGRAMS install-data install-data-am \
install-data-hook install-dvi install-dvi-am install-exec \
install-exec-am install-exec-hook install-html install-html-am \
install-info install-info-am install-libexecPROGRAMS \
install-man install-man1 install-man8 install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-hook uninstall-libexecPROGRAMS uninstall-man \
uninstall-man1 uninstall-man8
install-suid-programs:
@ -780,8 +766,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -791,19 +777,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -819,7 +817,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -889,14 +887,39 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
# 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

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: kf.1,v 1.6 2003/04/11 12:43:57 lha Exp $
.\" $Id: kf.1 11986 2003-04-11 12:43:57Z lha $
.\"
.Dd July 2, 2000
.Dt KF 1

View File

@ -32,7 +32,7 @@
*/
#include "kf_locl.h"
RCSID("$Id: kf.c,v 1.17 2002/09/05 15:00:03 joda Exp $");
RCSID("$Id: kf.c 11400 2002-09-05 15:00:03Z joda $");
krb5_context context;
static int help_flag;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
/* $Id: kf_locl.h,v 1.3 2002/09/04 20:29:04 joda Exp $ */
/* $Id: kf_locl.h 11376 2002-09-04 20:29:04Z joda $ */
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: kfd.8,v 1.4 2003/02/16 21:10:05 lha Exp $
.\" $Id: kfd.8 11648 2003-02-16 21:10:32Z lha $
.\"
.Dd July 2, 2000
.Dt KFD 8

View File

@ -32,7 +32,7 @@
*/
#include "kf_locl.h"
RCSID("$Id: kfd.c,v 1.11 2003/04/16 15:40:24 lha Exp $");
RCSID("$Id: kfd.c 15246 2005-05-27 13:47:20Z lha $");
krb5_context context;
char krb5_tkfile[MAXPATHLEN];
@ -112,7 +112,7 @@ kfd_match_version(const void *arg, const char *version)
version[0] == '0' &&
version[1] == '.' &&
(version[2] == '4' || version[2] == '3') &&
islower(version[3])) {
islower((unsigned char)version[3])) {
protocol_version = 0;
return TRUE;
}
@ -235,7 +235,8 @@ proto (int sock, const char *service)
if (tk_file.length != 1)
snprintf (ccname, sizeof(ccname), "%s", (char *)(tk_file.data));
else
snprintf (ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%u",pwd->pw_uid);
snprintf (ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%lu",
(unsigned long)pwd->pw_uid);
status = krb5_cc_resolve (context, ccname, &ccache);
if (status) {

View File

@ -1,8 +1,79 @@
2006-12-05 Love Hörnquist Åstrand <lha@it.su.se>
* limits_conf.c: Clear errno before calling the strtol
functions. From Paul Stoeber to OpenBSD by Ray Lai and Björn
Sandell.
* limits_conf.c: Report to syslog strings that start with NUL;
prevents negative index array access. Ray Lai of OpenBSD via Björn
Sandell.
2006-10-07 Love Hörnquist Åstrand <lha@it.su.se>
* Makefile.am: Add man_MANS to EXTRA_DIST
2006-09-22 Love Hörnquist Åstrand <lha@it.su.se>
* read_string.c: try to not call signaction for signal 0 and use
NSIG if it exists to determin how many signals there exists, also,
only restore those signalhandlers that we got out.
2006-04-27 Love Hörnquist Åstrand <lha@it.su.se>
* login_locl.h: Include "loginpaths.h"
* loginpaths.h: Shared paths between login and rshd.
2006-01-09 Johan Danielsson <joda@blubb.pdc.kth.se>
* login.c: log successful logins
2005-08-08 Love Hörnquist Åstrand <lha@it.su.se>
* login.c (do_login): only do krb4_get_afs_tokens if we have done
v4 authentication or done a 5to4 conversion of tickets. This is to
avoid delays on a realm that only support Kerberos 5 and drop
Kerberos 4 requests.
2005-05-10 Dave Love <fx@gnu.org>
* login.c: Include <crypt.h>.
2005-05-02 Dave Love <fx@gnu.org>
* limits_conf.c: Check RLIMIT_MEMLOCK, not RLIMIT_LOCK.
2005-04-28 Dave Love <fx@gnu.org>
* limits_conf.c: Maybe include sys/resource.h. Use various
RLIMIT_ macros conditionally. For Solaris, Irix and Tru64.
2005-04-22 Johan Danielsson <joda@pdc.kth.se>
* login.1: document limits.conf
* Makefile.am: limits_conf.c
* login_locl.h: template for limits.conf
* login.c: read limits.conf (from /etc/security by default,
overridable in login.conf)
* limits_conf.c: implement a parser for limits.conf
2004-09-08 Johan Danielsson <joda@pdc.kth.se>
* login.c: pull up 1.62->1.63: use krb5_appdefault_boolean instead
of krb5_config_get_bool
* login.c: use krb5_appdefault_boolean instead of
krb5_config_get_bool
2003-09-03 Love Hörnquist Åstrand <lha@it.su.se>
* login.c (krb5_to4): set client princ of the mcred
2003-07-07 Love Hörnquist Åstrand <lha@it.su.se>
* login.c (krb5_to4): use krb5_cc_clear_mcred
2003-03-24 Johan Danielsson <joda@pdc.kth.se>
* Makefile.am: install man pages

View File

@ -1,8 +1,8 @@
# $Id: Makefile.am,v 1.21 2003/03/24 16:15:48 joda Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
include $(top_srcdir)/Makefile.am.common
INCLUDES += $(INCLUDE_krb4)
AM_CPPFLAGS += $(INCLUDE_krb4)
man_MANS = login.1 login.access.5
@ -15,6 +15,8 @@ login_SOURCES = \
login_access.c \
login_locl.h \
login_protos.h \
loginpaths.h \
limits_conf.c \
osfc2.c \
read_string.c \
shadow.c \
@ -27,7 +29,7 @@ LDADD = $(LIB_otp) \
$(LIB_kafs) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_hcrypto) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken) \
$(LIB_security) \
@ -37,3 +39,5 @@ $(srcdir)/login_protos.h:
cd $(srcdir); perl ../../cf/make-proto.pl -o login_protos.h -q -P comment $(login_SOURCES) || rm -f login_protos.h
$(login_OBJECTS): $(srcdir)/login_protos.h
EXTRA_DIST = $(man_MANS)

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006 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.
@ -14,23 +14,17 @@
@SET_MAKE@
# $Id: Makefile.am,v 1.21 2003/03/24 16:15:48 joda Exp $
# $Id: Makefile.am 20466 2007-04-20 08:29:05Z lha $
# $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $
# $Id: Makefile.am.common 10998 2002-05-19 18:35:37Z joda $
# $Id: Makefile.am.common,v 1.37.2.2 2003/10/13 13:15:39 joda Exp $
# $Id: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
SOURCES = $(login_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -42,6 +36,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/Makefile.am.common \
@ -50,16 +45,14 @@ bin_PROGRAMS = login$(EXEEXT)
subdir = appl/login
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/auth-modules.m4 \
$(top_srcdir)/cf/auth-modules.m4 $(top_srcdir)/cf/autobuild.m4 \
$(top_srcdir)/cf/broken-getaddrinfo.m4 \
$(top_srcdir)/cf/broken-getnameinfo.m4 \
$(top_srcdir)/cf/broken-glob.m4 \
$(top_srcdir)/cf/broken-realloc.m4 \
$(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \
$(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \
$(top_srcdir)/cf/capabilities.m4 \
$(top_srcdir)/cf/check-compile-et.m4 \
$(top_srcdir)/cf/check-declaration.m4 \
$(top_srcdir)/cf/check-getpwnam_r-posix.m4 \
$(top_srcdir)/cf/check-man.m4 \
$(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \
@ -72,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/find-func-no-libs2.m4 \
$(top_srcdir)/cf/find-func.m4 \
$(top_srcdir)/cf/find-if-not-broken.m4 \
$(top_srcdir)/cf/framework-security.m4 \
$(top_srcdir)/cf/have-struct-field.m4 \
$(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \
$(top_srcdir)/cf/krb-bigendian.m4 \
@ -80,25 +74,30 @@ am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \
$(top_srcdir)/cf/krb-readline.m4 \
$(top_srcdir)/cf/krb-struct-spwd.m4 \
$(top_srcdir)/cf/krb-struct-winsize.m4 \
$(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \
$(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \
$(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/proto-compat.m4 \
$(top_srcdir)/cf/retsigtype.m4 $(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/sunos.m4 $(top_srcdir)/cf/telnet.m4 \
$(top_srcdir)/cf/test-package.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/with-all.m4 $(top_srcdir)/configure.in
$(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/mips-abi.m4 \
$(top_srcdir)/cf/misc.m4 $(top_srcdir)/cf/need-proto.m4 \
$(top_srcdir)/cf/osfc2.m4 $(top_srcdir)/cf/otp.m4 \
$(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \
$(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \
$(top_srcdir)/cf/roken-frag.m4 \
$(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \
$(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \
$(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \
$(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
"$(DESTDIR)$(man5dir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
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_access.$(OBJEXT) limits_conf.$(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)
am__DEPENDENCIES_1 =
@ -109,17 +108,18 @@ login_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
$(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include
DEFAULT_INCLUDES = -I. -I$(top_builddir)/include@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(login_SOURCES)
DIST_SOURCES = $(login_SOURCES)
man1dir = $(mandir)/man1
@ -129,13 +129,7 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AIX4_FALSE = @AIX4_FALSE@
AIX4_TRUE = @AIX4_TRUE@
AIX_DYNAMIC_AFS_FALSE = @AIX_DYNAMIC_AFS_FALSE@
AIX_DYNAMIC_AFS_TRUE = @AIX_DYNAMIC_AFS_TRUE@
AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@
AIX_FALSE = @AIX_FALSE@
AIX_TRUE = @AIX_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@ -145,8 +139,6 @@ AWK = @AWK@
CANONICAL_HOST = @CANONICAL_HOST@
CATMAN = @CATMAN@
CATMANEXT = @CATMANEXT@
CATMAN_FALSE = @CATMAN_FALSE@
CATMAN_TRUE = @CATMAN_TRUE@
CC = @CC@
CFLAGS = @CFLAGS@
COMPILE_ET = @COMPILE_ET@
@ -157,11 +149,10 @@ CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBLIB = @DBLIB@
DCE_FALSE = @DCE_FALSE@
DCE_TRUE = @DCE_TRUE@
DEFS = @DEFS@
DIR_com_err = @DIR_com_err@
DIR_des = @DIR_des@
DIR_hcrypto = @DIR_hcrypto@
DIR_hdbdir = @DIR_hdbdir@
DIR_roken = @DIR_roken@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
@ -169,42 +160,27 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXTRA_LIB45 = @EXTRA_LIB45@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
GROFF = @GROFF@
HAVE_DB1_FALSE = @HAVE_DB1_FALSE@
HAVE_DB1_TRUE = @HAVE_DB1_TRUE@
HAVE_DB3_FALSE = @HAVE_DB3_FALSE@
HAVE_DB3_TRUE = @HAVE_DB3_TRUE@
HAVE_DLOPEN_FALSE = @HAVE_DLOPEN_FALSE@
HAVE_DLOPEN_TRUE = @HAVE_DLOPEN_TRUE@
HAVE_NDBM_FALSE = @HAVE_NDBM_FALSE@
HAVE_NDBM_TRUE = @HAVE_NDBM_TRUE@
HAVE_OPENSSL_FALSE = @HAVE_OPENSSL_FALSE@
HAVE_OPENSSL_TRUE = @HAVE_OPENSSL_TRUE@
HAVE_X_FALSE = @HAVE_X_FALSE@
HAVE_X_TRUE = @HAVE_X_TRUE@
INCLUDES_roken = @INCLUDES_roken@
INCLUDE_des = @INCLUDE_des@
INCLUDE_hcrypto = @INCLUDE_hcrypto@
INCLUDE_hesiod = @INCLUDE_hesiod@
INCLUDE_krb4 = @INCLUDE_krb4@
INCLUDE_openldap = @INCLUDE_openldap@
INCLUDE_readline = @INCLUDE_readline@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IRIX_FALSE = @IRIX_FALSE@
IRIX_TRUE = @IRIX_TRUE@
KRB4_FALSE = @KRB4_FALSE@
KRB4_TRUE = @KRB4_TRUE@
KRB5_FALSE = @KRB5_FALSE@
KRB5_TRUE = @KRB5_TRUE@
LDFLAGS = @LDFLAGS@
LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
LIBADD_roken = @LIBADD_roken@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -222,12 +198,9 @@ LIB_crypt = @LIB_crypt@
LIB_db_create = @LIB_db_create@
LIB_dbm_firstkey = @LIB_dbm_firstkey@
LIB_dbopen = @LIB_dbopen@
LIB_des = @LIB_des@
LIB_des_a = @LIB_des_a@
LIB_des_appl = @LIB_des_appl@
LIB_des_so = @LIB_des_so@
LIB_dlopen = @LIB_dlopen@
LIB_dn_expand = @LIB_dn_expand@
LIB_door_create = @LIB_door_create@
LIB_el_init = @LIB_el_init@
LIB_freeaddrinfo = @LIB_freeaddrinfo@
LIB_gai_strerror = @LIB_gai_strerror@
@ -237,15 +210,14 @@ LIB_gethostbyname2 = @LIB_gethostbyname2@
LIB_getnameinfo = @LIB_getnameinfo@
LIB_getpwnam_r = @LIB_getpwnam_r@
LIB_getsockopt = @LIB_getsockopt@
LIB_hcrypto = @LIB_hcrypto@
LIB_hcrypto_a = @LIB_hcrypto_a@
LIB_hcrypto_appl = @LIB_hcrypto_appl@
LIB_hcrypto_so = @LIB_hcrypto_so@
LIB_hesiod = @LIB_hesiod@
LIB_hstrerror = @LIB_hstrerror@
LIB_kdb = @LIB_kdb@
LIB_krb4 = @LIB_krb4@
LIB_krb_disable_debug = @LIB_krb_disable_debug@
LIB_krb_enable_debug = @LIB_krb_enable_debug@
LIB_krb_get_kdc_time_diff = @LIB_krb_get_kdc_time_diff@
LIB_krb_get_our_ip_for_realm = @LIB_krb_get_our_ip_for_realm@
LIB_krb_kdctimeofday = @LIB_krb_kdctimeofday@
LIB_loadquery = @LIB_loadquery@
LIB_logout = @LIB_logout@
LIB_logwtmp = @LIB_logwtmp@
@ -254,6 +226,7 @@ LIB_openpty = @LIB_openpty@
LIB_otp = @LIB_otp@
LIB_pidfile = @LIB_pidfile@
LIB_readline = @LIB_readline@
LIB_res_ndestroy = @LIB_res_ndestroy@
LIB_res_nsearch = @LIB_res_nsearch@
LIB_res_search = @LIB_res_search@
LIB_roken = @LIB_roken@
@ -265,15 +238,10 @@ LIB_tgetent = @LIB_tgetent@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@
NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@
MKDIR_P = @MKDIR_P@
NROFF = @NROFF@
OBJEXT = @OBJEXT@
OTP_FALSE = @OTP_FALSE@
OTP_TRUE = @OTP_TRUE@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -281,74 +249,80 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PTHREADS_CFLAGS = @PTHREADS_CFLAGS@
PTHREADS_LIBS = @PTHREADS_LIBS@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONING = @VERSIONING@
VOID_RETSIGTYPE = @VOID_RETSIGTYPE@
WFLAGS = @WFLAGS@
WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@
WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
YACC = @YACC@
ac_ct_AR = @ac_ct_AR@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
do_roken_rename_FALSE = @do_roken_rename_FALSE@
do_roken_rename_TRUE = @do_roken_rename_TRUE@
datarootdir = @datarootdir@
docdir = @docdir@
dpagaix_cflags = @dpagaix_cflags@
dpagaix_ldadd = @dpagaix_ldadd@
dpagaix_ldflags = @dpagaix_ldflags@
el_compat_FALSE = @el_compat_FALSE@
el_compat_TRUE = @el_compat_TRUE@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
have_err_h_FALSE = @have_err_h_FALSE@
have_err_h_TRUE = @have_err_h_TRUE@
have_fnmatch_h_FALSE = @have_fnmatch_h_FALSE@
have_fnmatch_h_TRUE = @have_fnmatch_h_TRUE@
have_glob_h_FALSE = @have_glob_h_FALSE@
have_glob_h_TRUE = @have_glob_h_TRUE@
have_ifaddrs_h_FALSE = @have_ifaddrs_h_FALSE@
have_ifaddrs_h_TRUE = @have_ifaddrs_h_TRUE@
have_vis_h_FALSE = @have_vis_h_FALSE@
have_vis_h_TRUE = @have_vis_h_TRUE@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
SUFFIXES = .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
INCLUDES = -I$(top_builddir)/include $(INCLUDES_roken) $(INCLUDE_krb4)
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUFFIXES = .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken) \
$(INCLUDE_krb4)
@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME
AM_CFLAGS = $(WFLAGS)
CP = cp
@ -365,6 +339,7 @@ LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la
@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
@KRB5_TRUE@LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
man_MANS = login.1 login.access.5
login_SOURCES = \
@ -374,6 +349,8 @@ login_SOURCES = \
login_access.c \
login_locl.h \
login_protos.h \
loginpaths.h \
limits_conf.c \
osfc2.c \
read_string.c \
shadow.c \
@ -386,16 +363,17 @@ LDADD = $(LIB_otp) \
$(LIB_kafs) \
$(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_krb4) \
$(LIB_des) \
$(LIB_hcrypto) \
$(top_builddir)/lib/asn1/libasn1.la \
$(LIB_roken) \
$(LIB_security) \
$(DBLIB)
EXTRA_DIST = $(man_MANS)
all: all-am
.SUFFIXES:
.SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
.SUFFIXES: .et .h .x .z .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -427,7 +405,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@ -455,7 +433,7 @@ clean-binPROGRAMS:
done
login$(EXEEXT): $(login_OBJECTS) $(login_DEPENDENCIES)
@rm -f login$(EXEEXT)
$(LINK) $(login_LDFLAGS) $(login_OBJECTS) $(login_LDADD) $(LIBS)
$(LINK) $(login_OBJECTS) $(login_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -477,13 +455,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -528,7 +502,7 @@ uninstall-man1:
done
install-man5: $(man5_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@ -592,9 +566,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
@ -619,23 +595,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../.. $(distdir)/../../cf
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@ -655,7 +629,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(MANS) all-local
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -676,7 +650,7 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -688,7 +662,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -704,14 +678,22 @@ install-data-am: install-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-info: install-info-am
install-man: install-man1 install-man5
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -731,23 +713,30 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
uninstall-am: uninstall-binPROGRAMS uninstall-man
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
uninstall-man: uninstall-man1 uninstall-man5
.MAKE: install-am install-data-am install-exec-am install-strip \
uninstall-am
.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
clean clean-binPROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
dist-hook distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-man1 \
install-man5 install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-info-am \
uninstall-man uninstall-man1 uninstall-man5
install-data install-data-am install-data-hook install-dvi \
install-dvi-am install-exec install-exec-am install-exec-hook \
install-html install-html-am install-info install-info-am \
install-man install-man1 install-man5 install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-hook uninstall-man uninstall-man1 uninstall-man5
install-suid-programs:
@ -762,8 +751,8 @@ install-suid-programs:
install-exec-hook: install-suid-programs
install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
@foo='$(include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
for f in $$foo; do \
f=`basename $$f`; \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
@ -773,19 +762,31 @@ install-build-headers:: $(include_HEADERS) $(build_HEADERZ)
echo " $(CP) $$file $(buildinclude)/$$f"; \
$(CP) $$file $(buildinclude)/$$f; \
fi ; \
done ; \
foo='$(nobase_include_HEADERS)'; \
for f in $$foo; do \
if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
else file="$$f"; fi; \
$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
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
check-local::
@if test '$(CHECK_LOCAL)'; then \
@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
foo=''; elif test '$(CHECK_LOCAL)'; then \
foo='$(CHECK_LOCAL)'; else \
foo='$(PROGRAMS)'; fi; \
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 \
if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
echo "PASS: $$i"; \
else \
echo "FAIL: $$i"; \
@ -801,7 +802,7 @@ check-local::
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0; \
test "$$failed" -eq 0 || exit 1; \
fi
.x.c:
@ -871,15 +872,40 @@ dist-cat8-mans:
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)
$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
uninstall-cat-mans:
$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans
.et.h:
$(COMPILE_ET) $<
.et.c:
$(COMPILE_ET) $<
#
# Useful target for debugging
#
check-valgrind:
tobjdir=`cd $(top_builddir) && pwd` ; \
tsrcdir=`cd $(top_srcdir) && pwd` ; \
env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#
distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" != .; then \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
fi ; \
done
$(srcdir)/login_protos.h:
cd $(srcdir); perl ../../cf/make-proto.pl -o login_protos.h -q -P comment $(login_SOURCES) || rm -f login_protos.h

View File

@ -32,7 +32,7 @@
#include "login_locl.h"
RCSID("$Id: conf.c,v 1.3 2000/05/29 16:52:24 assar Exp $");
RCSID("$Id: conf.c 8302 2000-05-29 16:52:24Z assar $");
static char *confbuf;

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