Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) mod_cgid: Explicitly set permissions of the socket (ScriptSock) shared by
+ mod_cgid and request processing threads, for OS'es such as HPUX and AIX
+ that do not use umask for AF_UNIX socket permissions.
+ [Eric Covener, Jeff Trawick]
+
*) mod_cgid: Don't try to restart the daemon if it fails to initialize
the socket. [Jeff Trawick]
apr_pool_t *ptrans;
server_rec *main_server = data;
apr_hash_t *script_hash = apr_hash_make(pcgi);
+ apr_status_t rv;
apr_pool_create(&ptrans, pcgi);
return errno;
}
+ /* Not all flavors of unix use the current umask for AF_UNIX perms */
+ rv = apr_file_perms_set(sockname, APR_FPROT_UREAD|APR_FPROT_UWRITE|APR_FPROT_UEXECUTE);
+ if (rv != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, main_server,
+ "Couldn't set permissions on unix domain socket %s",
+ sockname);
+ return rv;
+ }
+
if (listen(sd, DEFAULT_CGID_LISTENBACKLOG) < 0) {
ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
"Couldn't listen on unix domain socket");