diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2010-01-21 14:35:14 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2010-01-21 14:35:14 +0000 |
commit | 9dd0eb71794ddd0eab0e5ba62b6fef7b74d8812f (patch) | |
tree | 14c9f2945215b9fa657f701919c26467d3357c6a /ftp | |
parent | eaf16e2a952a689b512a749fefb61025243130be (diff) |
Notes
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/wu-ftpd/Makefile | 11 | ||||
-rw-r--r-- | ftp/wu-ftpd/files/logwtmp.c | 24 |
2 files changed, 33 insertions, 2 deletions
diff --git a/ftp/wu-ftpd/Makefile b/ftp/wu-ftpd/Makefile index 3342e8c31f8f..8ff8757675d7 100644 --- a/ftp/wu-ftpd/Makefile +++ b/ftp/wu-ftpd/Makefile @@ -9,7 +9,7 @@ PORTNAME= wu-ftpd PORTVERSION= 2.6.2 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= ftp MASTER_SITES= ftp://ftp.wu-ftpd.org/pub/wu-ftpd/ PATCH_SITES= ftp://ftp.wu-ftpd.org/pub/wu-ftpd/patches/apply_to_2.6.2/ @@ -39,4 +39,11 @@ MAN5= ftpaccess.5 ftphosts.5 ftpconversions.5 xferlog.5 \ ftpservers.5 MAN8= ftpd.8 ftpshut.8 ftprestart.8 privatepw.8 -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 900007 +post-patch: + ${CP} ${FILESDIR}/logwtmp.c ${WRKSRC}/src +.endif + +.include <bsd.port.post.mk> diff --git a/ftp/wu-ftpd/files/logwtmp.c b/ftp/wu-ftpd/files/logwtmp.c new file mode 100644 index 000000000000..81fcf8fc6d30 --- /dev/null +++ b/ftp/wu-ftpd/files/logwtmp.c @@ -0,0 +1,24 @@ +#include "config.h" +#include "proto.h" + +#include <utmpx.h> + +void +wu_logwtmp(char *line, char *name, char *host, int login) +{ + struct utmpx utx; + + memset(&utx, 0, sizeof(utx)); + utx.ut_pid = getpid(); + snprintf(utx.ut_id, sizeof utx.ut_id, "%xftp", utx.ut_pid); + gettimeofday(&utx.ut_tv, NULL); + if (login) { + utx.ut_type = USER_PROCESS; + strncpy(utx.ut_user, name, sizeof(utx.ut_user)); + strncpy(utx.ut_host, host, sizeof(utx.ut_host)); + strncpy(utx.ut_line, line, sizeof(utx.ut_line)); + } else { + utx.ut_type = DEAD_PROCESS; + } + pututxline(&utx); +} |