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

Function unixd_dump_config

modules/arch/unix/mod_unixd.c:343–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341
342
343static void unixd_dump_config(apr_pool_t *p, server_rec *s)
344{
345 apr_file_t *out = NULL;
346 apr_uid_t uid = ap_unixd_config.user_id;
347 apr_gid_t gid = ap_unixd_config.group_id;
348 char *no_root = "";
349 if (!ap_exists_config_define("DUMP_RUN_CFG"))
350 return;
351 if (geteuid() != 0)
352 no_root = " not_used";
353 apr_file_open_stdout(&out, p);
354 apr_file_printf(out, "User: name=\"%s\" id=%lu%s\n",
355 ap_unixd_config.user_name, (unsigned long)uid, no_root);
356 apr_file_printf(out, "Group: name=\"%s\" id=%lu%s\n",
357 ap_unixd_config.group_name, (unsigned long)gid, no_root);
358 if (ap_unixd_config.chroot_dir)
359 apr_file_printf(out, "ChrootDir: \"%s\"%s\n",
360 ap_unixd_config.chroot_dir, no_root);
361}
362
363static void unixd_hooks(apr_pool_t *pool)
364{

Callers

nothing calls this directly

Calls 1

ap_exists_config_defineFunction · 0.85

Tested by

no test coverage detected