Make compile w/o krb4.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4684 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-03-26 23:46:03 +00:00
parent 50222176ef
commit 6d51cd1dfc
6 changed files with 67 additions and 9 deletions

View File

@@ -8,32 +8,45 @@ INCLUDES = -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER
libexec_PROGRAMS = ftpd
if KRB4
krb4_sources = $(EXTRA_ftpd_SOURCES)
else
krb4_sources =
endif
ftpd_SOURCES = \
ftpd.c \
ftpcmd.y \
logwtmp.c \
popen.c \
security.c \
krb4.c \
kauth.c \
$(krb4_sources) \
gssapi.c
EXTRA_ftpd_SOURCES = krb4.c kauth.c
$(ftpd_OBJECTS): security.h
security.c:
@test -f security.c || $(LN_S) $(srcdir)/../ftp/security.c .
security.h:
@test -f security.c || $(LN_S) $(srcdir)/../ftp/security.h .
@test -f security.h || $(LN_S) $(srcdir)/../ftp/security.h .
krb4.c:
@test -f security.c || $(LN_S) $(srcdir)/../ftp/krb4.c .
@test -f krb4.c || $(LN_S) $(srcdir)/../ftp/krb4.c .
gssapi.c:
@test -f security.c || $(LN_S) $(srcdir)/../ftp/gssapi.c .
@test -f gssapi.c || $(LN_S) $(srcdir)/../ftp/gssapi.c .
CLEANFILES = security.c security.h krb4.c gssapi.c
if KRB4
afslib = $(top_builddir)/lib/kafs/libkafs.a
else
afslib =
endif
LDADD = ../common/libcommon.a \
$(top_builddir)/lib/gssapi/libgssapi.a \
$(top_builddir)/lib/kafs/libkafs.a \
$(afslib) \
$(top_builddir)/lib/krb5/libkrb5.a \
$(top_builddir)/lib/des/libdes.a \
$(LIB_krb4) \

View File

@@ -493,6 +493,7 @@ cmd
| SITE SP KAUTH check_login SP STRING CRLF
{
#ifdef KRB4
char *p;
if(guest)
@@ -509,35 +510,55 @@ cmd
}
if($6 != NULL)
free($6);
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP KLIST check_login CRLF
{
#ifdef KRB4
if($4)
klist();
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP KDESTROY check_login CRLF
{
#ifdef KRB4
if($4)
kdestroy();
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP KRBTKFILE check_login SP STRING CRLF
{
#ifdef KRB4
if(guest)
reply(500, "Can't be done as guest.");
else if($4 && $6)
krbtkfile($6);
if($6)
free($6);
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP AFSLOG check_login CRLF
{
#ifdef KRB4
if(guest)
reply(500, "Can't be done as guest.");
else if($4)
afslog(NULL);
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP AFSLOG check_login SP STRING CRLF
{
#ifdef KRB4
if(guest)
reply(500, "Can't be done as guest.");
else if($4){
@@ -545,6 +566,9 @@ cmd
}
if($6)
free($6);
#else
reply(500, "Command not implemented.");
#endif
}
| SITE SP FIND check_login SP STRING CRLF
{

View File

@@ -1673,7 +1673,9 @@ dologout(int status)
if (logged_in) {
seteuid((uid_t)0);
ftpd_logwtmp(ttyline, "", "");
#ifdef KRB4
cond_kdestroy();
#endif
}
/* beware of flushing buffers after a SIGPIPE */
#ifdef XXX