head	1.4;
access;
symbols
	RELEASE_4_3_0:1.1
	RELEASE_4_2_0:1.1;
locks; strict;
comment	@# @;


1.4
date	2001.09.07.19.45.46;	author nectar;	state dead;
branches;
next	1.3;

1.3
date	2001.07.06.22.55.34;	author nectar;	state Exp;
branches;
next	1.2;

1.2
date	2001.06.29.15.38.33;	author nectar;	state Exp;
branches;
next	1.1;

1.1
date	2000.11.09.23.35.03;	author nectar;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Update 0.4d -> 0.4e
@
text
@--- appl/ftp/ftpd/ftpd.c.ORIG	Fri Jun 29 09:41:46 2001
+++ appl/ftp/ftpd/ftpd.c	Fri Jun 29 09:42:04 2001
@@@@ -68,6 +68,7 @@@@
 int	debug = 0;
 int	ftpd_timeout = 900;    /* timeout after 15 minutes of inactivity */
 int	maxtimeout = 7200;/* don't allow idle time to be set beyond 2 hours */
+int	restricted_data_ports = 1;
 int	logging;
 int	guest;
 int	dochroot;
@@@@ -217,6 +218,7 @@@@
     { NULL, 't', arg_integer, &ftpd_timeout, "initial timeout" },
     { NULL, 'T', arg_integer, &maxtimeout, "max timeout" },
     { NULL, 'u', arg_string, &umask_string, "umask for user logins" },
+    { NULL, 'U', arg_negative_flag, &restricted_data_ports, "don't use high data ports" },
     { NULL, 'd', arg_flag, &debug, "enable debugging" },
     { NULL, 'v', arg_flag, &debug, "enable debugging" },
     { "builtin-ls", 'B', arg_flag, &use_builtin_ls, "use built-in ls to list files" },
@@@@ -1951,6 +1953,8 @@@@
 	socket_set_address_and_port (pasv_addr,
 				     socket_get_address (ctrl_addr),
 				     0);
+	socket_set_portrange(pdata, restricted_data_ports, 
+	    pasv_addr->sa_family); 
 	seteuid(0);
 	if (bind(pdata, pasv_addr, socket_sockaddr_size (pasv_addr)) < 0) {
 		seteuid(pw->pw_uid);
@@@@ -1993,6 +1997,8 @@@@
 	socket_set_address_and_port (pasv_addr,
 				     socket_get_address (ctrl_addr),
 				     0);
+	socket_set_portrange(pdata, restricted_data_ports, 
+	    pasv_addr->sa_family); 
 	seteuid(0);
 	if (bind(pdata, pasv_addr, socket_sockaddr_size (pasv_addr)) < 0) {
 		seteuid(pw->pw_uid);
@


1.3
log
@Update 0.3f -> 0.4b
@
text
@@


1.2
log
@Correct no-nos: one file per  patch, please. Don't touch more than one
source file with each patch file, and don't touch the same source file
with more than one patch file.
@
text
@a36 15
@@@@ -2165,7 +2171,13 @@@@
   char buf[MaxPathLen];
 
   if (strpbrk(whichf, "~{[*?") != NULL) {
-    int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|GLOB_LIMIT;
+    int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|
+#ifdef GLOB_MAXPATH
+	GLOB_MAXPATH
+#else
+	GLOB_LIMIT
+#endif
+	;
 
     memset(&gl, 0, sizeof(gl));
     freeglob = 1;
@


1.1
log
@= Use system libcom_err.
  No longer build or install the included libcom_err and compile_et.

= ftpd now uses IP_PORTRANGE* in the same fashion as the system ftpd.
  By default, ftpd will now use high port numbers for serving clients
  in passive mode.

= Fix segmentation fault in kadmin.
  A null pointer dereference that was only tickled when using kadmin
  with a kdc that uses LDAP as the backend.

= Fix a search filter in hdb-ldap.c.
  A lookup was failing to fetch operational attributes such as
  modifiersName.

= Bump PORTREVISION for above changes.
@
text
@d1 2
a2 2
--- appl/ftp/ftpd/ftpd.c.orig	Thu Aug 31 01:08:49 2000
+++ appl/ftp/ftpd/ftpd.c	Fri Nov  3 12:01:17 2000
d11 1
a11 1
@@@@ -215,6 +216,7 @@@@
d19 1
a19 1
@@@@ -1942,6 +1944,8 @@@@
d28 1
a28 1
@@@@ -1984,6 +1988,8 @@@@
d37 15
@

