diff options
| author | Mark Eichin <eichin@mit.edu> | 1996-03-13 20:05:52 +0000 |
|---|---|---|
| committer | Mark Eichin <eichin@mit.edu> | 1996-03-13 20:05:52 +0000 |
| commit | e6c5957eba6884feb311d242ef26859c1cb5ed59 (patch) | |
| tree | b4e9bf2dd8843c499871ef32aaa721efe44dc3cc /src | |
| parent | 1183f46c2c97a6e08bd1b4f93eef836d2550a0f0 (diff) | |
| download | krb5-e6c5957eba6884feb311d242ef26859c1cb5ed59.tar.gz krb5-e6c5957eba6884feb311d242ef26859c1cb5ed59.tar.xz krb5-e6c5957eba6884feb311d242ef26859c1cb5ed59.zip | |
update from cygnus sources. Get local hostname in a consistent manner,
so we ask for the right local service name.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7622 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/appl/gssftp/ftp/configure.in | 2 | ||||
| -rw-r--r-- | src/appl/gssftp/ftpd/Makefile.in | 1 | ||||
| -rw-r--r-- | src/appl/gssftp/ftpd/configure.in | 1 | ||||
| -rw-r--r-- | src/appl/gssftp/ftpd/ftpd.c | 10 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/appl/gssftp/ftp/configure.in b/src/appl/gssftp/ftp/configure.in index 5fe000144..95fff062c 100644 --- a/src/appl/gssftp/ftp/configure.in +++ b/src/appl/gssftp/ftp/configure.in @@ -3,6 +3,7 @@ CONFIG_RULES AC_CONST AC_PROG_INSTALL KRB5_SIGTYPE +USE_ANAME CHECK_SIGPROCMASK CHECK_WAIT_TYPE DECLARE_SYS_ERRLIST @@ -11,5 +12,6 @@ AC_HAVE_FUNCS(getcwd getdtablesize) AC_CHECK_HEADERS(sys/select.h) AC_HEADER_CHECK(termios.h,AC_FUNC_CHECK(cfsetispeed,AC_DEFINE(POSIX_TERMIOS))) AC_CHECK_HEADERS(stdlib.h) +KRB5_LIBRARIES V5_USE_SHARED_LIB V5_AC_OUTPUT_MAKEFILE diff --git a/src/appl/gssftp/ftpd/Makefile.in b/src/appl/gssftp/ftpd/Makefile.in index 666bf37b3..16dfeb157 100644 --- a/src/appl/gssftp/ftpd/Makefile.in +++ b/src/appl/gssftp/ftpd/Makefile.in @@ -41,6 +41,7 @@ install:: ${DESTDIR}$(SERVER_MANDIR)/`echo $$f|sed '$(transform)'`.8; \ done + ftpcmd.c: $(srcdir)/ftpcmd.y $(RM) ftpcmd.c y.tab.c $(YACC) $(srcdir)/ftpcmd.y diff --git a/src/appl/gssftp/ftpd/configure.in b/src/appl/gssftp/ftpd/configure.in index b8c99a007..2f60d9081 100644 --- a/src/appl/gssftp/ftpd/configure.in +++ b/src/appl/gssftp/ftpd/configure.in @@ -29,5 +29,6 @@ AC_SUBST([SETENVOBJ]) fi dnl USE_ANAME +KRB5_LIBRARIES V5_USE_SHARED_LIB V5_AC_OUTPUT_MAKEFILE diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c index 5a5a287a5..cb531ce82 100644 --- a/src/appl/gssftp/ftpd/ftpd.c +++ b/src/appl/gssftp/ftpd/ftpd.c @@ -1896,6 +1896,7 @@ char *data; char localname[MAXHOSTNAMELEN]; char service_name[MAXHOSTNAMELEN+10]; char **service; + struct hostent *hp; chan.initiator_addrtype = GSS_C_AF_INET; chan.initiator_address.length = 4; @@ -1920,7 +1921,14 @@ char *data; reply(501, "couldn't get local hostname (%d)\n", errno); syslog(LOG_ERR, "Couldn't get local hostname (%d)", errno); return 0; - } + } + if (!(hp = gethostbyname(localname))) { + extern int h_errno; + reply(501, "couldn't canonicalize local hostname (%d)\n", h_errno); + syslog(LOG_ERR, "Couldn't canonicalize local hostname (%d)", h_errno); + return 0; + } + strcpy(localname, hp->h_name); for (service = gss_services; *service; service++) { sprintf(service_name, "%s@%s", *service, localname); |
