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

Issue #280: Disable the switching of process identity only after succ… #281

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

Castaglia
Copy link
Owner

…essfully authenticating to the backend server.

When proxy auth is used, the flag to disable process identity switching was set after proxy auth, but before backend auth. And that, in turn, meant that after successful backend auth, the switching to root privs for making the automatic chroot(2) call of the proxy session process would silently fail, leading to unexpected chroot(2) failure due to EPERM.

…essfully authenticating to the backend server.

When proxy auth is used, the flag to disable process identity switching was
set after proxy auth, but before backend auth.  And that, in turn, meant
that after successful backend auth, the switching to root privs for making
the automatic `chroot(2)` call of the proxy session process would silently
fail, leading to unexpected `chroot(2)` failure due to EPERM.
@Castaglia Castaglia self-assigned this Nov 14, 2024
@@ -299,8 +299,6 @@ int proxy_session_setup_env(pool *p, const char *user, int flags) {
strerror(xerrno));
}

session.disable_id_switching = TRUE;

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setting of this session flag is moved to later in the session lifecycle, so that we can handle proxy auth appropriately, as when the following configuration is used:

ProxyRole forward
ProxyForwardMethod proxyuser,user@host

@Castaglia Castaglia merged commit 9426cd4 into master Nov 14, 2024
9 checks passed
@Castaglia Castaglia deleted the proxy-auth-chroot-issue280 branch November 14, 2024 19:05
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

Successfully merging this pull request may close these issues.

1 participant