rpms/krb5-appl/devel krb5-appl-1.0.1-largefile.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 krb5-appl.spec, 1.3, 1.4 sources, 1.2, 1.3 krb5-appl-1.0-largefile.patch, 1.1, NONE krb5-appl-1.0.tar.gz.asc, 1.1, NONE

Nalin Dahyabhai nalin at fedoraproject.org
Mon May 24 14:26:18 UTC 2010


Author: nalin

Update of /cvs/extras/rpms/krb5-appl/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv27833

Modified Files:
	.cvsignore krb5-appl.spec sources 
Added Files:
	krb5-appl-1.0.1-largefile.patch 
Removed Files:
	krb5-appl-1.0-largefile.patch krb5-appl-1.0.tar.gz.asc 
Log Message:
- update to 1.0.1


krb5-appl-1.0.1-largefile.patch:
 bsd/krcp.c             |    5 +++++
 configure.ac           |    4 ++++
 gssftp/ftp/ftp.c       |   24 +++++++++++++++++++++---
 gssftp/ftp/ftp_var.h   |    6 ++++++
 gssftp/ftpd/ftpcmd.y   |   12 ++++++++++++
 gssftp/ftpd/ftpd.c     |   27 ++++++++++++++++++++++++++-
 gssftp/ftpd/ftpd_var.h |    6 ++++++
 7 files changed, 80 insertions(+), 4 deletions(-)

--- NEW FILE krb5-appl-1.0.1-largefile.patch ---
* Turn on large file support in gssftp and rcp (and the rest of the bsd
  applications) using AC_SYS_LARGEFILE.
* The size of off_t might now be greater than that of an int or a long, so
  if we have a "long long" type, assume that format specifiers for it work
  correctly and that we can cast off_t values to long long for displaying
  and logging.
* Check for fseeko(), which takes an off_t, and if we find it, use it
  instead of fseek(), which takes a long and might not handle the full
  range of values.
RT#6524

diff -up krb5-appl-1.0.1/bsd/krcp.c krb5-appl-1.0.1/bsd/krcp.c
--- krb5-appl-1.0.1/bsd/krcp.c	2010-05-24 10:16:57.565286960 -0400
+++ krb5-appl-1.0.1/bsd/krcp.c	2010-05-24 10:16:57.682292360 -0400
@@ -748,8 +748,13 @@ void source(argc, argv)
 		continue;
 	    }
 	}
+#ifdef HAVE_LONG_LONG_INT
+	(void) snprintf(buf, sizeof(buf), "C%04o %lld %s\n",
+			(int) stb.st_mode&07777, (long long) stb.st_size, last);
+#else
 	(void) snprintf(buf, sizeof(buf), "C%04o %ld %s\n",
 			(int) stb.st_mode&07777, (long ) stb.st_size, last);
+#endif
 	(void) rcmd_stream_write(rem, buf, strlen(buf), 0);
 	if (response() < 0) {
 	    (void) close(f);
diff -up krb5-appl-1.0.1/configure.ac krb5-appl-1.0.1/configure.ac
--- krb5-appl-1.0.1/configure.ac	2010-05-24 10:16:57.000000000 -0400
+++ krb5-appl-1.0.1/configure.ac	2010-05-24 10:17:22.658042178 -0400
@@ -103,6 +103,10 @@ case $host in
     ;;
 esac
 
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+AC_TYPE_LONG_LONG_INT
+AC_TYPE_UNSIGNED_LONG_LONG_INT
 AC_CHECK_FUNCS(_getpty cgetent getcwd getenv gettosbyname getusershell getutmp)
 AC_CHECK_FUNCS(getutmpx grantpt inet_aton initgroups isatty killpg killpg)
 AC_CHECK_FUNCS(line_push ptsname revoke rmufile rresvport_af)
diff -up krb5-appl-1.0.1/gssftp/ftpd/ftpcmd.y krb5-appl-1.0.1/gssftp/ftpd/ftpcmd.y
--- krb5-appl-1.0.1/gssftp/ftpd/ftpcmd.y	2009-11-05 15:15:06.000000000 -0500
+++ krb5-appl-1.0.1/gssftp/ftpd/ftpcmd.y	2010-05-24 10:16:57.688293200 -0400
@@ -1499,12 +1499,20 @@ char *filename;
 		    (stbuf.st_mode&S_IFMT) != S_IFREG)
 			reply(550, "%s: not a plain file.", filename);
 		else
+#ifdef HAVE_LONG_LONG_INT
+			reply(213, "%llu", (long long) stbuf.st_size);
+#else
 			reply(213, "%lu", (long) stbuf.st_size);
