diff options
author | nectar <nectar@FreeBSD.org> | 2003-10-09 19:36:20 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-10-09 19:36:20 +0000 |
commit | 5c90662d441c12cd30c694eb1172d6fea2f8f282 (patch) | |
tree | cb08d962a1d1ff9fd191e67849a7057861f42a50 /crypto/heimdal/appl/ftp/ftpd | |
parent | 12eb3dee85137da9effa7d2df35e855dd0a3814a (diff) | |
download | FreeBSD-src-5c90662d441c12cd30c694eb1172d6fea2f8f282.zip FreeBSD-src-5c90662d441c12cd30c694eb1172d6fea2f8f282.tar.gz |
Vendor import of Heimdal 0.6.
Diffstat (limited to 'crypto/heimdal/appl/ftp/ftpd')
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/Makefile.in | 38 | ||||
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/ftpd.8 | 4 | ||||
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/ftpd.c | 13 | ||||
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/ftpd_locl.h | 5 | ||||
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/gss_userok.c | 6 | ||||
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/ls.c | 4 | ||||
-rw-r--r-- | crypto/heimdal/appl/ftp/ftpd/pathnames.h | 3 |
7 files changed, 36 insertions, 37 deletions
diff --git a/crypto/heimdal/appl/ftp/ftpd/Makefile.in b/crypto/heimdal/appl/ftp/ftpd/Makefile.in index 90f8209..33e3c36 100644 --- a/crypto/heimdal/appl/ftp/ftpd/Makefile.in +++ b/crypto/heimdal/appl/ftp/ftpd/Makefile.in @@ -18,7 +18,7 @@ # $Id: Makefile.am.common,v 1.5 2002/05/19 18:35:37 joda Exp $ -# $Id: Makefile.am.common,v 1.36 2002/08/19 16:10:25 joda Exp $ +# $Id: Makefile.am.common,v 1.37.2.1 2003/05/08 17:08:09 joda Exp $ SHELL = @SHELL@ srcdir = @srcdir@ @@ -114,6 +114,7 @@ LIB_roken = @LIB_roken@ LIB_security = @LIB_security@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ NEED_WRITEAUTH_FALSE = @NEED_WRITEAUTH_FALSE@ NEED_WRITEAUTH_TRUE = @NEED_WRITEAUTH_TRUE@ NROFF = @NROFF@ @@ -192,7 +193,7 @@ LIB_readline = @LIB_readline@ NROFF_MAN = groff -mandoc -Tascii -@KRB4_TRUE@LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) +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 @@ -251,18 +252,13 @@ am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) logwtmp.$(OBJEXT) \ $(am__objects_1) $(am__objects_2) ftpd_OBJECTS = $(am_ftpd_OBJECTS) ftpd_LDADD = $(LDADD) -@KRB4_FALSE@@KRB5_TRUE@ftpd_DEPENDENCIES = ../common/libcommon.a \ -@KRB4_FALSE@@KRB5_TRUE@ $(top_builddir)/lib/gssapi/libgssapi.la \ -@KRB4_FALSE@@KRB5_TRUE@ $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB4_FALSE@@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la -@KRB4_FALSE@@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a -@KRB4_TRUE@@KRB5_TRUE@ftpd_DEPENDENCIES = ../common/libcommon.a \ -@KRB4_TRUE@@KRB5_TRUE@ $(top_builddir)/lib/gssapi/libgssapi.la \ -@KRB4_TRUE@@KRB5_TRUE@ $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB4_TRUE@@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la \ -@KRB4_TRUE@@KRB5_TRUE@ $(top_builddir)/lib/kafs/libkafs.la -@KRB4_TRUE@@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a \ -@KRB4_TRUE@@KRB5_FALSE@ $(top_builddir)/lib/kafs/libkafs.la +@KRB5_TRUE@ftpd_DEPENDENCIES = ../common/libcommon.a \ +@KRB5_TRUE@ $(top_builddir)/lib/gssapi/libgssapi.la \ +@KRB5_TRUE@ $(top_builddir)/lib/krb5/libkrb5.la \ +@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la \ +@KRB5_TRUE@ $(top_builddir)/lib/kafs/libkafs.la +@KRB5_FALSE@ftpd_DEPENDENCIES = ../common/libcommon.a \ +@KRB5_FALSE@ $(top_builddir)/lib/kafs/libkafs.la ftpd_LDFLAGS = DEFS = @DEFS@ @@ -291,10 +287,10 @@ all: all-am .SUFFIXES: .SUFFIXES: .et .h .x .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj .y -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --foreign appl/ftp/ftpd/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-libexecPROGRAMS: $(libexec_PROGRAMS) @@ -565,7 +561,9 @@ info: info-am info-am: -install-data-am: install-data-local install-man +install-data-am: install-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-libexecPROGRAMS @$(NORMAL_INSTALL) @@ -594,8 +592,8 @@ uninstall-man: uninstall-man5 uninstall-man8 clean-generic clean-libexecPROGRAMS clean-libtool distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-exec install-exec-am install-info install-info-am \ + 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 \ @@ -728,7 +726,7 @@ dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans install-cat-mans: $(SHELL) $(top_srcdir)/cf/install-catman.sh "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) -install-data-local: install-cat-mans +install-data-hook: install-cat-mans .et.h: $(COMPILE_ET) $< diff --git a/crypto/heimdal/appl/ftp/ftpd/ftpd.8 b/crypto/heimdal/appl/ftp/ftpd/ftpd.8 index 5539d56..01f6275 100644 --- a/crypto/heimdal/appl/ftp/ftpd/ftpd.8 +++ b/crypto/heimdal/appl/ftp/ftpd/ftpd.8 @@ -269,7 +269,7 @@ interprets file names according to the .Dq globbing conventions used by .Xr csh 1 . -This allows users to utilize the metacharacters +This allows users to use the metacharacters .Dq Li \&*?[]{}~ . .Pp .Nm Ftpd @@ -281,7 +281,7 @@ If Kerberos authentication is used, the user must pass valid tickets and the principal must be allowed to login as the remote user. .It The login name must be in the password data base, and not have a null -password (if kerberos is used the password field is not checked). In +password (if Kerberos is used the password field is not checked). In this case a password must be provided by the client before any file operations may be performed. If the user has an OTP key, the response from a successful USER command will include an OTP challenge. The diff --git a/crypto/heimdal/appl/ftp/ftpd/ftpd.c b/crypto/heimdal/appl/ftp/ftpd/ftpd.c index c1720ba..9598362 100644 --- a/crypto/heimdal/appl/ftp/ftpd/ftpd.c +++ b/crypto/heimdal/appl/ftp/ftpd/ftpd.c @@ -38,7 +38,7 @@ #endif #include "getarg.h" -RCSID("$Id: ftpd.c,v 1.161 2002/02/28 15:50:14 joda Exp $"); +RCSID("$Id: ftpd.c,v 1.166 2003/04/16 15:02:05 lha Exp $"); static char version[] = "Version 6.00"; @@ -322,7 +322,7 @@ main(int argc, char **argv) if(sp) port = sp->s_port; else - if(isdigit(port_string[0])) + if(isdigit((unsigned char)port_string[0])) port = htons(atoi(port_string)); else warnx("bad value for -p"); @@ -871,12 +871,9 @@ krb5_verify(struct passwd *pwd, char *passwd) 1, NULL); krb5_free_principal(context, princ); -#ifdef KRB4 if (k_hasafs()) { - k_setpag(); krb5_afslog_uid_home(context, id,NULL, NULL,pwd->pw_uid, pwd->pw_dir); } -#endif /* KRB4 */ krb5_cc_destroy(context, id); krb5_free_context (context); if(ret) @@ -1106,9 +1103,9 @@ done: int filename_check(char *filename) { - char *p; + unsigned char *p; - p = strrchr(filename, '/'); + p = (unsigned char *)strrchr(filename, '/'); if(p) filename = p + 1; @@ -1248,7 +1245,7 @@ bad: static int accept_with_timeout(int socket, struct sockaddr *address, - size_t *address_len, + socklen_t *address_len, struct timeval *timeout) { int ret; diff --git a/crypto/heimdal/appl/ftp/ftpd/ftpd_locl.h b/crypto/heimdal/appl/ftp/ftpd/ftpd_locl.h index 1497b43..67a02f5 100644 --- a/crypto/heimdal/appl/ftp/ftpd/ftpd_locl.h +++ b/crypto/heimdal/appl/ftp/ftpd/ftpd_locl.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. */ -/* $Id: ftpd_locl.h,v 1.12 2000/09/19 13:16:44 assar Exp $ */ +/* $Id: ftpd_locl.h,v 1.13 2003/03/18 13:37:13 lha Exp $ */ #ifndef __ftpd_locl_h__ #define __ftpd_locl_h__ @@ -148,6 +148,9 @@ #ifdef KRB4 #include <krb.h> +#endif + +#if defined(KRB4) || defined(KRB5) #include <kafs.h> #endif diff --git a/crypto/heimdal/appl/ftp/ftpd/gss_userok.c b/crypto/heimdal/appl/ftp/ftpd/gss_userok.c index ec263d0..11a2e75 100644 --- a/crypto/heimdal/appl/ftp/ftpd/gss_userok.c +++ b/crypto/heimdal/appl/ftp/ftpd/gss_userok.c @@ -35,7 +35,7 @@ #include <gssapi.h> #include <krb5.h> -RCSID("$Id: gss_userok.c,v 1.8 2001/08/05 06:38:57 assar Exp $"); +RCSID("$Id: gss_userok.c,v 1.10 2003/03/18 13:56:35 lha Exp $"); /* XXX a bit too much of krb5 dependency here... What is the correct way to do this? @@ -103,11 +103,9 @@ gss_userok(void *app_data, char *username) chown (ticketfile+5, pw->pw_uid, pw->pw_gid); -#ifdef KRB4 if (k_hasafs()) { - krb5_afslog(gssapi_krb5_context, ccache, 0, 0); + krb5_afslog(gssapi_krb5_context, ccache, 0, 0); } -#endif esetenv ("KRB5CCNAME", ticketfile, 1); fail: diff --git a/crypto/heimdal/appl/ftp/ftpd/ls.c b/crypto/heimdal/appl/ftp/ftpd/ls.c index 0a3c994..f8ec4ad 100644 --- a/crypto/heimdal/appl/ftp/ftpd/ls.c +++ b/crypto/heimdal/appl/ftp/ftpd/ls.c @@ -33,7 +33,7 @@ #ifndef TEST #include "ftpd_locl.h" -RCSID("$Id: ls.c,v 1.25 2002/08/22 08:31:03 joda Exp $"); +RCSID("$Id: ls.c,v 1.26 2003/02/25 10:51:30 lha Exp $"); #else #include <stdio.h> @@ -268,7 +268,7 @@ make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags) } if(S_ISLNK(st->st_mode)) { int n; - n = readlink((char *)filename, buf, sizeof(buf)); + n = readlink((char *)filename, buf, sizeof(buf) - 1); if(n >= 0) { buf[n] = '\0'; file->link = strdup(buf); diff --git a/crypto/heimdal/appl/ftp/ftpd/pathnames.h b/crypto/heimdal/appl/ftp/ftpd/pathnames.h index 62ce103..e4f5b44 100644 --- a/crypto/heimdal/appl/ftp/ftpd/pathnames.h +++ b/crypto/heimdal/appl/ftp/ftpd/pathnames.h @@ -49,7 +49,10 @@ #define _PATH_BSHELL "/bin/sh" #endif +#ifndef _PATH_FTPUSERS #define _PATH_FTPUSERS SYSCONFDIR "/ftpusers" +#endif + #define _PATH_FTPCHROOT SYSCONFDIR "/ftpchroot" #define _PATH_FTPWELCOME SYSCONFDIR "/ftpwelcome" #define _PATH_FTPLOGINMESG SYSCONFDIR "/motd" |