<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32, branch symlink</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=symlink</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=symlink'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2021-03-01T09:37:50+00:00</updated>
<entry>
<title>libbb: fix detection of relative paths in xreadlink.c</title>
<updated>2021-03-01T09:37:50+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-03-01T09:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b5cd41cdf4e6afd475fe34b755f99578e20b08ca'/>
<id>urn:sha1:b5cd41cdf4e6afd475fe34b755f99578e20b08ca</id>
<content type='text'>
In xmalloc_follow_symlinks() the code to detect relative paths
needs to be altered for WIN32.  We don't want C:/path to be
treated as a relative path.
</content>
</entry>
<entry>
<title>Allow `rename()` to work across drives</title>
<updated>2021-03-01T09:35:55+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-22T22:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4986a1248dcdb6f32a22321154dc26898f10d3ab'/>
<id>urn:sha1:4986a1248dcdb6f32a22321154dc26898f10d3ab</id>
<content type='text'>
Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Do not use `rename()` for symlinks</title>
<updated>2021-03-01T09:35:31+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-22T22:13:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=89fc5eaae6d0e8b348fdd1933d9df60cf3e5011b'/>
<id>urn:sha1:89fc5eaae6d0e8b348fdd1933d9df60cf3e5011b</id>
<content type='text'>
That function would rename the _target_, not the link.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Fix `xmalloc_readlink()` again</title>
<updated>2021-03-01T09:31:21+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-03-01T09:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3c44f5cae158ff4ffd03a4c319777ae88a60bcb9'/>
<id>urn:sha1:3c44f5cae158ff4ffd03a4c319777ae88a60bcb9</id>
<content type='text'>
In e86a3ddd8 (win32: make readlink(2) implementation unconditional,
2021-02-12), we removed the special casing of `errno == ENOSYS` when
trying to follow symlinks. However, that handling really was necessary:

- When we followed a symlink, and found a non-symlink, and then called
  `readlink()` with that non-symlink, we got `errno == ENOSYS` on
  Windows (translated from `ERROR_NOT_A_REPARSE_POINT`), and we did
  want to stop the loop and return the current path in that case.
  (Noted by Johannes Schindelin.)

- When readlink() called DeviceIoControl() for files on certain
  filesystems (e.g. FAT or a CDROM) it returned `errno == ENOSYS`
  (translated from ERROR_INVALID_FUNCTION).

Revert the part of the patch which handled `ENOSYS` on Windows.
</content>
</entry>
<entry>
<title>win32: let `resolve_symlinks()` _really_ resolve symbolic links</title>
<updated>2021-03-01T09:30:29+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-24T11:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=367f583cffcabdeebc3c27a42eba1926b5ea9819'/>
<id>urn:sha1:367f583cffcabdeebc3c27a42eba1926b5ea9819</id>
<content type='text'>
When one tries to call `CreateFile()` with a reparse point, it will
trigger an `ERROR_INVALID_NAME` unless `FILE_FLAG_OPEN_REPARSE_POINT` is
passed. However, _when_ that flag is passed, it does not open a handle
to the symlink _target_, but to the symlink itself.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>readlink(): do `NUL`-terminate the result</title>
<updated>2021-03-01T09:24:34+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-24T12:41:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=35e32c2a7176c6add799440b642cef3fa6a70045'/>
<id>urn:sha1:35e32c2a7176c6add799440b642cef3fa6a70045</id>
<content type='text'>
Otherwise we're provoking buffer overruns.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>win32(symlink): fix logic to determine the type of the symlink</title>
<updated>2021-03-01T09:23:43+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-26T22:51:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=7d0e7ba3c7029a5d744e04c8318d234de5ebedcf'/>
<id>urn:sha1:7d0e7ba3c7029a5d744e04c8318d234de5ebedcf</id>
<content type='text'>
On Windows, there are file symlinks and directory symlinks. When trying
to `opendir()` a symlink marked as `file`, it will fail. Even if the
target is a directory. Because it's the wrong symlink type.

To address this, our `symlink()` function calls `stat(target, ...)` to
see whether the target exists and is a directory.

The problem is that this `target` can be a relative path, and the link
path can _also_ be a relative path. Example: `symlink("dir", "uh/oh")`.
In this example, the target might say `dir`, but it is relative to
`uh/oh`, i.e. we need to `stat("uh/dir", ...)`.

This is necessary to pass the `cp` tests because they first create such
a directory symlink and then try to copy it while dereferencing
symlinks, i.e. calling `opendir()` on the symlink.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>win32: move is_absolute_path()</title>
<updated>2021-03-01T09:20:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-03-01T09:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b2ea5c74c8e2a26f9d9e8978d41a2368693e5ff7'/>
<id>urn:sha1:b2ea5c74c8e2a26f9d9e8978d41a2368693e5ff7</id>
<content type='text'>
Make is_absolute_path() a function rather than a macro and move it
from ash.c into mingw.c.
</content>
</entry>
<entry>
<title>win32: workaround for lazy loading issue on Windows 7</title>
<updated>2021-03-01T09:07:58+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-03-01T09:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=aa1512610a7d5081f0b721e7dc24a95527c07a95'/>
<id>urn:sha1:aa1512610a7d5081f0b721e7dc24a95527c07a95</id>
<content type='text'>
Investigating why free(1) wasn't working on Windows 7 I found it's
possible for LoadLibraryEx to fail with exactly the flags we're
using.  Work around this.

This probably also explains GitHub issue #204.
</content>
</entry>
<entry>
<title>which: changes to standalone shell support</title>
<updated>2021-02-25T08:39:02+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-02-25T08:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=38eafd3ff110e2802fe85167013be9b0e49665f9'/>
<id>urn:sha1:38eafd3ff110e2802fe85167013be9b0e49665f9</id>
<content type='text'>
- If 'which' is run from an executable called 'which.exe' it
  suggests we aren't in a standalone-shell-mode shell.  Don't
  run any standalone-shell-specific code.

- Use case-insensitive comparisons when testing the names of
  executables.

- When the argument is 'busybox' any executable name starting
  with 'busybox' should match.

- Since 'busybox' is now treated as an applet in standalone shell
  mode there's no need to test for this explicitly.
</content>
</entry>
</feed>
