mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 05:17:28 +00:00
parent
26feb8f13e
commit
8d11116dcb
@ -1033,9 +1033,14 @@ static void execchild(const void *user_data) {
|
||||
|
||||
/* change directory */
|
||||
if (chdir(ses.authstate.pw_dir) < 0) {
|
||||
dropbear_exit("Error changing directory");
|
||||
int e = errno;
|
||||
if (chdir("/") < 0) {
|
||||
dropbear_exit("chdir(\"/\") failed");
|
||||
}
|
||||
fprintf(stderr, "Failed chdir '%s': %s\n", ses.authstate.pw_dir, strerror(e));
|
||||
}
|
||||
|
||||
|
||||
#if DROPBEAR_X11FWD
|
||||
/* set up X11 forwarding if enabled */
|
||||
x11setauth(chansess);
|
||||
|
Loading…
Reference in New Issue
Block a user