| 341 | |
| 342 | |
| 343 | static 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 | |
| 363 | static void unixd_hooks(apr_pool_t *pool) |
| 364 | { |
nothing calls this directly
no test coverage detected