Commit 707c7f70 authored by Stefan Eissing's avatar Stefan Eissing
Browse files

*) mod_md: Explicitly setting file permissions to break out of umasks. We want our

     non-privilegded apache user to be able to read them. See github issue
     <https://github.com/icing/mod_md/issues/117>. [Stefan Eissing] 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1855777 13f79535-47bb-0310-9956-ffa450edef68
parent 18f7fd05
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.5.1

  *) mod_md: Explicitly setting file permissions to break out of umasks. We want our
     non-privilegded apache user to be able to read them. See github issue
     <https://github.com/icing/mod_md/issues/117>. [Stefan Eissing] 
  
  *) Merge consecutive slashes in URL's. Opt-out with `MergeSlashes OFF`. 
     [Eric Covener]

+7 −0
Original line number Diff line number Diff line
@@ -312,6 +312,13 @@ apr_status_t md_text_fcreatex(const char *fpath, apr_fileperms_t perms,
    if (APR_SUCCESS == rv) {
        rv = write_text((void*)text, f, p);
        apr_file_close(f);
        /* See <https://github.com/icing/mod_md/issues/117>: when a umask
         * is set, files need to be assigned permissions explicitly.
         * Otherwise, as in the issues reported, it will break our access model. */
        rv = apr_file_perms_set(fpath, perms);
        if (APR_STATUS_IS_ENOTIMPL(rv)) {
            rv = APR_SUCCESS;
        }
    }
    return rv;
}