Retrieving per-process environment block?

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Nov 30 11:06:00 GMT 2016


On Nov 29 09:28, Eliot Moss wrote:
> On 11/29/2016 8:26 AM, Erik Bray wrote:
> > I could do this, if each process kept a copy of its environment block
> > in shared memory, which would in turn have to be updated every time
> > the process's environment is updated.  But I don't know what the
> > impact of that would be performance-wise.
> 
> Sorry, no advice getting around this, but a thought about why it may have
> been hard -- it can be a security hole.

Using the mechanism outlined in my mail from 2 minutes ago, there's
no security problem.  Opening the signal pipe is only allowed to
same user processes or administrative processes.  Other will get a
/proc/$PID/environ content of "<defunct>"


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20161130/4adc8ffe/attachment.sig>


More information about the Cygwin mailing list