httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1372373 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS support/htpasswd.c
Date Mon, 13 Aug 2012 11:35:19 GMT
Author: rjung
Date: Mon Aug 13 11:35:18 2012
New Revision: 1372373

URL: http://svn.apache.org/viewvc?rev=1372373&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

Backport of r1369618 from trunk.

Submitted by: sf
Reviewed by: rjung, trawick, humbedooh
Backported by: rjung

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/support/htpasswd.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1369618

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1372373&r1=1372372&r2=1372373&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Aug 13 11:35:18 2012
@@ -7,6 +7,9 @@ Changes with Apache 2.4.3
      possible XSS for a site where untrusted users can upload files to
      a location with MultiViews enabled. [Niels Heinen <heinenn google.com>]
 
+  *) htpasswd: Use correct file mode for checking if file is writable.
+     PR 45923. [Stefan Fritsch]
+
   *) mod_rewrite: Fix crash with dbd RewriteMaps. PR 53663. [Mikhail T.
      <mi apache aldan algebra com>]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1372373&r1=1372372&r2=1372373&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Aug 13 11:35:18 2012
@@ -88,12 +88,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * htpasswd: Use correct file mode for checking if file is writable.
-     Also switch to the non-deprecated APR_FOPEN_* flags.
-     PR: 45923
-     trunk patch: http://svn.apache.org/viewvc?view=rev&rev=1369618
-     2.4.x patch: trunk patch works
-     +1: rjung, trawick, humbedooh
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/support/htpasswd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/support/htpasswd.c?rev=1372373&r1=1372372&r2=1372373&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/support/htpasswd.c (original)
+++ httpd/httpd/branches/2.4.x/support/htpasswd.c Mon Aug 13 11:35:18 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