summaryrefslogtreecommitdiffstats
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-08-26 00:45:36 +0000
committerpeter <peter@FreeBSD.org>1999-08-26 00:45:36 +0000
commitb658a57c222af53cd4c00082ea592a9d9a5921f7 (patch)
tree13d28ea779f60b0b14a0c8c4473b102be6331f8b /libexec/ftpd
parentb9c4386c6dd646e1168d559d191533658946f6bc (diff)
downloadFreeBSD-src-b658a57c222af53cd4c00082ea592a9d9a5921f7.zip
FreeBSD-src-b658a57c222af53cd4c00082ea592a9d9a5921f7.tar.gz
unifdef -DINTERNAL_LS - it's too useful to be off by default. If anyone
really dislikes this, we could add a switch to disable it at runtime and check in popen.c.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/Makefile4
-rw-r--r--libexec/ftpd/extern.h4
-rw-r--r--libexec/ftpd/ftpd.815
-rw-r--r--libexec/ftpd/ftpd.c6
-rw-r--r--libexec/ftpd/popen.c10
5 files changed, 7 insertions, 32 deletions
diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile
index 7995612..f25478b 100644
--- a/libexec/ftpd/Makefile
+++ b/libexec/ftpd/Makefile
@@ -1,5 +1,5 @@
# @(#)Makefile 8.2 (Berkeley) 4/4/94
-# $Id: Makefile,v 1.24 1998/05/04 18:20:18 bde Exp $
+# $Id: Makefile,v 1.25 1998/11/21 02:11:16 jdp Exp $
PROG= ftpd
MAN8= ftpd.8
@@ -12,12 +12,10 @@ YFLAGS=
LDADD= -lskey -lmd -lcrypt -lutil
DPADD= ${LIBSKEY} ${LIBMD} ${LIBCRYPT} ${LIBUTIL}
-.ifdef FTPD_INTERNAL_LS
LSDIR= ../../bin/ls
.PATH: ${.CURDIR}/${LSDIR}
SRCS+= ls.c cmp.c print.c stat_flags.c util.c
CFLAGS+=-DINTERNAL_LS -Dmain=ls_main -I${.CURDIR}/${LSDIR}
-.endif
.if exists(${DESTDIR}/usr/lib/libkrb.a) && defined(MAKE_KERBEROS4)
.PATH: ${.CURDIR}/../../lib/libpam/modules/pam_kerberosIV
diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h
index f4da903..e27dae4 100644
--- a/libexec/ftpd/extern.h
+++ b/libexec/ftpd/extern.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)extern.h 8.2 (Berkeley) 4/4/94
- * $Id: extern.h,v 1.10 1997/09/05 11:17:22 tg Exp $
+ * $Id: extern.h,v 1.11 1997/09/05 11:43:56 tg Exp $
*/
void blkfree __P((char **));
@@ -70,6 +70,4 @@ int yyparse __P((void));
#if defined(SKEY) && defined(_PWD_H_) /* XXX evil */
char *skey_challenge __P((char *, struct passwd *, int));
#endif
-#if defined(INTERNAL_LS)
int ls_main __P((int, char **));
-#endif
diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8
index 5cbd254..fab3108 100644
--- a/libexec/ftpd/ftpd.8
+++ b/libexec/ftpd/ftpd.8
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94
-.\" $Id: ftpd.8,v 1.26 1999/05/04 19:42:01 ghelmer Exp $
+.\" $Id: ftpd.8,v 1.27 1999/06/28 10:50:47 mpp Exp $
.\"
.Dd April 19, 1994
.Dt FTPD 8
@@ -408,24 +408,15 @@ value is to be used.
As with any anonymous login configuration, due care must be given
to setup and maintenance to guard against security related problems.
.Pp
-If compiled with the
-.Em INTERNAL_LS
-option,
.Nm
-will have internal support for handling remote requests to list
+has internal support for handling remote requests to list
files, and will not execute
.Pa /bin/ls
-in either a chrooted or non-chrooted environment.
-In this case, the
+in either a chrooted or non-chrooted environment. The
.Pa ~/bin/ls
executable need not be placed into the chrooted tree, nor need the
.Pa ~/bin
directory exist.
-This support may be added by making ftpd with the
-.Em FTPD_INTERNAL_LS
-variable set either in
-.Pa /etc/make.conf
-or in the shell's environment.
.Sh FILES
.Bl -tag -width /etc/ftpwelcome -compact
.It Pa /etc/ftpusers
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 4f58d69..0150283 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -44,7 +44,7 @@ static char copyright[] =
static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
#endif
static const char rcsid[] =
- "$Id: ftpd.c,v 1.54 1999/04/07 08:27:40 brian Exp $";
+ "$Id: ftpd.c,v 1.55 1999/04/25 22:23:35 imp Exp $";
#endif /* not lint */
/*
@@ -103,12 +103,8 @@ static const char rcsid[] =
#include <varargs.h>
#endif
-#ifdef INTERNAL_LS
static char version[] = "Version 6.00LS";
#undef main
-#else
-static char version[] = "Version 6.00";
-#endif
extern off_t restart_point;
extern char cbuf[];
diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c
index 665dc45..6b21215 100644
--- a/libexec/ftpd/popen.c
+++ b/libexec/ftpd/popen.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 4/6/94";
#endif
static const char rcsid[] =
- "$Id: popen.c,v 1.14 1998/05/15 16:51:06 ache Exp $";
+ "$Id: popen.c,v 1.15 1998/05/18 00:06:28 ache Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -54,12 +54,10 @@ static const char rcsid[] =
#include <unistd.h>
#include "extern.h"
-#ifdef INTERNAL_LS
#include "pathnames.h"
#include <syslog.h>
#include <time.h>
#include <varargs.h>
-#endif
#define MAXUSRARGS 100
#define MAXGLOBARGS 1000
@@ -119,12 +117,8 @@ ftpd_popen(program, type)
gargv[gargc] = NULL;
iop = NULL;
-#ifdef INTERNAL_LS
fflush(NULL);
pid = (strcmp(gargv[0], _PATH_LS) == 0) ? fork() : vfork();
-#else
- pid = vfork();
-#endif
switch(pid) {
case -1: /* error */
(void)close(pdes[0]);
@@ -146,7 +140,6 @@ ftpd_popen(program, type)
}
(void)close(pdes[1]);
}
-#ifdef INTERNAL_LS
if (strcmp(gargv[0], _PATH_LS) == 0) {
extern int optreset;
/* Reset getopt for ls_main() */
@@ -162,7 +155,6 @@ ftpd_popen(program, type)
}
exit(ls_main(gargc, gargv));
}
-#endif
execv(gargv[0], gargv);
_exit(1);
}
OpenPOWER on IntegriCloud