1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
--- contrib/ls/print.c.orig 2005-01-11 10:04:34 UTC
+++ contrib/ls/print.c
@@ -681,12 +681,12 @@ printsize(size_t width, off_t bytes)
unit = unit_adjust(&dbytes);
if (dbytes == 0)
- (void)printf("%*s ", width, "0B");
+ (void)printf("%*s ", (int)width, "0B");
else
- (void)printf("%*.*f%c ", width - 1, dbytes > 10 ? 0 : 1,
+ (void)printf("%*.*f%c ", (int)(width - 1), dbytes > 10 ? 0 : 1,
dbytes, "BKMGTPE"[unit]);
} else
- (void)printf("%*jd ", width, (intmax_t)bytes);
+ (void)printf("%*jd ", (int)width, (intmax_t)bytes);
}
/*
--- ftp/extern.h.orig 2004-05-30 22:24:47 UTC
+++ ftp/extern.h
@@ -170,7 +170,7 @@ int togglevar __P((int, char **, int *,
void usage __P((void));
void user __P((int, char **));
-extern struct cmd cmdtab[];
+/*extern struct cmd cmdtab[];*/
extern FILE *cout;
extern int data;
extern char *home;
--- ftp/ftp_var.h.orig 2004-12-19 18:44:39 UTC
+++ ftp/ftp_var.h
@@ -201,6 +201,8 @@ int macnum; /* number of defined macro
struct macel macros[16];
char macbuf[4096];
+extern struct cmd cmdtab[];
+
#include "sslapp.h"
#include "ssl_port_ftps.h"
--- ftp/ftp.c.orig 2004-12-19 18:17:07 UTC
+++ ftp/ftp.c
@@ -132,7 +132,8 @@ hookup(host0, port)
const char *host0;
char *port;
{
- int s, len, tos, error;
+ socklen_t len;
+ int s, tos, error;
struct addrinfo hints, *res, *res0;
static char hostnamebuf[MAXHOSTNAMELEN];
static char hostaddrbuf[NI_MAXHOST];
@@ -1346,7 +1347,8 @@ int
initconn()
{
char *p, *a;
- int result, len, tmpno = 0;
+ socklen_t len;
+ int result, tmpno = 0;
int on = 1;
int error, ports;
u_int af;
@@ -1774,7 +1776,8 @@ dataconn(lmode)
const char *lmode;
{
union sockunion from;
- int s, fromlen, tos;
+ socklen_t fromlen;
+ int s, tos;
#ifdef USE_SSL
int ret;
char *ssl_version;
--- ftp/main.c.orig 2004-12-19 18:44:39 UTC
+++ ftp/main.c
@@ -102,15 +102,15 @@ bio_dump_cb(bio, cmd, argp, argi, argl,
if (out == NULL) return(ret);
if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
- BIO_printf(out, "read from %08X (%d bytes => %ld (%X))\n",
- bio, argi, ret, ret);
+/* BIO_printf(out, "read from %08X (%d bytes => %ld (%X))\n",
+ bio, argi, ret, ret);*/
BIO_dump(out,argp,(int)ret);
- BIO_flush(out);
+ (void)BIO_flush(out);
} else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
- BIO_printf(out, "write to %08X (%d bytes => %ld (%X))\n",
- bio, argi, ret, ret);
+/* BIO_printf(out, "write to %08X (%d bytes => %ld (%X))\n",
+ bio, argi, ret, ret);*/
BIO_dump(out, argp, (int)ret);
- BIO_flush(out);
+ (void)BIO_flush(out);
}
return((cmd & BIO_CB_RETURN) ? ret : 1);
}
@@ -121,7 +121,7 @@ set_ssl_trace(SSL *con)
if (con != NULL) {
if (ssl_debug_flag) {
BIO_set_callback(SSL_get_rbio(con), bio_dump_cb);
- BIO_set_callback_arg(SSL_get_rbio(con), bio_err);
+ BIO_set_callback_arg(SSL_get_rbio(con), (char *)bio_err);
}
}
return 0;
--- ftpd/ftpd.c.orig 2016-08-01 06:24:00 UTC
+++ ftpd/ftpd.c
@@ -3783,7 +3783,7 @@ myoob(void)
tv.tv_usec=0;
if (select(fileno(stdin)+1, &mask, NULL, NULL, &tv)) {
#endif /*USE_SSL*/
- if (getline(cp, 7, stdin) == NULL) {
+ if (get_line(cp, 7, stdin) == NULL) {
reply(221, "You could at least say goodbye.");
dologout(0);
}
--- port/bsd_prog.mk.orig 2003-04-05 09:42:20 UTC
+++ port/bsd_prog.mk
@@ -43,7 +43,8 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
${PROG}: ${OBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD}
-.else !defined(SRCS)
+.else
+#!defined(SRCS)
.if !target(${PROG})
SRCS= ${PROG}.c
--- ssl/sslapp.c.orig 2005-01-10 23:34:59 UTC
+++ ssl/sslapp.c
@@ -108,8 +108,8 @@ do_ssleay_init(int server)
* export things work... If so we generate one now!
*/
if (server) {
- const char ctx_sid[] = "BSDftpd-ssl";
- SSL_CTX_set_session_id_context(ssl_ctx, ctx_sid, strlen(ctx_sid));
+ const unsigned char ctx_sid[] = "BSDftpd-ssl";
+ SSL_CTX_set_session_id_context(ssl_ctx, ctx_sid, strlen((const char*)ctx_sid));
if (SSL_CTX_need_tmp_RSA(ssl_ctx)) {
RSA *rsa;
@@ -474,12 +474,12 @@ ssl_log_msg(BIO *bio, const char *fmt, .
va_end(ap);
if (outputbuf == NULL) {
BIO_printf(bio, "\r\nRan out of memory.\r\n");
- BIO_flush(bio);
+ (void)BIO_flush(bio);
return;
}
BIO_printf(bio, "%s", outputbuf);
- BIO_flush(bio);
+ (void)BIO_flush(bio);
free(outputbuf);
}
@@ -498,12 +498,12 @@ ssl_log_msgn(BIO *bio, const char *fmt,
va_end(ap);
if (outputbuf == NULL) {
BIO_printf(bio, "\r\nRan out of memory.\r\n");
- BIO_flush(bio);
+ (void)BIO_flush(bio);
return;
}
BIO_printf(bio, "\r\n%s\r\n", outputbuf);
- BIO_flush(bio);
+ (void)BIO_flush(bio);
free(outputbuf);
}
@@ -519,7 +519,7 @@ ssl_log_vwarn_common(BIO *bio, int debug
vasprintf(&tmp, fmt, ap);
if (tmp == NULL) {
BIO_printf(bio, "\r\nRan out of memory.\r\n");
- BIO_flush(bio);
+ (void)BIO_flush(bio);
if (ssl_logerr_syslog)
syslog(LOG_ERR, "Ran out of memory.");
return;
@@ -531,14 +531,14 @@ ssl_log_vwarn_common(BIO *bio, int debug
free(tmp);
if (outputbuf == NULL) {
BIO_printf(bio, "\r\nRan out of memory.\r\n");
- BIO_flush(bio);
+ (void)BIO_flush(bio);
if (ssl_logerr_syslog)
syslog(LOG_ERR, "Ran out of memory.");
return;
}
BIO_printf(bio, "%s\r\n", outputbuf);
- BIO_flush(bio);
+ (void)BIO_flush(bio);
if (ssl_logerr_syslog)
syslog(LOG_WARNING, "%s", outputbuf);
free(outputbuf);
|