mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
Fix collision with getline(3)
While here regen patches
This commit is contained in:
parent
de43b1e936
commit
b132dd99a0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419427
5 changed files with 87 additions and 98 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- contrib/libedit/makelist.orig 2001-12-17 07:55:26.000000000 +0800
|
--- contrib/libedit/makelist.orig 2001-12-16 23:55:26 UTC
|
||||||
+++ contrib/libedit/makelist 2007-08-31 20:32:51.000000000 +0800
|
+++ contrib/libedit/makelist
|
||||||
@@ -128,8 +128,8 @@
|
@@ -128,8 +128,8 @@ case $FLAG in
|
||||||
printf("#endif /* _h_help_c */\n");
|
printf("#endif /* _h_help_c */\n");
|
||||||
}' /dev/null;;
|
}' /dev/null;;
|
||||||
-fh)
|
-fh)
|
||||||
|
@ -11,5 +11,3 @@
|
||||||
BEGIN {
|
BEGIN {
|
||||||
printf("/* Automatically generated file, do not edit */\n");
|
printf("/* Automatically generated file, do not edit */\n");
|
||||||
printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
|
printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c ftpd/logwtmp.c
|
--- ftpd/logwtmp.c.orig 2004-12-19 18:44:42 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c 2004-12-20 02:44:42.000000000 +0800
|
+++ ftpd/logwtmp.c
|
||||||
+++ ftpd/logwtmp.c 2012-06-15 15:34:03.000000000 +0800
|
@@ -48,13 +48,18 @@ __FBSDID("$FreeBSD: src/libexec/ftpd/log
|
||||||
@@ -48,13 +48,18 @@
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
@ -21,7 +20,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c ftpd/logwtmp.c
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -63,6 +68,7 @@
|
@@ -63,6 +68,7 @@ __FBSDID("$FreeBSD: src/libexec/ftpd/log
|
||||||
|
|
||||||
#include <port_base.h>
|
#include <port_base.h>
|
||||||
|
|
||||||
|
@ -29,7 +28,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c ftpd/logwtmp.c
|
||||||
static int fd = -1;
|
static int fd = -1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -94,7 +100,7 @@
|
@@ -94,7 +100,7 @@ ftpd_logwtmp(line, name, addr)
|
||||||
(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
|
(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
|
||||||
(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
|
(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
|
||||||
(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
|
(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
|
||||||
|
@ -38,7 +37,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/logwtmp.c ftpd/logwtmp.c
|
||||||
ut.ut_time = _time_to_time32(time(NULL));
|
ut.ut_time = _time_to_time32(time(NULL));
|
||||||
#else /* Portable code from FreeBSD 4.8 */
|
#else /* Portable code from FreeBSD 4.8 */
|
||||||
(void)time(&ut.ut_time);
|
(void)time(&ut.ut_time);
|
||||||
@@ -104,3 +110,31 @@
|
@@ -104,3 +110,31 @@ ftpd_logwtmp(line, name, addr)
|
||||||
(void)ftruncate(fd, buf.st_size);
|
(void)ftruncate(fd, buf.st_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
11
ftp/bsdftpd-ssl/files/patch-ftpd_extern.h
Normal file
11
ftp/bsdftpd-ssl/files/patch-ftpd_extern.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- ftpd/extern.h.orig 2004-04-18 12:20:14 UTC
|
||||||
|
+++ ftpd/extern.h
|
||||||
|
@@ -47,7 +47,7 @@ void feat(void);
|
||||||
|
void ftpd_logwtmp(char *, char *, struct sockaddr *addr);
|
||||||
|
int ftpd_pclose(FILE *);
|
||||||
|
FILE *ftpd_popen(char *, char *);
|
||||||
|
-char *getline(char *, int, FILE *);
|
||||||
|
+char *get_line(char *, int, FILE *);
|
||||||
|
void lreply(int, const char *, ...);
|
||||||
|
void makedir(char *);
|
||||||
|
void nack(char *);
|
20
ftp/bsdftpd-ssl/files/patch-ftpd_ftpcmd.y
Normal file
20
ftp/bsdftpd-ssl/files/patch-ftpd_ftpcmd.y
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- ftpd/ftpcmd.y.orig 2004-12-19 18:44:42 UTC
|
||||||
|
+++ ftpd/ftpcmd.y
|
||||||
|
@@ -1394,7 +1394,7 @@ lookup(struct tab *p, char *cmd)
|
||||||
|
* getline - a hacked up version of fgets to ignore TELNET escape codes.
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
-getline(char *s, int n, FILE *iop)
|
||||||
|
+get_line(char *s, int n, FILE *iop)
|
||||||
|
{
|
||||||
|
int c;
|
||||||
|
register char *cs;
|
||||||
|
@@ -1545,7 +1545,7 @@ yylex(void)
|
||||||
|
case CMD:
|
||||||
|
(void) signal(SIGALRM, toolong);
|
||||||
|
(void) alarm(timeout);
|
||||||
|
- if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
|
||||||
|
+ if (get_line(cbuf, sizeof(cbuf)-1, stdin) == NULL) {
|
||||||
|
reply(221, "You could at least say goodbye.");
|
||||||
|
dologout(0);
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/contrib/ls/print.c contrib/ls/print.c
|
--- contrib/ls/print.c.orig 2005-01-11 10:04:34 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/contrib/ls/print.c 2005-01-11 13:04:34.000000000 +0300
|
+++ contrib/ls/print.c
|
||||||
+++ contrib/ls/print.c 2007-08-26 15:41:36.000000000 +0400
|
@@ -681,12 +681,12 @@ printsize(size_t width, off_t bytes)
|
||||||
@@ -681,12 +681,12 @@
|
|
||||||
unit = unit_adjust(&dbytes);
|
unit = unit_adjust(&dbytes);
|
||||||
|
|
||||||
if (dbytes == 0)
|
if (dbytes == 0)
|
||||||
|
@ -17,10 +16,9 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/contrib/ls/print.c contrib/ls/print.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/extern.h ftp/extern.h
|
--- ftp/extern.h.orig 2004-05-30 22:24:47 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ftp/extern.h 2004-05-31 02:24:47.000000000 +0400
|
+++ ftp/extern.h
|
||||||
+++ ftp/extern.h 2007-08-26 14:53:23.000000000 +0400
|
@@ -170,7 +170,7 @@ int togglevar __P((int, char **, int *,
|
||||||
@@ -170,7 +170,7 @@
|
|
||||||
void usage __P((void));
|
void usage __P((void));
|
||||||
void user __P((int, char **));
|
void user __P((int, char **));
|
||||||
|
|
||||||
|
@ -29,10 +27,20 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/extern.h ftp/extern.h
|
||||||
extern FILE *cout;
|
extern FILE *cout;
|
||||||
extern int data;
|
extern int data;
|
||||||
extern char *home;
|
extern char *home;
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/ftp.c ftp/ftp.c
|
--- ftp/ftp_var.h.orig 2004-12-19 18:44:39 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ftp/ftp.c 2004-12-19 21:17:07.000000000 +0300
|
+++ ftp/ftp_var.h
|
||||||
+++ ftp/ftp.c 2007-08-26 14:53:23.000000000 +0400
|
@@ -201,6 +201,8 @@ int macnum; /* number of defined macro
|
||||||
@@ -132,7 +132,8 @@
|
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;
|
const char *host0;
|
||||||
char *port;
|
char *port;
|
||||||
{
|
{
|
||||||
|
@ -42,7 +50,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/ftp.c ftp/ftp.c
|
||||||
struct addrinfo hints, *res, *res0;
|
struct addrinfo hints, *res, *res0;
|
||||||
static char hostnamebuf[MAXHOSTNAMELEN];
|
static char hostnamebuf[MAXHOSTNAMELEN];
|
||||||
static char hostaddrbuf[NI_MAXHOST];
|
static char hostaddrbuf[NI_MAXHOST];
|
||||||
@@ -1346,7 +1347,8 @@
|
@@ -1346,7 +1347,8 @@ int
|
||||||
initconn()
|
initconn()
|
||||||
{
|
{
|
||||||
char *p, *a;
|
char *p, *a;
|
||||||
|
@ -52,7 +60,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/ftp.c ftp/ftp.c
|
||||||
int on = 1;
|
int on = 1;
|
||||||
int error, ports;
|
int error, ports;
|
||||||
u_int af;
|
u_int af;
|
||||||
@@ -1774,7 +1776,8 @@
|
@@ -1774,7 +1776,8 @@ dataconn(lmode)
|
||||||
const char *lmode;
|
const char *lmode;
|
||||||
{
|
{
|
||||||
union sockunion from;
|
union sockunion from;
|
||||||
|
@ -62,22 +70,9 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/ftp.c ftp/ftp.c
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
int ret;
|
int ret;
|
||||||
char *ssl_version;
|
char *ssl_version;
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/ftp_var.h ftp/ftp_var.h
|
--- ftp/main.c.orig 2004-12-19 18:44:39 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ftp/ftp_var.h 2004-12-19 21:44:39.000000000 +0300
|
+++ ftp/main.c
|
||||||
+++ ftp/ftp_var.h 2007-08-26 14:53:23.000000000 +0400
|
@@ -102,15 +102,15 @@ bio_dump_cb(bio, cmd, argp, argi, argl,
|
||||||
@@ -201,6 +201,8 @@
|
|
||||||
struct macel macros[16];
|
|
||||||
char macbuf[4096];
|
|
||||||
|
|
||||||
+extern struct cmd cmdtab[];
|
|
||||||
+
|
|
||||||
#include "sslapp.h"
|
|
||||||
#include "ssl_port_ftps.h"
|
|
||||||
|
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/main.c ftp/main.c
|
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ftp/main.c 2004-12-19 21:44:39.000000000 +0300
|
|
||||||
+++ ftp/main.c 2007-08-26 15:51:27.000000000 +0400
|
|
||||||
@@ -102,15 +102,15 @@
|
|
||||||
if (out == NULL) return(ret);
|
if (out == NULL) return(ret);
|
||||||
|
|
||||||
if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
|
if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) {
|
||||||
|
@ -99,7 +94,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/main.c ftp/main.c
|
||||||
}
|
}
|
||||||
return((cmd & BIO_CB_RETURN) ? ret : 1);
|
return((cmd & BIO_CB_RETURN) ? ret : 1);
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@
|
@@ -121,7 +121,7 @@ set_ssl_trace(SSL *con)
|
||||||
if (con != NULL) {
|
if (con != NULL) {
|
||||||
if (ssl_debug_flag) {
|
if (ssl_debug_flag) {
|
||||||
BIO_set_callback(SSL_get_rbio(con), bio_dump_cb);
|
BIO_set_callback(SSL_get_rbio(con), bio_dump_cb);
|
||||||
|
@ -108,53 +103,20 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ftp/main.c ftp/main.c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ftpd/ftpd.c ftpd/ftpd.c
|
--- ftpd/ftpd.c.orig 2016-08-01 06:24:00 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ftpd/ftpd.c 2005-01-12 01:54:32.000000000 +0300
|
+++ ftpd/ftpd.c
|
||||||
+++ ftpd/ftpd.c 2007-08-26 14:53:23.000000000 +0400
|
@@ -3783,7 +3783,7 @@ myoob(void)
|
||||||
@@ -340,7 +340,8 @@
|
tv.tv_usec=0;
|
||||||
int
|
if (select(fileno(stdin)+1, &mask, NULL, NULL, &tv)) {
|
||||||
main(int argc, char *argv[], char **envp)
|
#endif /*USE_SSL*/
|
||||||
{
|
- if (getline(cp, 7, stdin) == NULL) {
|
||||||
- int addrlen, ch, on = 1, tos;
|
+ if (get_line(cp, 7, stdin) == NULL) {
|
||||||
+ socklen_t addrlen;
|
reply(221, "You could at least say goodbye.");
|
||||||
+ int ch, on = 1, tos;
|
dologout(0);
|
||||||
char *cp, line[LINE_MAX];
|
}
|
||||||
FILE *fd;
|
--- port/bsd_prog.mk.orig 2003-04-05 09:42:20 UTC
|
||||||
char *bindname = NULL;
|
+++ port/bsd_prog.mk
|
||||||
@@ -2538,7 +2539,8 @@
|
@@ -43,7 +43,8 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
||||||
if (pdata >= 0) {
|
|
||||||
union sockunion from;
|
|
||||||
int flags;
|
|
||||||
- int s, fromlen =
|
|
||||||
+ int s;
|
|
||||||
+ socklen_t fromlen =
|
|
||||||
#ifdef LINUX /* Linux port */
|
|
||||||
SU_LEN(ctrl_addr);
|
|
||||||
#else /* BSD source */
|
|
||||||
@@ -3818,7 +3820,8 @@
|
|
||||||
void
|
|
||||||
passive(void)
|
|
||||||
{
|
|
||||||
- int len, on;
|
|
||||||
+ socklen_t len;
|
|
||||||
+ int on;
|
|
||||||
char *p, *a;
|
|
||||||
|
|
||||||
if (pdata >= 0) /* close old port if one set */
|
|
||||||
@@ -3915,7 +3918,8 @@
|
|
||||||
void
|
|
||||||
long_passive(char *cmd, int pf)
|
|
||||||
{
|
|
||||||
- int len, on;
|
|
||||||
+ socklen_t len;
|
|
||||||
+ int on;
|
|
||||||
char *p, *a;
|
|
||||||
|
|
||||||
if (pdata >= 0) /* close old port if one set */
|
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk port/bsd_prog.mk
|
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk 2003-04-05 13:42:20.000000000 +0400
|
|
||||||
+++ port/bsd_prog.mk 2007-08-26 14:53:23.000000000 +0400
|
|
||||||
@@ -43,7 +43,8 @@
|
|
||||||
${PROG}: ${OBJS}
|
${PROG}: ${OBJS}
|
||||||
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD}
|
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD}
|
||||||
|
|
||||||
|
@ -164,10 +126,9 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/port/bsd_prog.mk port/bsd_prog.mk
|
||||||
|
|
||||||
.if !target(${PROG})
|
.if !target(${PROG})
|
||||||
SRCS= ${PROG}.c
|
SRCS= ${PROG}.c
|
||||||
diff -urN bsdftpd-ssl-1.1.0.ORI/ssl/sslapp.c ssl/sslapp.c
|
--- ssl/sslapp.c.orig 2005-01-10 23:34:59 UTC
|
||||||
--- bsdftpd-ssl-1.1.0.ORI/ssl/sslapp.c 2005-01-11 02:34:59.000000000 +0300
|
+++ ssl/sslapp.c
|
||||||
+++ ssl/sslapp.c 2007-08-26 15:48:40.000000000 +0400
|
@@ -108,8 +108,8 @@ do_ssleay_init(int server)
|
||||||
@@ -108,8 +108,8 @@
|
|
||||||
* export things work... If so we generate one now!
|
* export things work... If so we generate one now!
|
||||||
*/
|
*/
|
||||||
if (server) {
|
if (server) {
|
||||||
|
@ -178,7 +139,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ssl/sslapp.c ssl/sslapp.c
|
||||||
|
|
||||||
if (SSL_CTX_need_tmp_RSA(ssl_ctx)) {
|
if (SSL_CTX_need_tmp_RSA(ssl_ctx)) {
|
||||||
RSA *rsa;
|
RSA *rsa;
|
||||||
@@ -474,12 +474,12 @@
|
@@ -474,12 +474,12 @@ ssl_log_msg(BIO *bio, const char *fmt, .
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
if (outputbuf == NULL) {
|
if (outputbuf == NULL) {
|
||||||
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
||||||
|
@ -193,7 +154,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ssl/sslapp.c ssl/sslapp.c
|
||||||
|
|
||||||
free(outputbuf);
|
free(outputbuf);
|
||||||
}
|
}
|
||||||
@@ -498,12 +498,12 @@
|
@@ -498,12 +498,12 @@ ssl_log_msgn(BIO *bio, const char *fmt,
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
if (outputbuf == NULL) {
|
if (outputbuf == NULL) {
|
||||||
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
||||||
|
@ -208,7 +169,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ssl/sslapp.c ssl/sslapp.c
|
||||||
|
|
||||||
free(outputbuf);
|
free(outputbuf);
|
||||||
}
|
}
|
||||||
@@ -519,7 +519,7 @@
|
@@ -519,7 +519,7 @@ ssl_log_vwarn_common(BIO *bio, int debug
|
||||||
vasprintf(&tmp, fmt, ap);
|
vasprintf(&tmp, fmt, ap);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
||||||
|
@ -217,7 +178,7 @@ diff -urN bsdftpd-ssl-1.1.0.ORI/ssl/sslapp.c ssl/sslapp.c
|
||||||
if (ssl_logerr_syslog)
|
if (ssl_logerr_syslog)
|
||||||
syslog(LOG_ERR, "Ran out of memory.");
|
syslog(LOG_ERR, "Ran out of memory.");
|
||||||
return;
|
return;
|
||||||
@@ -531,14 +531,14 @@
|
@@ -531,14 +531,14 @@ ssl_log_vwarn_common(BIO *bio, int debug
|
||||||
free(tmp);
|
free(tmp);
|
||||||
if (outputbuf == NULL) {
|
if (outputbuf == NULL) {
|
||||||
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
BIO_printf(bio, "\r\nRan out of memory.\r\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue