apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: APR-izing httpd's unixd_set_proc_mutex_perms
Date Mon, 02 Feb 2009 11:56:43 GMT
William A. Rowe, Jr. wrote:
>> Long time since initial proposal, but here it is.
>> Since there was no objections I'll commit this into trunk.
> 
> Does this API imply that the developer has to manage the resources
> to be converted by uid/gid?
> 
> If so, I suspect you are ignoring others who the primary author is
> unaware of.
> 
> The right API, IMHO, is to register a list of resources to be
> converted *to whatever target uid/gid* will be used after fork.
> Why should the author track these?
> 
>

Here is different API that allows registering the
perms_set callback to apr_procattr_t, eg.

  apr_procattr_perms_set_register(attr, APR_PERMS_SET_FN(shm),
	shm, APR_FPROT_UREAD | APR_FPROT_UWRITE | ...)

as well to call
the particular function independently from fork
eg.
APR_PERMS_SET_FN(shm)(shm, perms, uid, gid);

I suppose this can be extended to add settings for
file and dir as well, simply by implementing the
APR_PERMS_SET_IMPLEMENT(file)
APR_PERMS_SET_IMPLEMENT(dir)


Regards
-- 
^(TM)

Mime
View raw message