apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: svn commit: r746589 - in /apr/apr/trunk: ./ include/ include/arch/unix/ include/arch/win32/ misc/unix/ misc/win32/ threadproc/beos/ threadproc/netware/ threadproc/os2/ threadproc/unix/ threadproc/win32/
Date Mon, 23 Feb 2009 12:16:22 GMT
Joe Orton wrote:
 > On Sat, Feb 21, 2009 at 08:59:47PM -0000, Mladen Turk wrote:
 >> Author: mturk
 >> Date: Sat Feb 21 20:59:46 2009
 >> New Revision: 746589
 >>
 >> URL: http://svn.apache.org/viewvc?rev=746589&view=rev
 >> Log:
 >> Add simple parent/child data exchange for APR processes
 >
 > 1) another addition to the procattr API which is entirely orthogonal to
 > the API's purpose.  ick.
 >

This can always be made using some different solutions.
However this one IMHO is the most portable one.
If you think the apr_procattr is the wrong group I can
rename it to something else, but it's related to
process, process attributes and ipc, so there's not
very much space for something meaningful.

 > 2) every apr_initialize() call for every app in the universe now tries
 > to open some random file in /tmp regardless of whether they use this API
 >

I suppose the late open on explicit
apr_proc_parent_ipc_data_get would be smarter solution
and wouldn't impose any performance degradation.

 > 3) fundamental /tmp race (the temp file name is predictable and hence
 > another local user could create the shm file and populate the data
 > segment which would be picked up by the child) and hence is huge
 > security hole
 >

Hmm, that's the shared memory, not the actual file.
Nevertheless the parent creates the shm so it will fail
if it cannot create shm, so the child won't get started.
Also shm name is not predictable because the child pid is not
known in advance (well one can make all 1...PID_MAX shm's, sure),
but then again the child using the api 'knows' it was called
by the parent and data is always valid.

 > -1
 >

I announced that twice on this list during the last year,
so you should spoke then thought.

Regards
-- 
^(TM)

Mime
View raw message