-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Various improvements to chroot #3960
Conversation
And glad we are now testing chroot for real :) |
e86963b
to
d92d4af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I fully understand the --skip-chdir
implementation. It seems to me that --skip-chdir
implies that the chdir
never happens, not that it still happens and is then restored?
d92d4af
to
9ed4ab3
Compare
You are correct :) |
Hmm I see, so we can't do something like this? let err = unsafe {
chroot(CString::new(root).unwrap().as_bytes_with_nul().as_ptr() as *const libc::c_char)
};
// some error handling
if !skip_chdir {
std::env::set_current_dir(root).unwrap();
} |
I tried this but it didn't work (but maybe it is my fault). I will have a look again |
1febdb2
to
002fcb6
Compare
002fcb6
to
69b52b4
Compare
Yeah: |
worked great, thanks :) |
Try to fix the issue
skipped test: user nobody lacks execute permissions
likehttps://github.com/coreutils/coreutils/blob/master/tests/cp/special-bits.sh#L45
(but this line fails as it is parsed as
cp -p c c2
is part of the chroot args