diff options
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | support/htpasswd.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -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>] diff --git a/support/htpasswd.c b/support/htpasswd.c index 993ce625e3..31e766211d 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -520,7 +520,7 @@ int main(int argc, const char * const argv[]) /* * 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 argv[]) /* * 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); |