summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-03-08 21:00:36 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-08 21:00:36 +0100
commit681efe20d327e9e6774b174a617d66bbb9d21f48 (patch)
tree4331e443ee303c24364b1655651c8584db8b51c1 /include
parent86cf0364bd58e07646a23a1128e4a9ea79189579 (diff)
use user's shell instead of hardwired "/bin/sh" (android needs this)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/archive.h1
-rw-r--r--include/libbb.h9
2 files changed, 9 insertions, 1 deletions
diff --git a/include/archive.h b/include/archive.h
index 181c187f7..b139dc5be 100644
--- a/include/archive.h
+++ b/include/archive.h
@@ -84,6 +84,7 @@ typedef struct archive_handle_t {
# endif
#if ENABLE_FEATURE_TAR_TO_COMMAND
char* tar__to_command;
+ const char* tar__to_command_shell;
#endif
# if ENABLE_FEATURE_TAR_SELINUX
char* tar__global_sctx;
diff --git a/include/libbb.h b/include/libbb.h
index c26012c5d..c371e35f2 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1198,10 +1198,17 @@ char *bb_simplify_path(const char *path) FAST_FUNC;
/* Returns ptr to NUL */
char *bb_simplify_abs_path_inplace(char *path) FAST_FUNC;
-#define FAIL_DELAY 3
+#define LOGIN_FAIL_DELAY 3
extern void bb_do_delay(int seconds) FAST_FUNC;
extern void change_identity(const struct passwd *pw) FAST_FUNC;
extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC;
+
+/* Returns $SHELL, getpwuid(getuid())->pw_shell, or DEFAULT_SHELL.
+ * Note that getpwuid result might need xstrdup'ing
+ * if there is a possibility of intervening getpwxxx() calls.
+ */
+const char *get_shell_name(void);
+
#if ENABLE_SELINUX
extern void renew_current_security_context(void) FAST_FUNC;
extern void set_current_security_context(security_context_t sid) FAST_FUNC;