MCPcopy Create free account
hub / github.com/apache/httpd / md_util_fcreatex

Function md_util_fcreatex

modules/md/md_util.c:362–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362apr_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
381apr_status_t md_util_is_dir(const char *path, apr_pool_t *pool)
382{

Callers 3

md_json_fcreatexFunction · 0.85
md_util_freplaceFunction · 0.85
md_text_fcreatexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected