| 360 | } |
| 361 | |
| 362 | apr_status_t md_util_fcreatex(apr_file_t **pf, const char *fn, |
| 363 | apr_fileperms_t perms, apr_pool_t *p) |
| 364 | { |
| 365 | apr_status_t rv; |
| 366 | rv = apr_file_open(pf, fn, (APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_EXCL), |
| 367 | perms, p); |
| 368 | if (APR_SUCCESS == rv) { |
| 369 | /* See <https://github.com/icing/mod_md/issues/117> |
| 370 | * Some people set umask 007 to deny all world read/writability to files |
| 371 | * created by apache. While this is a noble effort, we need the store files |
| 372 | * to have the permissions as specified. */ |
| 373 | rv = apr_file_perms_set(fn, perms); |
| 374 | if (APR_STATUS_IS_ENOTIMPL(rv)) { |
| 375 | rv = APR_SUCCESS; |
| 376 | } |
| 377 | } |
| 378 | return rv; |
| 379 | } |
| 380 | |
| 381 | apr_status_t md_util_is_dir(const char *path, apr_pool_t *pool) |
| 382 | { |
no outgoing calls
no test coverage detected