+#endif
 		break;}
 	case TYPE_A: {
 		FILE *fin;
 		register int c;
+#ifdef HAVE_LONG_LONG_INT
+		register long long count;
+#else
 		register long count;
+#endif
 		struct stat stbuf;
 		fin = fopen(filename, "r");
 		if (fin == NULL) {
@@ -1526,7 +1534,11 @@ char *filename;
 		}
 		(void) fclose(fin);
 
+#ifdef HAVE_LONG_LONG_INT
+		reply(213, "%lld", count);
+#else
 		reply(213, "%ld", count);
+#endif
 		break;}
 	default:
 		reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]);
diff -up krb5-appl-1.0.1/gssftp/ftpd/ftpd.c krb5-appl-1.0.1/gssftp/ftpd/ftpd.c
--- krb5-appl-1.0.1/gssftp/ftpd/ftpd.c	2010-05-24 10:16:57.459288560 -0400
+++ krb5-appl-1.0.1/gssftp/ftpd/ftpd.c	2010-05-24 10:16:57.692286520 -0400
@@ -1205,8 +1205,13 @@ retrieve(cmd, name)
 done:
 	(*closefunc)(fin);
 	if (logging > 2 && !cmd) {
+#ifdef HAVE_UNSIGNED_LONG_LONG_INT
+		syslog(LOG_NOTICE, "get: %llu bytes transferred",
+		       (unsigned long long) byte_count);
+#else
 	        syslog(LOG_NOTICE, "get: %lu bytes transferred",
 		       (unsigned long) byte_count);
+#endif
 	}
 }
 
@@ -1252,7 +1257,7 @@ store_file(name, fmode, unique)
 			 * because we are changing from reading to
 			 * writing.
 			 */
-			if (fseek(fout, 0L, L_INCR) < 0) {
+			if (FSEEK(fout, 0L, L_INCR) < 0) {
 				perror_reply(550, name);
 				goto done;
 			}
@@ -1277,8 +1282,13 @@ store_file(name, fmode, unique)
 done:
 	(*closefunc)(fout);
 	if (logging > 2) {
+#ifdef HAVE_UNSIGNED_LONG_LONG_INT
+		syslog(LOG_NOTICE, "put: %llu bytes transferred",
+		       (unsigned long long) byte_count);
+#else
 	        syslog(LOG_NOTICE, "put: %lu bytes transferred",
 		       (unsigned long) byte_count);
+#endif
 	}
 }
 
@@ -1341,8 +1351,13 @@ dataconn(name, size, fmode)
 	byte_count = 0;
 	if (size != (off_t) -1)
 		/* cast size to long in case sizeof(off_t) > sizeof(long) */
+#ifdef HAVE_LONG_LONG_INT
+		(void) snprintf (sizebuf, sizeof(sizebuf), " (%lld bytes)",
+				 (long long)size);
+#else
 		(void) snprintf (sizebuf, sizeof(sizebuf), " (%ld bytes)",
 				 (long)size);
+#endif
 	else
 		sizebuf[0] = '\0';
 	if (pdata >= 0) {
@@ -2063,6 +2078,15 @@ myoob(sig)
 		siglongjmp(urgcatch, 1);
 	}
 	if (strcmp(cp, "STAT") == 0) {
+#ifdef HAVE_LONG_LONG_INT
+		if (file_size != (off_t) -1)
+			reply(213, "Status: %llu of %llu bytes transferred",
+			      (unsigned long long) byte_count, 
+			      (unsigned long long) file_size);
+		else
+			reply(213, "Status: %llu bytes transferred", 
+			      (unsigned long long) byte_count);
+#else
 		if (file_size != (off_t) -1)
 			reply(213, "Status: %lu of %lu bytes transferred",
 			      (unsigned long) byte_count, 
@@ -2070,6 +2094,7 @@ myoob(sig)
 		else
 			reply(213, "Status: %lu bytes transferred", 
 			      (unsigned long) byte_count);
+#endif
 	}
 }
 
diff -up krb5-appl-1.0.1/gssftp/ftpd/ftpd_var.h krb5-appl-1.0.1/gssftp/ftpd/ftpd_var.h
--- krb5-appl-1.0.1/gssftp/ftpd/ftpd_var.h	2009-11-05 15:15:06.000000000 -0500
+++ krb5-appl-1.0.1/gssftp/ftpd/ftpd_var.h	2010-05-24 10:16:57.697287880 -0400
@@ -41,6 +41,12 @@
 char *radix_error (int);
 int radix_encode (unsigned char *, unsigned char *, size_t *, int);
 
