From owner-svn-src-user@FreeBSD.ORG Thu Oct 16 10:58:00 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 400D31065687; Thu, 16 Oct 2008 10:58:00 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F36A8FC1A; Thu, 16 Oct 2008 10:58:00 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9GAw0ui059957; Thu, 16 Oct 2008 10:58:00 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9GAw0ua059956; Thu, 16 Oct 2008 10:58:00 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <200810161058.m9GAw0ua059956@svn.freebsd.org> From: Alexander Leidinger Date: Thu, 16 Oct 2008 10:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183951 - user/netchild/obsolete/src/libexec/tftpd X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2008 10:58:00 -0000 Author: netchild Date: Thu Oct 16 10:57:59 2008 New Revision: 183951 URL: http://svn.freebsd.org/changeset/base/183951 Log: The correct spelling is EACCES, not EACCESS. Obsolete as it seems there's a new tftpd comming soon. Modified: user/netchild/obsolete/src/libexec/tftpd/tftpd.c Modified: user/netchild/obsolete/src/libexec/tftpd/tftpd.c ============================================================================== --- user/netchild/obsolete/src/libexec/tftpd/tftpd.c Thu Oct 16 10:56:25 2008 (r183950) +++ user/netchild/obsolete/src/libexec/tftpd/tftpd.c Thu Oct 16 10:57:59 2008 (r183951) @@ -597,7 +597,7 @@ validate_access(char **filep, int mode) * Prevent tricksters from getting around the directory restrictions */ if (strstr(filename, "/../")) - return (EACCESS); + return (EACCES); if (*filename == '/') { /* @@ -614,17 +614,17 @@ validate_access(char **filep, int mode) } /* If directory list is empty, allow access to any file */ if (dirp->name == NULL && dirp != dirs) - return (EACCESS); + return (EACCES); if (stat(filename, &stbuf) < 0) - return (errno == ENOENT ? ENOTFOUND : EACCESS); + return (errno == ENOENT ? ENOTFOUND : EACCES); if ((stbuf.st_mode & S_IFMT) != S_IFREG) return (ENOTFOUND); if (mode == RRQ) { if ((stbuf.st_mode & S_IROTH) == 0) - return (EACCESS); + return (EACCES); } else { if ((stbuf.st_mode & S_IWOTH) == 0) - return (EACCESS); + return (EACCES); } } else { int err; @@ -636,7 +636,7 @@ validate_access(char **filep, int mode) */ if (!strncmp(filename, "../", 3)) - return (EACCESS); + return (EACCES); /* * If the file exists in one of the directories and isn't @@ -652,7 +652,7 @@ validate_access(char **filep, int mode) if ((stbuf.st_mode & S_IROTH) != 0) { break; } - err = EACCESS; + err = EACCES; } } if (dirp->name != NULL) @@ -867,7 +867,7 @@ struct errmsg { } errmsgs[] = { { EUNDEF, "Undefined error code" }, { ENOTFOUND, "File not found" }, - { EACCESS, "Access violation" }, + { EACCES, "Access violation" }, { ENOSPACE, "Disk full or allocation exceeded" }, { EBADOP, "Illegal TFTP operation" }, { EBADID, "Unknown transfer ID" },