View | Details | Raw Unified | Return to bug 169096
Collapse All | Expand All

(-)/amd/cs/91/9123034/testports/ftp/bsdftpd-ssl/Makefile (-7 / +3 lines)
Lines 7-16 Link Here
7
7
8
PORTNAME=	bsdftpd-ssl
8
PORTNAME=	bsdftpd-ssl
9
PORTVERSION=	1.1.0
9
PORTVERSION=	1.1.0
10
PORTREVISION=	2
10
PORTREVISION=	3
11
CATEGORIES=	ftp
11
CATEGORIES=	ftp
12
MASTER_SITES=	http://bsdftpd.org/files/bsdftpd-ssl/archive/1.1/src/
12
MASTER_SITES=	http://bsdftpd.org/files/bsdftpd-ssl/archive/1.1/src/ \
13
DISTNAME=	bsdftpd-ssl-${PORTVERSION}
13
		http://www.sourcefiles.org/System/Daemons/FTP/
14
14
15
MAINTAINER=	skynick@mail.sc.ru
15
MAINTAINER=	skynick@mail.sc.ru
16
16
Lines 18-27 Link Here
18
18
19
.include <bsd.port.pre.mk>
19
.include <bsd.port.pre.mk>
20
20
21
.if ${OSVERSION} > 900007
22
BROKEN=		fails to build with new utmpx
23
.endif
24
25
# Client only part
21
# Client only part
26
.if defined(CLIENT_ONLY)
22
.if defined(CLIENT_ONLY)
27
PKGNAMESUFFIX=	-client
23
PKGNAMESUFFIX=	-client
(-)/amd/cs/91/9123034/testports/ftp/bsdftpd-ssl/files/patch-ftpd-logwtmp.c (+72 lines)
Line 0 Link Here
1
diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c ftpd/logwtmp.c
2
--- bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c	2004-12-20 02:44:42.000000000 +0800
3
+++ ftpd/logwtmp.c	2012-06-15 15:34:03.000000000 +0800
4
@@ -48,13 +48,18 @@
5
 #include <arpa/inet.h>
6
 #include <sys/socket.h>
7
 
8
+#include <sys/param.h>
9
+#if __FreeBSD_version < 900007
10
 #include <fcntl.h>
11
 #include <time.h>
12
-#if 0 /* Original FreeBSD 5.0 code */
13
+#if 1 /* Original FreeBSD 5.0 code */
14
 #include <timeconv.h>
15
 #endif
16
 #include <netdb.h>
17
 #include <utmp.h>
18
+#else
19
+#include <utmpx.h>
20
+#endif
21
 #include <unistd.h>
22
 #include <stdio.h>
23
 #include <string.h>
24
@@ -63,6 +68,7 @@
25
 
26
 #include <port_base.h>
27
 
28
+#ifndef _UTMPX_H_
29
 static int fd = -1;
30
 
31
 /*
32
@@ -94,7 +100,7 @@
33
 		(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
34
 		(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
35
 		(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
36
-#if 0 /* Original FreeBSD 5.0 code */
37
+#if 1 /* Original FreeBSD 5.0 code */
38
 		ut.ut_time = _time_to_time32(time(NULL));
39
 #else /* Portable code from FreeBSD 4.8 */
40
 		(void)time(&ut.ut_time);
41
@@ -104,3 +110,31 @@
42
 			(void)ftruncate(fd, buf.st_size);
43
 	}
44
 }
45
+#else /* Original FreeBSD 9.0 code */
46
+void
47
+ftpd_logwtmp(char *id, char *user, struct sockaddr *addr)
48
+{
49
+	struct utmpx ut;
50
+
51
+	memset(&ut, 0, sizeof(ut));
52
+
53
+	if (user != NULL) {
54
+		/* Log in. */
55
+		ut.ut_type = USER_PROCESS;
56
+		(void)strncpy(ut.ut_user, user, sizeof(ut.ut_user));
57
+		if (addr != NULL)
58
+			realhostname_sa(ut.ut_host, sizeof(ut.ut_host),
59
+			    addr, addr->sa_len);
60
+	} else {
61
+		/* Log out. */
62
+		ut.ut_type = DEAD_PROCESS;
63
+	}
64
+
65
+	ut.ut_pid = getpid();
66
+	gettimeofday(&ut.ut_tv, NULL);
67
+	(void)strncpy(ut.ut_id, id, sizeof(ut.ut_id));
68
+	(void)strncpy(ut.ut_line, "ftpd", sizeof(ut.ut_line));
69
+
70
+	pututxline(&ut);
71
+}
72
+#endif
(-)/amd/cs/91/9123034/testports/ftp/bsdftpd-ssl/files/patch-gcc4 (-21 lines)
Lines 151-177 Link Here
151
 	char *p, *a;
151
 	char *p, *a;
152
 
152
 
153
 	if (pdata >= 0)		/* close old port if one set */
153
 	if (pdata >= 0)		/* close old port if one set */
154
diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c ftpd/logwtmp.c
155
--- bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c	2004-12-19 21:44:42.000000000 +0300
156
+++ ftpd/logwtmp.c	2007-08-26 15:37:16.000000000 +0400
157
@@ -50,7 +50,7 @@
158
 
159
 #include <fcntl.h>
160
 #include <time.h>
161
-#if 0 /* Original FreeBSD 5.0 code */
162
+#if 1 /* Original FreeBSD 5.0 code */
163
 #include <timeconv.h>
164
 #endif
165
 #include <netdb.h>
166
@@ -94,7 +94,7 @@
167
 		(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
168
 		(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
169
 		(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
170
-#if 0 /* Original FreeBSD 5.0 code */
171
+#if 1 /* Original FreeBSD 5.0 code */
172
 		ut.ut_time = _time_to_time32(time(NULL));
173
 #else /* Portable code from FreeBSD 4.8 */
174
 		(void)time(&ut.ut_time);
175
diff -urN bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk port/bsd_prog.mk
154
diff -urN bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk port/bsd_prog.mk
176
--- bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk	2003-04-05 13:42:20.000000000 +0400
155
--- bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk	2003-04-05 13:42:20.000000000 +0400
177
+++ port/bsd_prog.mk	2007-08-26 14:53:23.000000000 +0400
156
+++ port/bsd_prog.mk	2007-08-26 14:53:23.000000000 +0400

Return to bug 169096