diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2022-10-02 01:37:29 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2022-10-02 01:37:29 +0000 |
| commit | 0aa2700123e22c2b0a977375e087dc2759b8e980 (patch) | |
| tree | 9e96aa2accccbade71fc7246a2dec949f65fcde0 /libexec/ftpd | |
| parent | a82308abab86740e9bc37499bd2a13568764d7a0 (diff) | |
Diffstat (limited to 'libexec/ftpd')
| -rw-r--r-- | libexec/ftpd/Makefile | 5 | ||||
| -rw-r--r-- | libexec/ftpd/Makefile.depend | 1 | ||||
| -rw-r--r-- | libexec/ftpd/ftpd.8 | 10 | ||||
| -rw-r--r-- | libexec/ftpd/ftpd.c | 34 |
4 files changed, 5 insertions, 45 deletions
diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile index 533022c5a033..970e08d151f0 100644 --- a/libexec/ftpd/Makefile +++ b/libexec/ftpd/Makefile @@ -16,10 +16,7 @@ YFLAGS= WARNS?= 2 WFORMAT=0 -LIBADD= crypt util - -# XXX Kluge! Conversation mechanism needs to be fixed. -LIBADD+= opie md +LIBADD= crypt md util .PATH: ${SRCTOP}/bin/ls SRCS+= ls.c cmp.c print.c util.c diff --git a/libexec/ftpd/Makefile.depend b/libexec/ftpd/Makefile.depend index 148254e533cb..f87d9cb772d3 100644 --- a/libexec/ftpd/Makefile.depend +++ b/libexec/ftpd/Makefile.depend @@ -10,7 +10,6 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libcrypt \ lib/libmd \ - lib/libopie \ lib/libthr \ lib/libutil \ lib/msun \ diff --git a/libexec/ftpd/ftpd.8 b/libexec/ftpd/ftpd.8 index 868acac61699..b7d77b0111da 100644 --- a/libexec/ftpd/ftpd.8 +++ b/libexec/ftpd/ftpd.8 @@ -356,15 +356,6 @@ The login name must be in the password data base and not have a null password. In this case a password must be provided by the client before any file operations may be performed. -If the user has an OPIE key, the response from a successful USER -command will include an OPIE challenge. -The client may choose to respond with a PASS command giving either -a standard password or an OPIE one-time password. -The server will automatically determine which type of -password it has been given and attempt to authenticate accordingly. -See -.Xr opie 4 -for more information on OPIE authentication. .It The login name must not appear in the file .Pa /etc/ftpusers . @@ -563,7 +554,6 @@ Recommended directory for the FTP root directory .Xr ftp 1 , .Xr umask 2 , .Xr getusershell 3 , -.Xr opie 4 , .Xr ftpchroot 5 , .Xr login.conf 5 , .Xr inetd 8 , diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index e23c06aaf143..45c6c96d4471 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include <netdb.h> #include <pwd.h> #include <grp.h> -#include <opie.h> #include <signal.h> #include <stdint.h> #include <stdio.h> @@ -180,10 +179,6 @@ static int auth_pam(struct passwd**, const char*); pam_handle_t *pamh = NULL; #endif -static struct opie opiedata; -static char opieprompt[OPIE_CHALLENGE_MAX+1]; -static int pwok; - char *pid_file = NULL; /* means default location to pidfile(3) */ /* @@ -1065,20 +1060,7 @@ user(char *name) if (logging) strlcpy(curname, name, sizeof(curname)); - pwok = 0; -#ifdef USE_PAM - /* XXX Kluge! The conversation mechanism needs to be fixed. */ -#endif - if (opiechallenge(&opiedata, name, opieprompt) == 0) { - pwok = (pw != NULL) && - opieaccessfile(remotehost) && - opiealways(pw->pw_dir); - reply(331, "Response to %s %s for %s.", - opieprompt, pwok ? "requested" : "required", name); - } else { - pwok = 1; - reply(331, "Password required for %s.", name); - } + reply(331, "Password required for %s.", name); askpasswd = 1; /* * Delay before reading passwd after first failed @@ -1393,20 +1375,12 @@ pass(char *passwd) #ifdef USE_PAM rval = auth_pam(&pw, passwd); if (rval >= 0) { - opieunlock(); goto skip; } #endif - if (opieverify(&opiedata, passwd) == 0) - xpasswd = pw->pw_passwd; - else if (pwok) { - xpasswd = crypt(passwd, pw->pw_passwd); - if (passwd[0] == '\0' && pw->pw_passwd[0] != '\0') - xpasswd = ":"; - } else { - rval = 1; - goto skip; - } + xpasswd = crypt(passwd, pw->pw_passwd); + if (passwd[0] == '\0' && pw->pw_passwd[0] != '\0') + xpasswd = ":"; rval = strcmp(pw->pw_passwd, xpasswd); if (pw->pw_expire && time(NULL) >= pw->pw_expire) rval = 1; /* failure */ |
