A user's pathname contains any dot, example /var/www/domain.com/ When executing: su - user It shows this error: ---- jail: can't canonize path "/var/www/domain". Bad path? ---- I found the problem with the function "make_jail_dir", It's in patch multiuser-rsa.patch, but I don't find any info about this problem and why it did make this patch. Reproducible: Always
this is not a regression over current stable
Created attachment 552432 [details, diff] honor standalone '.' in path, split jail dir on "/./" pattern Hello. I suppose this is done in such way so one is able to use the dot pattern "/./" in home path to split jail root from home path in the jail. For example: /home/jail/./home/user/ The function make_jail_dir() checks only for a dot in the path to cut the dir. Proposed patch changes it to search for pattern "/./" only.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2d45cce35de863eb4ce529cfc5b161349aa3f4d commit b2d45cce35de863eb4ce529cfc5b161349aa3f4d Author: Pacho Ramos <pacho@gentoo.org> AuthorDate: 2018-11-04 12:08:09 +0000 Commit: Pacho Ramos <pacho@gentoo.org> CommitDate: 2018-11-04 12:33:54 +0000 app-misc/jail: Lots of bugfixes - Handle dirs with dots (#646116) - support openat() syscall too (#668898) - do not pass program parameters to ldd call (#668898) - do not duplicate jail in shells file (#668898) Thanks-to: Alexander Zubkov Closes: https://bugs.gentoo.org/646116 Closes: https://bugs.gentoo.org/668898 Signed-off-by: Pacho Ramos <pacho@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 app-misc/jail/files/jail-2.0-duplicate-jail.patch | 19 ++++++ app-misc/jail/files/jail-2.0-fix-paths.patch | 21 +++++++ app-misc/jail/files/jail-2.0-ldd-call.patch | 19 ++++++ app-misc/jail/files/jail-2.0-openat-syscall.patch | 23 +++++++ app-misc/jail/jail-2.0-r3.ebuild | 75 +++++++++++++++++++++++ 5 files changed, 157 insertions(+)