Searched refs:bprm (Results 1 - 25 of 34) sorted by relevance

12

/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/
H A Dbinfmt_em86.c26 static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) argument
34 elf_ex = *((struct elfhdr *)bprm->buf);
42 (!bprm->file->f_op || !bprm->file->f_op->mmap)) {
46 bprm->sh_bang++; /* Well, the bang-shell is implicit... */
47 allow_write_access(bprm->file);
48 fput(bprm->file);
49 bprm->file = NULL;
66 remove_arg_zero(bprm);
67 retval = copy_strings_kernel(1, &bprm
[all...]
H A Dbinfmt_script.c18 static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) argument
25 if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') || (bprm->sh_bang))
32 bprm->sh_bang++;
33 allow_write_access(bprm->file);
34 fput(bprm->file);
35 bprm->file = NULL;
37 bprm->buf[BINPRM_BUF_SIZE - 1] = '\0';
38 if ((cp = strchr(bprm
[all...]
H A Dexec.c211 struct linux_binprm *bprm)
223 !(len = strnlen_user(str, bprm->p))) {
228 if (bprm->p < len) {
233 bprm->p -= len;
234 pos = bprm->p;
243 page = bprm->page[i];
247 bprm->page[i] = page;
291 int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm) argument
296 r = copy_strings(argc, (char __user * __user *)argv, bprm);
344 int setup_arg_pages(struct linux_binprm *bprm, argument
210 copy_strings(int argc, char __user * __user * argv, struct linux_binprm *bprm) argument
464 free_arg_pages(struct linux_binprm *bprm) argument
827 flush_old_exec(struct linux_binprm * bprm) argument
921 prepare_binprm(struct linux_binprm *bprm) argument
981 compute_creds(struct linux_binprm *bprm) argument
1002 remove_arg_zero(struct linux_binprm *bprm) argument
1045 search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) argument
1154 struct linux_binprm *bprm; local
[all...]
H A Dbinfmt_som.c39 static int load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs);
65 static void create_som_tables(struct linux_binprm *bprm) argument
68 int argc = bprm->argc;
69 int envc = bprm->envc;
74 sp = (unsigned long *)((bprm->p + 3) & ~3);
86 bprm->p = (unsigned long) sp;
186 load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) argument
197 som_ex = (struct som_hdr *) bprm->buf;
213 retval = kernel_read(bprm->file, som_ex->aux_header_location,
233 get_file(bprm
[all...]
H A Dbinfmt_flat.c106 struct linux_binprm * bprm)
111 int argc = bprm->argc;
112 int envc = bprm->envc;
167 struct linux_binprm *bprm,
195 ret = bprm->file->f_op->read(bprm->file, buf, LBUFSIZE, &fpos);
265 ret = bprm->file->f_op->read(bprm->file, buf, LBUFSIZE, &fpos);
412 static int load_flat_file(struct linux_binprm * bprm, argument
428 hdr = ((struct flat_hdr *) bprm
104 create_flat_tables( unsigned long pp, struct linux_binprm * bprm) argument
166 decompress_exec( struct linux_binprm *bprm, unsigned long offset, char *dst, long len, int fd) argument
804 struct linux_binprm bprm; local
838 load_flat_binary(struct linux_binprm * bprm, struct pt_regs * regs) argument
[all...]
H A Dbinfmt_misc.c67 static Node *check_file(struct linux_binprm *bprm) argument
69 char *p = strrchr(bprm->interp, '.');
86 s = bprm->buf + e->offset;
105 static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) argument
121 fmt = check_file(bprm);
129 remove_arg_zero(bprm);
150 fd_install(fd_binary, bprm->file);
154 if (file_permission(bprm->file, MAY_READ))
155 bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
157 allow_write_access(bprm
[all...]
H A Dbinfmt_aout.c202 static unsigned long __user *create_aout_tables(char __user *p, struct linux_binprm * bprm) argument
207 int argc = bprm->argc;
208 int envc = bprm->envc;
220 if (bprm->loader) {
223 put_user(bprm->loader, --sp);
226 put_user(bprm->exec, --sp);
266 static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) argument
274 ex = *((struct exec *) bprm->buf); /* exec-header */
278 i_size_read(bprm->file->f_path.dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
286 if (!bprm
[all...]
H A Dcompat.c1256 struct linux_binprm *bprm)
1268 !(len = strnlen_user(compat_ptr(str), bprm->p))) {
1273 if (bprm->p < len) {
1278 bprm->p -= len;
1279 pos = bprm->p;
1288 page = bprm->page[i];
1292 bprm->page[i] = page;
1336 #define free_arg_pages(bprm) do { } while (0)
1340 static inline void free_arg_pages(struct linux_binprm *bprm) argument
1345 if (bprm
1255 compat_copy_strings(int argc, compat_uptr_t __user *argv, struct linux_binprm *bprm) argument
1362 struct linux_binprm *bprm; local
[all...]
H A Dbinfmt_elf.c46 static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs);
135 create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec, argument
139 unsigned long p = bprm->p;
140 int argc = bprm->argc;
141 int envc = bprm->envc;
203 NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm));
208 if (bprm->interp_flags & BINPRM_FLAGS_EXECFD) {
209 NEW_AUX_ENT(AT_EXECFD, bprm->interp_data);
227 bprm->p = STACK_ROUND(sp, items);
231 sp = (elf_addr_t __user *)bprm
529 load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) argument
[all...]
H A Dbinfmt_elf_fdpic.c156 static int load_elf_fdpic_binary(struct linux_binprm *bprm, argument
178 exec_params.hdr = *(struct elfhdr *) bprm->buf;
183 if (!is_elf_fdpic(&exec_params.hdr, bprm->file))
187 retval = elf_fdpic_fetch_phdrs(&exec_params, bprm->file);
209 retval = kernel_read(bprm->file,
236 bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
238 retval = kernel_read(interpreter, 0, bprm->buf,
243 interp_params.hdr = *((struct elfhdr *) bprm->buf);
296 retval = flush_old_exec(bprm);
322 retval = setup_arg_pages(bprm, curren
454 create_elf_fdpic_tables(struct linux_binprm *bprm, struct mm_struct *mm, struct elf_fdpic_params *exec_params, struct elf_fdpic_params *interp_params) argument
646 elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *_sp) argument
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/security/
H A Dcommoncap.c111 int cap_bprm_set_security (struct linux_binprm *bprm) argument
116 cap_clear (bprm->cap_inheritable);
117 cap_clear (bprm->cap_permitted);
118 cap_clear (bprm->cap_effective);
129 if (bprm->e_uid == 0 || current->uid == 0) {
130 cap_set_full (bprm->cap_inheritable);
131 cap_set_full (bprm->cap_permitted);
133 if (bprm->e_uid == 0)
134 cap_set_full (bprm->cap_effective);
139 void cap_bprm_apply_creds (struct linux_binprm *bprm, in argument
182 cap_bprm_secureexec(struct linux_binprm *bprm) argument
[all...]
H A Droot_plug.c64 static int rootplug_bprm_check_security (struct linux_binprm *bprm) argument
69 bprm->filename, bprm->e_uid, bprm->e_gid);
71 if (bprm->e_gid == 0) {
H A Ddummy.c120 static int dummy_bprm_alloc_security (struct linux_binprm *bprm) argument
125 static void dummy_bprm_free_security (struct linux_binprm *bprm) argument
130 static void dummy_bprm_apply_creds (struct linux_binprm *bprm, int unsafe) argument
132 if (bprm->e_uid != current->uid || bprm->e_gid != current->gid) {
136 bprm->e_uid = current->uid;
137 bprm->e_gid = current->gid;
141 current->suid = current->euid = current->fsuid = bprm->e_uid;
142 current->sgid = current->egid = current->fsgid = bprm->e_gid;
147 static void dummy_bprm_post_apply_creds (struct linux_binprm *bprm) argument
152 dummy_bprm_set_security(struct linux_binprm *bprm) argument
157 dummy_bprm_check_security(struct linux_binprm *bprm) argument
162 dummy_bprm_secureexec(struct linux_binprm *bprm) argument
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/sparc64/kernel/
H A Dbinfmt_aout32.c152 static u32 __user *create_aout32_tables(char __user *p, struct linux_binprm *bprm) argument
157 int argc = bprm->argc;
158 int envc = bprm->envc;
199 static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) argument
208 ex = *((struct exec *) bprm->buf); /* exec-header */
212 bprm->file->f_path.dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
229 retval = flush_old_exec(bprm);
246 compute_creds(bprm);
254 bprm->file->f_op->read(bprm
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/include/linux/
H A Dbinfmts.h73 extern int flush_old_exec(struct linux_binprm * bprm);
85 extern int setup_arg_pages(struct linux_binprm * bprm,
88 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
H A Dsecurity.h49 extern int cap_bprm_set_security (struct linux_binprm *bprm);
50 extern void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe);
51 extern int cap_bprm_secureexec(struct linux_binprm *bprm);
108 * Allocate and attach a security structure to the @bprm->security field.
109 * The security field is initialized to NULL when the bprm structure is
111 * @bprm contains the linux_binprm structure to be modified.
114 * @bprm contains the linux_binprm structure to be modified.
115 * Deallocate and clear the @bprm->security field.
119 * and the information saved in @bprm->security by the set_security hook.
125 * @bprm contain
1476 security_bprm_alloc(struct linux_binprm *bprm) argument
1480 security_bprm_free(struct linux_binprm *bprm) argument
1484 security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe) argument
1488 security_bprm_post_apply_creds(struct linux_binprm *bprm) argument
1492 security_bprm_set(struct linux_binprm *bprm) argument
1497 security_bprm_check(struct linux_binprm *bprm) argument
1502 security_bprm_secureexec(struct linux_binprm *bprm) argument
2220 security_bprm_alloc(struct linux_binprm *bprm) argument
2225 security_bprm_free(struct linux_binprm *bprm) argument
2228 security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe) argument
2233 security_bprm_post_apply_creds(struct linux_binprm *bprm) argument
2238 security_bprm_set(struct linux_binprm *bprm) argument
2243 security_bprm_check(struct linux_binprm *bprm) argument
2248 security_bprm_secureexec(struct linux_binprm *bprm) argument
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/ia64/ia32/
H A Dbinfmt_elf32.c40 #define setup_arg_pages(bprm,tos,exec) ia32_setup_arg_pages(bprm,exec)
199 ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack) argument
207 mm->arg_start = bprm->p + stack_base;
209 bprm->p += stack_base;
210 if (bprm->loader)
211 bprm->loader += stack_base;
212 bprm->exec += stack_base;
221 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p;
240 struct page *page = bprm
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/x86_64/ia32/
H A Dia32_binfmt.c235 #define setup_arg_pages(bprm, stack_top, exec_stack) \
236 ia32_setup_arg_pages(bprm, stack_top, exec_stack)
237 int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack);
289 int ia32_setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, argument
298 mm->arg_start = bprm->p + stack_base;
300 bprm->p += stack_base;
301 if (bprm->loader)
302 bprm->loader += stack_base;
303 bprm->exec += stack_base;
312 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm
[all...]
H A Dia32_aout.c216 static u32 __user *create_aout_tables(char __user *p, struct linux_binprm *bprm) argument
221 int argc = bprm->argc;
222 int envc = bprm->envc;
259 static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) argument
267 ex = *((struct exec *) bprm->buf); /* exec-header */
271 i_size_read(bprm->file->f_path.dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
288 retval = flush_old_exec(bprm);
311 compute_creds(bprm);
332 error = bprm->file->f_op->read(bprm
[all...]
H A Dsyscall32.c28 int syscall32_setup_pages(struct linux_binprm *bprm, int exstack) argument
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/mips/kernel/
H A Dirixelf.c44 static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs);
410 static int verify_binary(struct elfhdr *ehp, struct linux_binprm *bprm) argument
417 !bprm->file->f_op->mmap) {
436 struct linux_binprm *bprm, int pnum)
456 retval = kernel_read(bprm->file, epp->p_offset, (*name + 16),
466 retval = kernel_read(file, 0, bprm->buf, 128);
470 *interp_elf_ex = *(struct elfhdr *) bprm->buf;
597 static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs) argument
612 elf_ex = *((struct elfhdr *) bprm->buf);
615 if (verify_binary(&elf_ex, bprm))
432 look_for_irix_interpreter(char **name, struct file **interpreter, struct elfhdr *interp_elf_ex, struct elf_phdr *epp, struct linux_binprm *bprm, int pnum) argument
[all...]
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/sh/kernel/vsyscall/
H A Dvsyscall.c57 int arch_setup_additional_pages(struct linux_binprm *bprm, argument
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/security/selinux/include/
H A Dobjsec.h84 struct linux_binprm *bprm; /* back pointer to bprm object */ member in struct:bprm_security_struct
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/include/asm-x86_64/
H A Dia32.h169 extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
/netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/include/asm-sh/
H A Delf.h127 extern int arch_setup_additional_pages(struct linux_binprm *bprm,

Completed in 275 milliseconds

12