[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#925979: busybox-udeb: breaks user-params, rescue mode, etc.



On Sat, 2019-03-30 at 13:33 +0100, Cyril Brulebois wrote:
> Heya,
> 
> Chris Boot <bootc@debian.org> (2019-03-30):
[...]
> > I've also had a thought, and I can't remember if we've considered it
> > already: do the environment variables get preserved in
> > /proc/1/environ, even if busybox ash can't grok them? Could d-i be
> > modified to pull them from there?
> 
> Indeed, /proc/1/environ seems to have everyone!

Please note that /proc/$pid/environ is a live view of the region of a
process's virtual memory where the kernel originally wrote its
environment strings.  The process is free to overwrite or even unmap
this memory at any time.  (Even if it doesn't do that, any additions to
its environment will necessarily be outside that region.)

So I don't recommend using /proc/1/environ if you can avoid it.

Ben.

-- 
Ben Hutchings
Design a system any fool can use, and only a fool will want to use it.


Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: