diff options
author | edwin <edwin@FreeBSD.org> | 2004-01-03 15:28:00 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2004-01-03 15:28:00 +0800 |
commit | 2dc74094504c9d68bba6e93dbb25e7814af08024 (patch) | |
tree | d2927efcd8dcf317977687c72a8b3a190fb6de43 /ftp/tnftpd/files | |
parent | b3baceeb3c814755412b6ab183aaeb4df1920fcb (diff) | |
download | freebsd-ports-gnome-2dc74094504c9d68bba6e93dbb25e7814af08024.tar.gz freebsd-ports-gnome-2dc74094504c9d68bba6e93dbb25e7814af08024.tar.zst freebsd-ports-gnome-2dc74094504c9d68bba6e93dbb25e7814af08024.zip |
New port: ftp/tnftpd (obsoletes ftp/lukemftpd)
tnftpd (formerly known as lukemftpd) is a port of the
enhanced NetBSD ftp server to other systems
PR: ports/55229
Submitted by: Alex Vasylenko <lxv@send-pr.sink.omut.org>
Diffstat (limited to 'ftp/tnftpd/files')
-rw-r--r-- | ftp/tnftpd/files/patch-src-logwtmp.c | 29 | ||||
-rw-r--r-- | ftp/tnftpd/files/patch-tnftpd.h | 12 |
2 files changed, 41 insertions, 0 deletions
diff --git a/ftp/tnftpd/files/patch-src-logwtmp.c b/ftp/tnftpd/files/patch-src-logwtmp.c new file mode 100644 index 000000000000..928f910f9ad6 --- /dev/null +++ b/ftp/tnftpd/files/patch-src-logwtmp.c @@ -0,0 +1,29 @@ +--- src/logwtmp.c-orig Sun Feb 23 22:38:44 2003 ++++ src/logwtmp.c Sun Aug 3 15:53:32 2003 +@@ -78,6 +78,26 @@ + struct utmp ut; + struct stat buf; + ++ if (strlen(host) > UT_HOSTSIZE) { ++ struct addrinfo hints, *res; ++ int error; ++ static char hostbuf[BUFSIZ]; ++ ++ memset(&hints, 0, sizeof(hints)); ++ hints.ai_family = PF_UNSPEC; ++ error = getaddrinfo(host, NULL, &hints, &res); ++ if (error) ++ host = "invalid hostname"; ++ else { ++ getnameinfo(res->ai_addr, res->ai_addrlen, ++ hostbuf, sizeof(hostbuf), NULL, 0, ++ NI_NUMERICHOST); ++ host = hostbuf; ++ if (strlen(host) > UT_HOSTSIZE) ++ host[UT_HOSTSIZE] = '\0'; ++ } ++ } ++ + if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0) + return; + if (fstat(fd, &buf) == 0) { diff --git a/ftp/tnftpd/files/patch-tnftpd.h b/ftp/tnftpd/files/patch-tnftpd.h new file mode 100644 index 000000000000..018a2a02e118 --- /dev/null +++ b/ftp/tnftpd/files/patch-tnftpd.h @@ -0,0 +1,12 @@ +--- tnftpd.h-orig Wed Feb 26 19:16:13 2003 ++++ tnftpd.h Sun Aug 3 15:49:57 2003 +@@ -404,6 +404,8 @@ + #define SECSPERDAY 86400 + #define TM_YEAR_BASE 1900 + +-#if ! defined(LOGIN_NAME_MAX) ++#if defined(MAXLOGNAME) ++# define LOGIN_NAME_MAX MAXLOGNAME ++#elif ! defined(LOGIN_NAME_MAX) + # define LOGIN_NAME_MAX (9) + #endif |