Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 412EDD5AF for ; Sun, 5 Aug 2012 16:55:45 +0000 (UTC) Received: (qmail 56017 invoked by uid 500); 5 Aug 2012 16:55:45 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 55973 invoked by uid 500); 5 Aug 2012 16:55:45 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 55966 invoked by uid 99); 5 Aug 2012 16:55:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2012 16:55:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Aug 2012 16:55:43 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 894A1238890B; Sun, 5 Aug 2012 16:55:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1369618 - in /httpd/httpd/trunk: CHANGES support/htpasswd.c Date: Sun, 05 Aug 2012 16:55:00 -0000 To: cvs@httpd.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120805165500.894A1238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sf Date: Sun Aug 5 16:55:00 2012 New Revision: 1369618 URL: http://svn.apache.org/viewvc?rev=1369618&view=rev Log: htpasswd: Use correct file mode for checking if file is writable. Also switch to the non-deprecated APR_FOPEN_* flags PR: 45923 Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/support/htpasswd.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1369618&r1=1369617&r2=1369618&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Sun Aug 5 16:55:00 2012 @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) htpasswd: Use correct file mode for checking if file is writable. + PR 45923. [Stefan Fritsch] + *) core: Add post_perdir_config hook. [Steinar Gunderson ] Modified: httpd/httpd/trunk/support/htpasswd.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htpasswd.c?rev=1369618&r1=1369617&r2=1369618&view=diff ============================================================================== --- httpd/httpd/trunk/support/htpasswd.c (original) +++ httpd/httpd/trunk/support/htpasswd.c Sun Aug 5 16:55:00 2012 @@ -520,7 +520,7 @@ int main(int argc, const char * const ar /* * Check that this existing file is readable and writable. */ - if (!accessible(pool, pwfilename, APR_READ | APR_APPEND)) { + if (!accessible(pool, pwfilename, APR_FOPEN_READ|APR_FOPEN_WRITE)) { apr_file_printf(errfile, "%s: cannot open file %s for " "read/write access" NL, argv[0], pwfilename); exit(ERR_FILEPERM); @@ -539,7 +539,7 @@ int main(int argc, const char * const ar /* * As it doesn't exist yet, verify that we can create it. */ - if (!accessible(pool, pwfilename, APR_CREATE | APR_WRITE)) { + if (!accessible(pool, pwfilename, APR_FOPEN_WRITE|APR_FOPEN_CREATE)) { apr_file_printf(errfile, "%s: cannot create file %s" NL, argv[0], pwfilename); exit(ERR_FILEPERM);