+#ifdef HAVE_FSEEKO
+#define FSEEK(fd, offset, whence) fseeko(fd, (off_t) offset, whence)
+#else
+#define FSEEK(fd, offset, whence) fseek(fd, (long) offset, whence)
+#endif
+
 /* ftpd.c */
 void ack(char *);
 int auth_data(unsigned char *);
diff -up krb5-appl-1.0.1/gssftp/ftp/ftp.c krb5-appl-1.0.1/gssftp/ftp/ftp.c
--- krb5-appl-1.0.1/gssftp/ftp/ftp.c	2010-05-24 10:16:57.667041880 -0400
+++ krb5-appl-1.0.1/gssftp/ftp/ftp.c	2010-05-24 10:16:57.703289360 -0400
@@ -156,7 +156,11 @@ void user_gss_error (OM_uint32, OM_uint3
 
 static void proxtrans (char *, char *, char *);
 static int initconn (void);
+#ifdef HAVE_LONG_LONG_INT
+static void ptransfer (char *, long long, struct timeval *, struct timeval *);
+#else
 static void ptransfer (char *, long, struct timeval *, struct timeval *);
+#endif
 static void abort_remote (FILE *);
 static void tvsub (struct timeval *, struct timeval *, struct timeval *);
 static char *gunique (char *);
@@ -787,7 +791,11 @@ void sendrequest(char *cmd, char *local,
 	FILE *volatile fin, *volatile dout = 0;
 	int (*volatile closefunc)();
 	volatile sig_t oldintr, oldintp;
+#ifdef HAVE_LONG_LONG_INT
+	volatile long long bytes = 0, hashbytes = HASHBYTES;
+#else
 	volatile long bytes = 0, hashbytes = HASHBYTES;
+#endif
 	char *volatile lmode;
 	char buf[FTP_BUFSIZ], *bufp;
 
@@ -884,7 +892,7 @@ void sendrequest(char *cmd, char *local,
 
 	if (restart_point &&
 	    (strcmp(cmd, "STOR") == 0 || strcmp(cmd, "APPE") == 0)) {
-		if (fseek(fin, (long) restart_point, 0) < 0) {
+		if (FSEEK(fin, restart_point, 0) < 0) {
 			fprintf(stderr, "local: %s: %s\n", local,
 				strerror(errno));
 			restart_point = 0;
@@ -1279,7 +1287,7 @@ void recvrequest(char *cmd, char *volati
 		if (restart_point) {
 			register int i, n, ch;
 
-			if (fseek(fout, 0L, L_SET) < 0)
+			if (FSEEK(fout, 0L, L_SET) < 0)
 				goto done;
 			n = restart_point;
 			for (i = 0; i++ < n;) {
@@ -1288,7 +1296,7 @@ void recvrequest(char *cmd, char *volati
 				if (ch == '\n')
 					i++;
 			}
-			if (fseek(fout, 0L, L_INCR) < 0) {
+			if (FSEEK(fout, 0L, L_INCR) < 0) {
 done:
 				fprintf(stderr, "local: %s: %s\n", local,
 					strerror(errno));
@@ -1553,8 +1561,13 @@ dataconn(char *lmode)
 	return (FDOPEN_SOCKET(data, lmode));
 }
 
+#ifdef HAVE_LONG_LONG_INT
+static void ptransfer(char *direction, long long bytes,
+		      struct timeval *t0, struct timeval *t1)
+#else
 static void ptransfer(char *direction, long bytes,
 		      struct timeval *t0, struct timeval *t1)
+#endif
 {
 	struct timeval td;
 	float s, kbs;
@@ -1564,8 +1577,13 @@ static void ptransfer(char *direction, l
 		s = td.tv_sec + (td.tv_usec / 1000000.);
 #define	nz(x)	((x) == 0 ? 1 : (x))
 		kbs = (bytes / nz(s))/1024.0;
+#ifdef HAVE_LONG_LONG_INT
+		printf("%lld bytes %s in %.2g seconds (%.2g Kbytes/s)\n",
+		    bytes, direction, s, kbs);
+#else
 		printf("%ld bytes %s in %.2g seconds (%.2g Kbytes/s)\n",
 		    bytes, direction, s, kbs);
+#endif
 	}
 }
 
diff -up krb5-appl-1.0.1/gssftp/ftp/ftp_var.h krb5-appl-1.0.1/gssftp/ftp/ftp_var.h
--- krb5-appl-1.0.1/gssftp/ftp/ftp_var.h	2010-05-24 10:16:57.628038560 -0400
+++ krb5-appl-1.0.1/gssftp/ftp/ftp_var.h	2010-05-24 10:16:57.706287440 -0400
@@ -46,12 +46,18 @@ FILE* fdopen_socket(SOCKET s, char* mode
 #define FDOPEN_SOCKET(s, mode) fdopen_socket(s, mode)
 #define SOCKETNO(fd) _get_osfhandle(fd)
 #define PERROR_SOCKET(str) do { errno = SOCKET_ERRNO; perror(str); } while(0)
+#define FSEEK(fd, offset, whence) fseek(fd, (long) offset, whence)
 #else
 #define FCLOSE_SOCKET(f) fclose(f)
 FILE* fdopen_socket(int *s, char* mode);
 #define FDOPEN_SOCKET(s, mode) fdopen_socket(&s, mode)
 #define SOCKETNO(fd) (fd)
 #define PERROR_SOCKET(str) perror(str)
+#ifdef HAVE_FSEEKO
+#define FSEEK(fd, offset, whence) fseeko(fd, (off_t) offset, whence)
+#else
+#define FSEEK(fd, offset, whence) fseek(fd, (long) offset, whence)
+#endif
 #endif
 
 #ifdef _WIN32


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/krb5-appl/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore	19 Mar 2010 20:20:37 -0000	1.2
+++ .cvsignore	24 May 2010 14:26:11 -0000	1.3
@@ -1 +1,3 @@
 krb5-appl-1.0.tar.gz
+krb5-appl-1.0.1.tar.gz
+krb5-appl-1.0.1.tar.gz.asc


Index: krb5-appl.spec
===================================================================
RCS file: /cvs/extras/rpms/krb5-appl/devel/krb5-appl.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- krb5-appl.spec	21 May 2010 20:26:17 -0000	1.3
+++ krb5-appl.spec	24 May 2010 14:26:13 -0000	1.4
@@ -9,10 +9,10 @@
 
 Summary: Kerberos-aware versions of telnet, ftp, rsh, and rlogin
 Name: krb5-appl
-Version: 1.0
-Release: 3%{?dist}
+Version: 1.0.1
+Release: 1%{?dist}
 # Maybe we should explode from the now-available-to-everybody tarball instead?
-# http://web.mit.edu/kerberos/dist/krb5-appl/1.0/krb5-appl-1.0-signed.tar
+# http://web.mit.edu/kerberos/dist/krb5-appl/1.0/krb5-appl-1.0.1-signed.tar
 Source0: krb5-appl-%{version}.tar.gz
 Source1: krb5-appl-%{version}.tar.gz.asc
 Source7: krb5.sh
@@ -44,8 +44,7 @@ Patch72: krb5-1.6.3-ftp_fdleak.patch
 Patch73: krb5-1.6.3-ftp_glob_runique.patch
 Patch79: krb5-trunk-ftp_mget_case.patch
 Patch88: krb5-1.7-sizeof.patch
-Patch89: krb5-appl-1.0-largefile.patch
-Patch162: krb5-appl-1.0-pty.patch
+Patch89: krb5-appl-1.0.1-largefile.patch
 
 License: MIT
 URL: http://web.mit.edu/kerberos/www/
@@ -103,7 +102,6 @@ ln -s NOTICE LICENSE
 %patch79 -p2 -b .ftp_mget_case
 %patch88 -p3 -b .sizeof
 %patch89 -p1 -b .largefile
-%patch162 -p1 -b .pty
 
 # Rename the man pages so that they'll get generated correctly.  Uses the
 # "krb5-appl-1.0-manpaths.txt" source file.
@@ -253,6 +251,9 @@ exit 0
 %{krb5prefix}/man/man8/telnetd.8*
 
 %changelog
+* Mon May 24 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.0.1-1
+- update to 1.0.1
+
 * Fri May 21 2010 Nalin Dahyabhai <nalin at redhat.com> - 1.0-3
 - when checking for pty-handling functions, do so with the benefit of the
   libutil library we think might include them


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/krb5-appl/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources	19 Mar 2010 20:20:41 -0000	1.2
+++ sources	24 May 2010 14:26:13 -0000	1.3
@@ -1 +1,2 @@
-4ecf03dad0df7f2ded49f0cfd9786157  krb5-appl-1.0.tar.gz
+0783a9e7fa8eb3a99346e89ec00e7589  krb5-appl-1.0.1.tar.gz
+9501420dd83a6fb0a6c54a16f69d5240  krb5-appl-1.0.1.tar.gz.asc


--- krb5-appl-1.0-largefile.patch DELETED ---


--- krb5-appl-1.0.tar.gz.asc DELETED ---



More information about the scm-commits mailing list