mirror of
http://galexander.org/git/simplesshd.git
synced 2025-03-09 19:16:04 +00:00
don't clear the environment when spawning shells, so that android system
variables remain available (so you can run 'am' and 'pm')
This commit is contained in:
parent
02a3cbd14b
commit
2eb8fa9355
@ -912,6 +912,10 @@ static void execchild(void *user_data) {
|
|||||||
/* clear environment */
|
/* clear environment */
|
||||||
/* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD
|
/* if we're debugging using valgrind etc, we need to keep the LD_PRELOAD
|
||||||
* etc. This is hazardous, so should only be used for debugging. */
|
* etc. This is hazardous, so should only be used for debugging. */
|
||||||
|
#if 0
|
||||||
|
/* don't clear the environment so that we inherit all of the android
|
||||||
|
* system environment, which lets utilities like am (android manager?)
|
||||||
|
* and pm (package manager?) run */
|
||||||
#ifndef DEBUG_VALGRIND
|
#ifndef DEBUG_VALGRIND
|
||||||
#ifdef HAVE_CLEARENV
|
#ifdef HAVE_CLEARENV
|
||||||
clearenv();
|
clearenv();
|
||||||
@ -922,6 +926,7 @@ static void execchild(void *user_data) {
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_CLEARENV */
|
#endif /* HAVE_CLEARENV */
|
||||||
#endif /* DEBUG_VALGRIND */
|
#endif /* DEBUG_VALGRIND */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* We can only change uid/gid as root ... */
|
/* We can only change uid/gid as root ... */
|
||||||
|
Loading…
Reference in New Issue
Block a user