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

[Error] Trailing slash makes custom home dir incorrect #1575

Closed
callb4ck opened this issue Oct 3, 2024 · 0 comments
Closed

[Error] Trailing slash makes custom home dir incorrect #1575

callb4ck opened this issue Oct 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@callb4ck
Copy link

callb4ck commented Oct 3, 2024

To Reproduce:
Simply create a new new container, but when specifying a custom home, put a trailing forward slash.

For example, do not use "/somepath/customhome" but use "/somepath/customhome/"

In my exact case

  1. distrobox create -i alpine:latest -n test1 -H /home/sec/test/ --verbose &> output.log
  2. distrobox enter test1

At this point $HOME will be "/home/sec/test/" and not "/home/sec/test", which means that every script that relies on $HOME is now compromised.
This will usually result something such as "$HOME/somepath" expanding into "/home/sec/test//somepath ".

Expected behavior:
$HOME should not have a trailing forward slash and every software relying on $HOME should work correctly.

Logs:
The file output.log along with a podman.log produced with podman logs test1 > podman.logs are atttached:
output.log
podman.log

Desktop:

  • Podman 5.2.3
  • Distrobox 1.7.2.1 installed trough rpm-ostree (system package manager and system repo)
  • Host system: Fedora Silverblue 40
@callb4ck callb4ck added the bug Something isn't working label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant