Hi
It seems that the problem is that you wish to make private
for the user, some files, which, for other purposes, should yet
remain possibly shared.
This problem, for my own, is typically a resource-sharing
problem, and may be simply solved in a password-like way.
That is, each temp file should be generated with a randomized
name.
It has been said that this implies 1) modifying shell scripts,
2) that the programmer should be security-conscious.
That''s true. However if you want to make some files shared,
and others private, this involves building different flags
for each case ( shared or private ) for the system calls such
as open, so this needs to recompile all the programs.
So you have the choice, but for my own I do believe the first
option ( random-generated temp files ), is preferable.
For my own, I do think that application being built by
bad security-conscious programmer, will always fail, no matter
which tools you give to him for security purpose.
Regard.
Jean Ortolo