Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/libexec/ftpd/ftpd.c,v rcsdiff: /ftp/cvs/cvsroot/src/libexec/ftpd/ftpd.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.164 retrieving revision 1.164.2.3 diff -u -p -r1.164 -r1.164.2.3 --- src/libexec/ftpd/ftpd.c 2005/02/20 01:45:17 1.164 +++ src/libexec/ftpd/ftpd.c 2008/09/18 19:13:36 1.164.2.3 @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.164 2005/02/20 01:45:17 christos Exp $ */ +/* $NetBSD: ftpd.c,v 1.164.2.3 2008/09/18 19:13:36 bouyer Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -105,7 +105,7 @@ __COPYRIGHT( #if 0 static char sccsid[] = "@(#)ftpd.c 8.5 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: ftpd.c,v 1.164 2005/02/20 01:45:17 christos Exp $"); +__RCSID("$NetBSD: ftpd.c,v 1.164.2.3 2008/09/18 19:13:36 bouyer Exp $"); #endif #endif /* not lint */ @@ -3172,11 +3172,11 @@ send_file_list(const char *whichf) memset(&gl, 0, sizeof(gl)); freeglob = 1; if (glob(whichf, flags, 0, &gl)) { - reply(550, "not found"); + reply(450, "Not found"); goto cleanup_send_file_list; } else if (gl.gl_pathc == 0) { errno = ENOENT; - perror_reply(550, whichf); + perror_reply(450, whichf); goto cleanup_send_file_list; } dirlist = gl.gl_pathv; @@ -3205,7 +3205,7 @@ send_file_list(const char *whichf) retrieve(argv, dirname); goto cleanup_send_file_list; } - perror_reply(550, whichf); + perror_reply(450, whichf); goto cleanup_send_file_list; } @@ -3275,9 +3275,9 @@ send_file_list(const char *whichf) } if (dout == NULL) - reply(550, "No files found."); + reply(450, "No files found."); else if (ferror(dout) != 0) - perror_reply(550, "Data connection"); + perror_reply(451, "Data connection"); else reply(226, "Transfer complete."); @@ -3321,7 +3321,8 @@ void logxfer(const char *command, off_t bytes, const char *file1, const char *file2, const struct timeval *elapsed, const char *error) { - char buf[MAXPATHLEN * 2 + 100], realfile[MAXPATHLEN]; + char buf[MAXPATHLEN * 2 + 100]; + char realfile1[MAXPATHLEN], realfile2[MAXPATHLEN]; const char *r1, *r2; char direction; size_t len; @@ -3331,10 +3332,10 @@ logxfer(const char *command, off_t bytes return; r1 = r2 = NULL; - if ((r1 = realpath(file1, realfile)) == NULL) + if ((r1 = realpath(file1, realfile1)) == NULL) r1 = file1; if (file2 != NULL) - if ((r2 = realpath(file2, realfile)) == NULL) + if ((r2 = realpath(file2, realfile2)) == NULL) r2 = file2; /* @@ -3604,7 +3605,7 @@ auth_pam(struct passwd **ppw, const char PAM_SUCCESS) { tmpl_user = (const char *) item; if (strcmp((*ppw)->pw_name, tmpl_user) != 0) - *ppw = getpwnam(tmpl_user); + *ppw = sgetpwnam(tmpl_user); } else syslog(LOG_ERR, "Couldn't get PAM_USER: %s", pam_strerror(pamh, e));