Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Re: svn commit: r823703 - in /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


paul at city-fan

Oct 21, 2009, 5:54 AM

Post #1 of 2 (319 views)
Permalink
Re: svn commit: r823703 - in /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c

> --- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c 2009/10/08 14:32:38 823190
> +++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c 2009/10/08 14:35:13 823191
> @@ -259,6 +259,17 @@
> return errno;
> }
>
> + /* IPC directory permissions are safe, but avoid confusion */
> + /* Not all flavors of unix use the current umask for AF_UNIX perms */
> +
> + rv = apr_file_perms_set(unix_addr.sun_path, APR_FPROT_UREAD|APR_FPROT_UWRITE|APR_FPROT_UEXECUTE);
> + if (rv != APR_SUCCESS) {
> + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, main_server,
> + "mod_fcgid: Couldn't set permissions on unix domain socket %s",
> + unix_addr.sun_path);
> + return rv;
> + }
> +
> /* Listen the socket */
> if (listen(unix_socket, DEFAULT_FCGID_LISTENBACKLOG) < 0) {
> ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,

This change breaks compatibility with old APR versions. Attached patch
seems to fix it for me.

Paul.
Attachments: mod_fcgid-old-apr.patch (0.67 KB)


trawick at gmail

Oct 21, 2009, 1:58 PM

Post #2 of 2 (292 views)
Permalink
Re: svn commit: r823703 - in /httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c [In reply to]

On Wed, Oct 21, 2009 at 8:54 AM, Paul Howarth <paul [at] city-fan> wrote:
>> --- httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c       2009/10/08
>> 14:32:38     823190
>> +++ httpd/mod_fcgid/trunk/modules/fcgid/fcgid_proc_unix.c       2009/10/08
>> 14:35:13     823191
>> @@ -259,6 +259,17 @@
>>         return errno;
>>     }
>>
>> +    /* IPC directory permissions are safe, but avoid confusion */
>> +    /* Not all flavors of unix use the current umask for AF_UNIX perms */
>> +
>> +    rv = apr_file_perms_set(unix_addr.sun_path,
>> APR_FPROT_UREAD|APR_FPROT_UWRITE|APR_FPROT_UEXECUTE);
>> +    if (rv != APR_SUCCESS) {
>> +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, main_server,
>> +                     "mod_fcgid: Couldn't set permissions on unix domain
>> socket %s",
>> +                     unix_addr.sun_path);
>> +        return rv;
>> +    }
>> +
>>     /* Listen the socket */
>>     if (listen(unix_socket, DEFAULT_FCGID_LISTENBACKLOG) < 0) {
>>         ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
>
> This change breaks compatibility with old APR versions. Attached patch seems
> to fix it for me.

Thanks.

I think I'll put the #defines inside "#if (APR_MAJOR_VERSION < 1)"
instead of using "ifndef APR_FPROT_foo" so that readers know instantly
what that is about.

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.