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

Function try_chown

modules/cache/mod_socache_dbm.c:101–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100#if AP_NEED_SET_MUTEX_PERMS
101static 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

Callers 1

socache_dbm_initFunction · 0.85

Calls 1

ap_log_errorFunction · 0.50

Tested by

no test coverage detected