Re: symbolic link size
On Fri, 2016-11-25 at 13:58:10 +0100, Michael Meskes wrote:
> as you know dpkg checks if st_size in structure stat equals the return value
> for readlink() and if not issues the error message "symbolic link '<foo>' size
> has changed from X to Y". Why is this check in there? It turns out that there
> are systems (most notably Android N) for which this relation does not hold.
> This of course means we cannot have a chroot with Debian or at least none that
> requires an update.
The Cydia developer Jay Freeman, reported this same problem to me on
IRC (with an additional affected project [G]). It seems it does not
affect Android M, only Android N so it would seem to be a regression?
It would be nice if this could be reported to the Android developers
by someone wich such a system, so that the regressio can be fixed. In
the interim I think I'll relax the check to allow sizes smaller than
expected, but still emit a warning. In principle for dpkg 1.18.16
coming out in a couple of days.
The point of the code was to reduce the complexity, which is something
that can be assumed from POSIX, and to detect bogus filesystem code,
or possible race conditions while dealing with symlinks that might
change for whatever reason under dpkg feet. I guess I went for the
most strict implementation mostly as matter of defensive programming.