diff --git a/include/libbb.h b/include/libbb.h index ae94e921d..120e1c6d2 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -2265,12 +2265,12 @@ static ALWAYS_INLINE void* not_const_pp(const void *p) { return (void*)p; } * use bb_default_login_shell and following defines. * If you change LIBBB_DEFAULT_LOGIN_SHELL, * don't forget to change increment constant. */ -#define LIBBB_DEFAULT_LOGIN_SHELL "-/sbin/sh" +#define LIBBB_DEFAULT_LOGIN_SHELL "-/system/bin/sh" extern const char bb_default_login_shell[] ALIGN1; /* "/bin/sh" */ #define DEFAULT_SHELL (bb_default_login_shell+1) /* "sh" */ -#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+7) +#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+13) /* The following devices are the same on all systems. */ #define CURRENT_TTY "/dev/tty" diff --git a/libbb/get_shell_name.c b/libbb/get_shell_name.c index 5aebe9cdc..5af53bdda 100644 --- a/libbb/get_shell_name.c +++ b/libbb/get_shell_name.c @@ -17,6 +17,10 @@ const char* FAST_FUNC get_shell_name(void) if (shell && shell[0]) return shell; +#ifdef __ANDROID__ + return DEFAULT_SHELL_SHORT_NAME; +#endif + pw = getpwuid(getuid()); if (pw && pw->pw_shell && pw->pw_shell[0]) return pw->pw_shell;