Lines Matching refs:bprm
68 static Node *check_file(struct linux_binprm *bprm)
70 char *p = strrchr(bprm->interp, '.');
87 s = bprm->buf + e->offset;
106 static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
120 if (bprm->recursion_depth > BINPRM_MAX_RECURSION)
125 fmt = check_file(bprm);
133 retval = remove_arg_zero(bprm);
148 fd_install(fd_binary, bprm->file);
152 if (file_permission(bprm->file, MAY_READ))
153 bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
155 allow_write_access(bprm->file);
156 bprm->file = NULL;
158 /* mark the bprm that fd should be passed to interp */
159 bprm->interp_flags |= BINPRM_FLAGS_EXECFD;
160 bprm->interp_data = fd_binary;
163 allow_write_access(bprm->file);
164 fput(bprm->file);
165 bprm->file = NULL;
168 retval = copy_strings_kernel (1, &bprm->interp, bprm);
171 bprm->argc++;
174 retval = copy_strings_kernel (1, &iname_addr, bprm);
177 bprm->argc ++;
179 bprm->interp = iname; /* for binfmt_script */
186 bprm->file = interp_file;
190 * done. bprm->buf is stale, update from interp_file.
192 memset(bprm->buf, 0, BINPRM_BUF_SIZE);
193 retval = kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE);
195 retval = prepare_binprm (bprm);
200 bprm->recursion_depth++;
202 retval = search_binary_handler (bprm, regs);
211 bprm->interp_flags = 0;
212 bprm->interp_data = 0;