Skip to content

Commit

Permalink
Do not override PATH on Android - use the PATH inherited from sshd
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikushin committed Jan 31, 2020
1 parent f056be7 commit 36f0bb4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,9 @@ subprocess(const char *tag, struct passwd *pw, const char *command,
/* Prepare a minimal environment for the child. */
envsize = 5;
child_env = xcalloc(sizeof(*child_env), envsize);
#ifndef __ANDROID__
child_set_env(&child_env, &envsize, "PATH", _PATH_STDPATH);
#endif
child_set_env(&child_env, &envsize, "USER", pw->pw_name);
child_set_env(&child_env, &envsize, "LOGNAME", pw->pw_name);
child_set_env(&child_env, &envsize, "HOME", pw->pw_dir);
Expand Down

0 comments on commit 36f0bb4

Please sign in to comment.