Changeset View
Changeset View
Standalone View
Standalone View
libexec/ftpd/ftpd.c
Context not available. | |||||
#include <security/pam_appl.h> | #include <security/pam_appl.h> | ||||
#endif | #endif | ||||
#ifdef USE_BLACKLIST | |||||
#include "blacklist_client.h" | |||||
#endif | |||||
#include "pathnames.h" | #include "pathnames.h" | ||||
#include "extern.h" | #include "extern.h" | ||||
Context not available. | |||||
reply(220, "%s FTP server (%s) ready.", hostname, version); | reply(220, "%s FTP server (%s) ready.", hostname, version); | ||||
else | else | ||||
reply(220, "FTP server ready."); | reply(220, "FTP server ready."); | ||||
#ifdef USE_BLACKLIST | |||||
blacklist_init(); | |||||
#endif | |||||
for (;;) | for (;;) | ||||
(void) yyparse(); | (void) yyparse(); | ||||
/* NOTREACHED */ | /* NOTREACHED */ | ||||
Context not available. | |||||
*/ | */ | ||||
if (rval) { | if (rval) { | ||||
reply(530, "Login incorrect."); | reply(530, "Login incorrect."); | ||||
#ifdef USE_BLACKLIST | |||||
blacklist_notify(1, 0, "Login incorrect"); | |||||
#endif | |||||
if (logging) { | if (logging) { | ||||
syslog(LOG_NOTICE, | syslog(LOG_NOTICE, | ||||
"FTP LOGIN FAILED FROM %s", | "FTP LOGIN FAILED FROM %s", | ||||
Context not available. | |||||
} | } | ||||
return; | return; | ||||
} | } | ||||
#ifdef USE_BLACKLIST | |||||
else { | |||||
blacklist_notify(0, 0, "Login successful"); | |||||
} | |||||
#endif | |||||
} | } | ||||
login_attempts = 0; /* this time successful */ | login_attempts = 0; /* this time successful */ | ||||
if (setegid(pw->pw_gid) < 0) { | if (setegid(pw->pw_gid) < 0) { | ||||
Context not available. |