<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/win32/env.c, branch realpath</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=realpath</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=realpath'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2018-02-13T11:54:43+00:00</updated>
<entry>
<title>win32: always use safe API calls to manipulate environment</title>
<updated>2018-02-13T11:54:43+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-02-13T11:54:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=834805db9fe525dff26267fb7ba2794cee3ed51a'/>
<id>urn:sha1:834805db9fe525dff26267fb7ba2794cee3ed51a</id>
<content type='text'>
It turns out that with the new toolchain safe API calls work on all
all platforms.  Even the original code from commit fa147bd7e works
on Windows XP when built with the new tools.

- Remove the unsafe environment manipulation via the environ array
- Microsoft's putenv takes a copy of its argument so the string
  can be freed
- Rewrite some routines and add more error checking
</content>
</entry>
<entry>
<title>win32: remove unused functions</title>
<updated>2017-08-23T11:13:59+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2017-08-23T11:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d4dc5e4177056ae284c256278a853f51e347f13f'/>
<id>urn:sha1:d4dc5e4177056ae284c256278a853f51e347f13f</id>
<content type='text'>
The functions copy_environ and free_environ became unused following
commit ac181bf54 "win32: simplify spawning applets".
</content>
</entry>
<entry>
<title>Allow different ways to manipulate environment for XP vs 64-bit</title>
<updated>2015-07-03T13:12:47+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2015-07-03T13:12:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7'/>
<id>urn:sha1:9fc98788e4fb1ea1f330d44c8b2019b3fe6444f7</id>
<content type='text'>
Commit fa147bd 'Use putenv to implement unsetenv/clearenv' allowed
BusyBox to run on ReactOS but broke it on Windows XP so it was
reverted.

It turns out that the same change is required on 64-bit Windows.
Reinstate the 'safe' environment manipulation code but make it a
configuration option.  Add a config file for 64-bit Windows that
does the right thing.
</content>
</entry>
<entry>
<title>Revert "Use putenv to implement unsetenv/clearenv"</title>
<updated>2014-12-18T10:08:26+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2014-12-18T10:08:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=067f2e7eaf36deac1175eaf24eeb118adcd37179'/>
<id>urn:sha1:067f2e7eaf36deac1175eaf24eeb118adcd37179</id>
<content type='text'>
This reverts commit fa147bd7ecb086f4fb9a4afea16b946693a822ce.
</content>
</entry>
<entry>
<title>Use putenv to implement unsetenv/clearenv</title>
<updated>2014-11-23T17:35:35+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2014-11-23T17:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fa147bd7ecb086f4fb9a4afea16b946693a822ce'/>
<id>urn:sha1:fa147bd7ecb086f4fb9a4afea16b946693a822ce</id>
<content type='text'>
noexec applets failed on ReactOS 0.3.17.  This was because the
environment was being manipulated directly using the environ pointer.
Implementing unsetenv and clearenv using putenv fixes the problem.

WIN32 putenv doesn't allow environment variables to have empty
values.  This was the case before and it's still the case after
this change.  Shell variables are fine.
</content>
</entry>
<entry>
<title>win32: add popen implementation that uses shell</title>
<updated>2012-04-23T09:14:18+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2012-04-23T09:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ece4cb7f6debdb741b8a43053aeea817b80f49e7'/>
<id>urn:sha1:ece4cb7f6debdb741b8a43053aeea817b80f49e7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>win32: implement clearenv()</title>
<updated>2010-09-14T04:22:49+00:00</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2010-09-14T04:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=f24b8269a46035feef17eca1c2bf1176c5c23b90'/>
<id>urn:sha1:f24b8269a46035feef17eca1c2bf1176c5c23b90</id>
<content type='text'>
</content>
</entry>
<entry>
<title>win32: add getenv(), setenv(), unsetenv() and clearenv()</title>
<updated>2010-09-10T08:50:00+00:00</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2010-04-14T00:15:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=43992d86844f4fa77b6e6613ce62b96d0e115bd5'/>
<id>urn:sha1:43992d86844f4fa77b6e6613ce62b96d0e115bd5</id>
<content type='text'>
clearenv() is not supported yet.
</content>
</entry>
</feed>
