aboutsummaryrefslogtreecommitdiff
path: root/archival
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 /archival
parent86cf0364bd58e07646a23a1128e4a9ea79189579 (diff)
downloadbusybox-681efe20d327e9e6774b174a617d66bbb9d21f48.tar.gz
use user's shell instead of hardwired "/bin/sh" (android needs this)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/libarchive/data_extract_to_command.c8
-rw-r--r--archival/tar.c1
2 files changed, 7 insertions, 2 deletions
diff --git a/archival/libarchive/data_extract_to_command.c b/archival/libarchive/data_extract_to_command.c
index 2bbab7641..0e977049d 100644
--- a/archival/libarchive/data_extract_to_command.c
+++ b/archival/libarchive/data_extract_to_command.c
@@ -99,8 +99,12 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
close(p[1]);
xdup2(p[0], STDIN_FILENO);
signal(SIGPIPE, SIG_DFL);
- execl(DEFAULT_SHELL, DEFAULT_SHELL_SHORT_NAME, "-c", archive_handle->tar__to_command, NULL);
- bb_perror_msg_and_die("can't execute '%s'", DEFAULT_SHELL);
+ execl(archive_handle->tar__to_command_shell,
+ archive_handle->tar__to_command_shell,
+ "-c",
+ archive_handle->tar__to_command,
+ NULL);
+ bb_perror_msg_and_die("can't execute '%s'", archive_handle->tar__to_command_shell);
}
close(p[0]);
/* Our caller is expected to do signal(SIGPIPE, SIG_IGN)
diff --git a/archival/tar.c b/archival/tar.c
index d43c8dee3..01b83d5e2 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -970,6 +970,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
putenv((char*)"TAR_FILETYPE=f");
signal(SIGPIPE, SIG_IGN);
tar_handle->action_data = data_extract_to_command;
+ IF_FEATURE_TAR_TO_COMMAND(tar_handle->tar__to_command_shell = xstrdup(get_shell_name());)
}
if (opt & OPT_KEEP_OLD)