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

Function md_text_fcreatex

modules/md/md_util.c:500–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500apr_status_t md_text_fcreatex(const char *fpath, apr_fileperms_t perms,
501 apr_pool_t *p, const char *text)
502{
503 apr_status_t rv;
504 apr_file_t *f;
505
506 rv = md_util_fcreatex(&f, fpath, perms, p);
507 if (APR_SUCCESS == rv) {
508 rv = write_text((void*)text, f, p);
509 apr_file_close(f);
510 /* See <https://github.com/icing/mod_md/issues/117>: when a umask
511 * is set, files need to be assigned permissions explicitly.
512 * Otherwise, as in the issues reported, it will break our access model. */
513 rv = apr_file_perms_set(fpath, perms);
514 if (APR_STATUS_IS_ENOTIMPL(rv)) {
515 rv = APR_SUCCESS;
516 }
517 }
518 return rv;
519}
520
521apr_status_t md_text_freplace(const char *fpath, apr_fileperms_t perms,
522 apr_pool_t *p, const char *text)

Callers 1

pfs_saveFunction · 0.85

Calls 2

md_util_fcreatexFunction · 0.85
write_textFunction · 0.85

Tested by

no test coverage detected