Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proot exits with proot: ./path/path.c:547: compare_paths2: Assertion `length2 > 0' failed #366

Open
nilsrennebarth opened this issue Sep 13, 2023 · 2 comments

Comments

@nilsrennebarth
Copy link

nilsrennebarth commented Sep 13, 2023

Steps to Reproduce the Problem

  1. Create a standard debian bookworm rootfs
  2. Enter the rootfs via proot by proot -0 -r OUT/ROOT -w / -b /proc/ -b /etc/resolv.conf -b /etc/hosts -b /dev/ /bin/bash
  3. Run the command systemd-tmpfiles --create debian.conf

Specifications

  • Proot/Care version: 5.4.0
  • Kernel version: Ubuntu 5.15.0-76-generic
  • Host distribution: debian bookworm
  • Guest distribution: debian bookworm

Remarks

I tried editing the debian.conf file, and found that entries starting with an L provoke the assertion failure. According to the manpage this should just create a symlink if it does not exist yet. Creating the same links by /usr/bin/ln works however.

What I tried is to to install various packages, among them systemd in a proot made chroot, and the systemd postinst failed with the said assertion failure.

@nilsrennebarth
Copy link
Author

I think I know what the problem is: The readlinkat(2) manpage states:

Since Linux 2.6.39, pathname can be an empty string, in which case the call operates on the symbolic link referred to by dirfd

This case appears not to be supported by proot when I read the source correctly.

@alexhenrie
Copy link

Duplicate of #182, see #182 (comment) in particular

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants