execve: Use interp in shebang as is

Fujitsu: POSTK_DEBUG_TEMP_FIX_9
Refs: #995
Change-Id: I09751d13c4fecd68087d47815029c0b65e51f18a
This commit is contained in:
Ken Sato
2018-07-04 14:04:31 +09:00
committed by Masamichi Takagi
parent f1a40a409f
commit b920da5103
7 changed files with 265 additions and 8 deletions

View File

@@ -3771,22 +3771,14 @@ fork_err:
goto return_execve1;
}
#ifdef POSTK_DEBUG_TEMP_FIX_9 /* shell-script run via execve arg[0] fix */
if (strlen(shell) >= SHELL_PATH_MAX_LEN) {
#else /* POSTK_DEBUG_TEMP_FIX_9 */
if (strlen(shell_path) >= SHELL_PATH_MAX_LEN) {
#endif /* POSTK_DEBUG_TEMP_FIX_9 */
fprintf(stderr, "execve(): error: shell path too long: %s\n", shell_path);
ret = ENAMETOOLONG;
goto return_execve1;
}
/* Let the LWK know the shell interpreter */
#ifdef POSTK_DEBUG_TEMP_FIX_9 /* shell-script run via execve arg[0] fix */
strcpy(desc->shell_path, shell);
#else /* POSTK_DEBUG_TEMP_FIX_9 */
strcpy(desc->shell_path, shell_path);
#endif /* POSTK_DEBUG_TEMP_FIX_9 */
}
desc->enable_vdso = enable_vdso;