| 99 | |
| 100 | #if AP_NEED_SET_MUTEX_PERMS |
| 101 | static int try_chown(apr_pool_t *p, server_rec *s, |
| 102 | const char *name, const char *suffix) |
| 103 | { |
| 104 | if (suffix) |
| 105 | name = apr_pstrcat(p, name, suffix, NULL); |
| 106 | if (-1 == chown(name, ap_unixd_config.user_id, |
| 107 | (gid_t)-1 /* no gid change */ )) |
| 108 | { |
| 109 | if (errno != ENOENT) |
| 110 | ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(errno), s, APLOGNO(00802) |
| 111 | "Can't change owner of %s", name); |
| 112 | return -1; |
| 113 | } |
| 114 | return 0; |
| 115 | } |
| 116 | #endif |
| 117 | |
| 118 |
no test coverage detected