httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1369618 - in /httpd/httpd/trunk: CHANGES support/htpasswd.c
Date Sun, 05 Aug 2012 16:55:00 GMT
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 <sgunderson bigfoot.com>]
 

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);



Mime
View raw message