| Summary: | sshd tries to use chdir to users home directory as root | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Peter Gray <metadalek> |
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED WORKSFORME | ||
| Severity: | normal | CC: | djm |
| Priority: | P5 | ||
| Version: | 6.1p1 | ||
| Hardware: | SPARC | ||
| OS: | Solaris | ||
|
Description
Peter Gray
2013-01-11 09:31:38 AEDT
More info: This seems to occur only if use_login is set. If not, the uid has already been set to the target user and all works as expected. One fix is if running as root, set the effective uid of the process to the target user before the call to chdir and reset euid to root after the rc files have been read. A better fix is to avoid the while chdir and rc file stuff if use_login is set. UseLogin was deprecated some time ago, the only remaining chdir() definitely happens after privileges are dropped. The calls occur in the same function: https://github.com/openssh/openssh-portable/blob/V_8_1_P1/session.c#L1546 https://github.com/openssh/openssh-portable/blob/V_8_1_P1/session.c#L1622 closing resolved bugs as of 8.6p1 release |