Blame SOURCES/netkit-ftp-0.17-longnames.patch

4f574c
--- netkit-ftp-0.17/ftp/cmds.c.longnames	2006-07-25 11:13:55.000000000 +0200
4f574c
+++ netkit-ftp-0.17/ftp/cmds.c	2006-07-24 17:52:10.000000000 +0200
4f574c
@@ -1057,10 +1057,9 @@
4f574c
 status(void)
4f574c
 {
4f574c
 	int i;
4f574c
-
4f574c
-	if (connected)
4f574c
+	if (connected) 
4f574c
 		printf("Connected to %s.\n", hostname);
4f574c
-	else
4f574c
+	else 
4f574c
 		printf("Not connected.\n");
4f574c
 	if (!proxy) {
4f574c
 		pswitch(1);
4f574c
@@ -1081,7 +1080,7 @@
4f574c
 		onoff(runique));
4f574c
 	printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag));
4f574c
 	if (ntflag) {
4f574c
-		printf("Ntrans: (in) %s (out) %s\n", ntin,ntout);
4f574c
+		printf("Ntrans: (in) %s (out) %s\n",ntin,ntout);
4f574c
 	}
4f574c
 	else {
4f574c
 		printf("Ntrans: off\n");
4f574c
@@ -1948,14 +1947,14 @@
4f574c
 	}
4f574c
 	ntflag++;
4f574c
 	code = ntflag;
4f574c
-	(void) strncpy(ntin, argv[1], 16);
4f574c
-	ntin[16] = '\0';
4f574c
+	(void) strncpy(ntin, argv[1], NTRANS_MAX);
4f574c
+	ntin[NTRANS_MAX] = '\0';
4f574c
 	if (argc == 2) {
4f574c
 		ntout[0] = '\0';
4f574c
 		return;
4f574c
 	}
4f574c
-	(void) strncpy(ntout, argv[2], 16);
4f574c
-	ntout[16] = '\0';
4f574c
+	(void) strncpy(ntout, argv[2], NTRANS_MAX);
4f574c
+ 	ntout[NTRANS_MAX] = '\0';
4f574c
 }
4f574c
 
4f574c
 static char *
4f574c
@@ -1965,10 +1964,10 @@
4f574c
 	char *cp1, *cp2 = new;
4f574c
 	register int i, ostop, found;
4f574c
 
4f574c
-	for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++);
4f574c
+	for (ostop = 0; *(ntout + ostop) && ostop < NTRANS_MAX; ostop++);
4f574c
 	for (cp1 = name; *cp1; cp1++) {
4f574c
 		found = 0;
4f574c
-		for (i = 0; *(ntin + i) && i < 16; i++) {
4f574c
+		for (i = 0; *(ntin + i) && i < NTRANS_MAX; i++) {
4f574c
 			if (*cp1 == *(ntin + i)) {
4f574c
 				found++;
4f574c
 				if (i < ostop) {
4f574c
--- netkit-ftp-0.17/ftp/ftp.c.longnames	2006-07-25 11:13:56.000000000 +0200
4f574c
+++ netkit-ftp-0.17/ftp/ftp.c	2006-07-24 17:46:14.000000000 +0200
4f574c
@@ -1656,8 +1656,8 @@
4f574c
 		int runqe;
4f574c
 		int mcse;
4f574c
 		int ntflg;
4f574c
-		char nti[17];
4f574c
-		char nto[17];
4f574c
+		char nti[NTRANS_MAX+1];
4f574c
+		char nto[NTRANS_MAX+1];
4f574c
 		int mapflg;
4f574c
 		char mi[MAXPATHLEN];
4f574c
 		char mo[MAXPATHLEN];
4f574c
@@ -1712,11 +1712,11 @@
4f574c
 	mcase = op->mcse;
4f574c
 	ip->ntflg = ntflag;
4f574c
 	ntflag = op->ntflg;
4f574c
-	(void) strncpy(ip->nti, ntin, 16);
4f574c
-	(ip->nti)[16] = '\0';		/* shouldn't use strlen */
4f574c
+	(void) strncpy(ip->nti, ntin, NTRANS_MAX);
4f574c
+	(ip->nti)[NTRANS_MAX] = '\0';		/* shouldn't use strlen */
4f574c
 	(void) strcpy(ntin, op->nti);
4f574c
-	(void) strncpy(ip->nto, ntout, 16);
4f574c
-	(ip->nto)[16] = '\0';
4f574c
+	(void) strncpy(ip->nto, ntout, NTRANS_MAX);
4f574c
+	(ip->nto)[NTRANS_MAX] = '\0';
4f574c
 	(void) strcpy(ntout, op->nto);
4f574c
 	ip->mapflg = mapflag;
4f574c
 	mapflag = op->mapflg;
4f574c
--- netkit-ftp-0.17/ftp/ftp_var.h.longnames	2006-07-25 11:13:56.000000000 +0200
4f574c
+++ netkit-ftp-0.17/ftp/ftp_var.h	2006-07-24 15:49:37.000000000 +0200
4f574c
@@ -42,6 +42,7 @@
4f574c
 
4f574c
 #include <setjmp.h>
4f574c
 #include <sys/param.h>
4f574c
+#define NTRANS_MAX	64
4f574c
 
4f574c
 /*
4f574c
  * Tick counter step size.
4f574c
@@ -82,8 +83,8 @@
4f574c
 Extern char     pasv[64];       /* passive port for proxy data connection */
4f574c
 Extern int      passivemode;    /* passive mode enabled */
4f574c
 Extern char	*altarg;	/* argv[1] with no shell-like preprocessing  */
4f574c
-Extern char	ntin[17];	/* input translation table */
4f574c
-Extern char	ntout[17];	/* output translation table */
4f574c
+Extern char	ntin[NTRANS_MAX+1];	/* input translation table */
4f574c
+Extern char	ntout[NTRANS_MAX+1];	/* output translation table */
4f574c
 Extern char	mapin[MAXPATHLEN];	/* input map template */
4f574c
 Extern char	mapout[MAXPATHLEN];	/* output map template */
4f574c
 Extern char	typename[32];		/* name of file transfer type */