Package: debhelper Version: 11.1.5 Severity: minor Hello.
The attached script demonstrates that dh_link produces not-policy conformant symlinks when one of the paths contains '.' or '..' as components, or with multiple leading directory separators. Moreover, it may erase file outside the package directory when the new name starts with ../foo, instead of interpreting it as /../foo and replacing it with /foo as the documentation implies. Either the documentation should forbid '.', '..' and multiple leading /, and dh_link should fail when such an argument is detected, or all such constructs should be correctly handled. I suggest to A/ fix the support for multiple leading separators (which are accepted anywhere else) B/ completely forbid '.' and '..' components. B/ would simplify a lot the existing code, probably making A/ much easyer.
dh_link-bugs.sh
Description: Bourne shell script

