| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/fs/binfmt_em86.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 47 | 48 | if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE) |
|---|
| 48 | 49 | return -ENOENT; |
|---|
| 49 | 50 | |
|---|
| 50 | | - allow_write_access(bprm->file); |
|---|
| 51 | | - fput(bprm->file); |
|---|
| 52 | | - bprm->file = NULL; |
|---|
| 53 | | - |
|---|
| 54 | 51 | /* Unlike in the script case, we don't have to do any hairy |
|---|
| 55 | 52 | * parsing to find our interpreter... it's hardcoded! |
|---|
| 56 | 53 | */ |
|---|
| .. | .. |
|---|
| 67 | 64 | * user environment and arguments are stored. |
|---|
| 68 | 65 | */ |
|---|
| 69 | 66 | remove_arg_zero(bprm); |
|---|
| 70 | | - retval = copy_strings_kernel(1, &bprm->filename, bprm); |
|---|
| 67 | + retval = copy_string_kernel(bprm->filename, bprm); |
|---|
| 71 | 68 | if (retval < 0) return retval; |
|---|
| 72 | 69 | bprm->argc++; |
|---|
| 73 | 70 | if (i_arg) { |
|---|
| 74 | | - retval = copy_strings_kernel(1, &i_arg, bprm); |
|---|
| 71 | + retval = copy_string_kernel(i_arg, bprm); |
|---|
| 75 | 72 | if (retval < 0) return retval; |
|---|
| 76 | 73 | bprm->argc++; |
|---|
| 77 | 74 | } |
|---|
| 78 | | - retval = copy_strings_kernel(1, &i_name, bprm); |
|---|
| 75 | + retval = copy_string_kernel(i_name, bprm); |
|---|
| 79 | 76 | if (retval < 0) return retval; |
|---|
| 80 | 77 | bprm->argc++; |
|---|
| 81 | 78 | |
|---|
| .. | .. |
|---|
| 88 | 85 | if (IS_ERR(file)) |
|---|
| 89 | 86 | return PTR_ERR(file); |
|---|
| 90 | 87 | |
|---|
| 91 | | - bprm->file = file; |
|---|
| 92 | | - |
|---|
| 93 | | - retval = prepare_binprm(bprm); |
|---|
| 94 | | - if (retval < 0) |
|---|
| 95 | | - return retval; |
|---|
| 96 | | - |
|---|
| 97 | | - return search_binary_handler(bprm); |
|---|
| 88 | + bprm->interpreter = file; |
|---|
| 89 | + return 0; |
|---|
| 98 | 90 | } |
|---|
| 99 | 91 | |
|---|
| 100 | 92 | static struct linux_binfmt em86_format = { |
|---|