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

Failed to mount two paths when folder name share similarities #819

Closed
o-techie opened this issue Jan 18, 2025 · 2 comments
Closed

Failed to mount two paths when folder name share similarities #819

o-techie opened this issue Jan 18, 2025 · 2 comments

Comments

@o-techie
Copy link

o-techie commented Jan 18, 2025

Current build:
FreeBSD 14.2-RELEASE-p0
Bastille 0.12.20250111

I have the following scenario where the validation of existing mount fails when the first folder has a - on the name and the second do not.

# bastille mount dummy /tmp/app-test1 tmp/app-test1 nullfs rw 0 0

[dummy]:
Added: /tmp/app-test1 /usr/local/bastille/jails/dummy/root/tmp/app-test1 nullfs rw 0 0

# bastille mount dummy /tmp/app tmp/app nullfs rw 0 0

[dummy]:
Mountpoint already present in /usr/local/bastille/jails/dummy/fstab
/tmp/app-test1 /usr/local/bastille/jails/dummy/root/tmp/app-test1 nullfs rw 0 0

It seems related to the validation below

if grep -Eq "[[:blank:]]${_existing_mount}.*[[:blank:]]" "${bastille_jailsdir}/${_jail}/fstab"; then

Where grep -Eq "[[:blank:]]/usr/local/bastille/jails/dummy/root/tmp/app.*[[:blank:]]" will match against /usr/local/bastille/jails/dummy/root/tmp/app-test1

@tschettervictor
Copy link
Collaborator

tschettervictor commented Jan 18, 2025

Thanks!

Fix will be in #802

Can you test?

@o-techie
Copy link
Author

Thanks!

Fix will be in #802

Can you test?

Tested. It works with #802 fix

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