SCCS-vsn: libexec/ftpd/ftpd.c 5.23
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)ftpd.c 5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftpd.c 5.23 (Berkeley) %G%";
endusershell();
if (cp == NULL) {
reply(530, "User %s access denied.", name);
endusershell();
if (cp == NULL) {
reply(530, "User %s access denied.", name);
+ syslog(LOG_ERR, "FTP LOGIN REFUSED FROM %s, %s",
+ remotehost, name);
pw = (struct passwd *) NULL;
return;
}
pw = (struct passwd *) NULL;
return;
}
*cp = '\0';
if (strcmp(line, name) == 0) {
reply(530, "User %s access denied.", name);
*cp = '\0';
if (strcmp(line, name) == 0) {
reply(530, "User %s access denied.", name);
+ syslog(LOG_ERR, "FTP LOGIN REFUSED FROM %s, %s",
+ remotehost, name);
pw = (struct passwd *) NULL;
return;
}
pw = (struct passwd *) NULL;
return;
}
reply(550, "Can't set uid.");
goto bad;
}
reply(550, "Can't set uid.");
goto bad;
}
reply(230, "Guest login ok, access restrictions apply.");
reply(230, "Guest login ok, access restrictions apply.");
+ syslog(LOG_INFO, "ANONYMOUS FTP LOGIN FROM %s, %s",
+ remotehost, passwd);
+ } else {
reply(230, "User %s logged in.", pw->pw_name);
reply(230, "User %s logged in.", pw->pw_name);
+ syslog(LOG_INFO, "FTP LOGIN FROM %s, %s",
+ remotehost, pw->pw_name);
+ }
home = pw->pw_dir; /* home dir for globbing */
return;
bad:
home = pw->pw_dir; /* home dir for globbing */
return;
bad: