taglinefilesource code
bprm51fs/binfmt_elf.cint load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
bprm72fs/binfmt_elf.celf_ex = *((struct elfhdr *) bprm->buf);    /* exec-header */
bprm82fs/binfmt_elf.c(!bprm->inode->i_op || !bprm->inode->i_op->default_file_ops ||
bprm83fs/binfmt_elf.c!bprm->inode->i_op->default_file_ops->mmap)){
bprm94fs/binfmt_elf.cretval = read_exec(bprm->inode, elf_ex.e_phoff, (char *) elf_phdata,
bprm107fs/binfmt_elf.celf_exec_fileno = open_inode(bprm->inode, O_RDONLY);
bprm133fs/binfmt_elf.cretval = read_exec(bprm->inode,elf_ppnt->p_offset,elf_interpreter,
bprm141fs/binfmt_elf.cretval = read_exec(interpreter_inode,0,bprm->buf,128);
bprm144fs/binfmt_elf.cex = *((struct exec *) bprm->buf);    /* exec-header */
bprm173fs/binfmt_elf.cif (!bprm->sh_bang) {
bprm180fs/binfmt_elf.cbprm->p = copy_strings(1,&passed_p,bprm->page,bprm->p,2);
bprm181fs/binfmt_elf.cbprm->argc++;
bprm183fs/binfmt_elf.cif (!bprm->p) {
bprm193fs/binfmt_elf.cflush_old_exec(bprm);
bprm204fs/binfmt_elf.cbprm->p += change_ldt(0, bprm->page);
bprm205fs/binfmt_elf.ccurrent->start_stack = bprm->p;
bprm304fs/binfmt_elf.ccurrent->executable = bprm->inode;
bprm305fs/binfmt_elf.cbprm->inode->i_count++;
bprm309fs/binfmt_elf.cbprm->p -= MAX_ARG_PAGES*PAGE_SIZE;
bprm310fs/binfmt_elf.cbprm->p = (unsigned long) create_tables((char *)bprm->p,bprm->argc,bprm->envc);
bprm316fs/binfmt_elf.ccurrent->start_stack = bprm->p;
bprm317fs/binfmt_elf.ccurrent->suid = current->euid = bprm->e_uid;
bprm318fs/binfmt_elf.ccurrent->sgid = current->egid = bprm->e_gid;
bprm328fs/binfmt_elf.cregs->esp = bprm->p;      /* stack pointer */
bprm458fs/exec.cvoid flush_old_exec(struct linux_binprm * bprm)
bprm466fs/exec.cname = bprm->filename;
bprm509fs/exec.cif (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
bprm510fs/exec.c!permission(bprm->inode,MAY_READ))
bprm535fs/exec.cstruct linux_binprm bprm;
bprm544fs/exec.cbprm.p = PAGE_SIZE*MAX_ARG_PAGES-4;
bprm546fs/exec.cbprm.page[i] = 0;
bprm547fs/exec.cretval = open_namei(filename, 0, 0, &bprm.inode, NULL);
bprm550fs/exec.cbprm.filename = filename;
bprm551fs/exec.cbprm.argc = count(argv);
bprm552fs/exec.cbprm.envc = count(envp);
bprm555fs/exec.cif (!S_ISREG(bprm.inode->i_mode)) {  /* must be regular file */
bprm559fs/exec.cif (IS_NOEXEC(bprm.inode)) {    /* FS mustn't be mounted noexec */
bprm563fs/exec.cif (!bprm.inode->i_sb) {
bprm567fs/exec.ci = bprm.inode->i_mode;
bprm568fs/exec.cif (IS_NOSUID(bprm.inode) && (((i & S_ISUID) && bprm.inode->i_uid != current->
bprm569fs/exec.ceuid) || ((i & S_ISGID) && !in_group_p(bprm.inode->i_gid))) &&
bprm576fs/exec.cbprm.e_uid = current->euid;
bprm577fs/exec.cbprm.e_gid = current->egid;
bprm579fs/exec.cbprm.e_uid = (i & S_ISUID) ? bprm.inode->i_uid : current->euid;
bprm580fs/exec.cbprm.e_gid = (i & S_ISGID) ? bprm.inode->i_gid : current->egid;
bprm582fs/exec.cif (current->euid == bprm.inode->i_uid)
bprm584fs/exec.celse if (in_group_p(bprm.inode->i_gid))
bprm587fs/exec.c!((bprm.inode->i_mode & 0111) && suser())) {
bprm591fs/exec.cmemset(bprm.buf,0,sizeof(bprm.buf));
bprm594fs/exec.cretval = read_exec(bprm.inode,0,bprm.buf,128);
bprm598fs/exec.cif ((bprm.buf[0] == '#') && (bprm.buf[1] == '!') && (!sh_bang)) {
bprm606fs/exec.ciput(bprm.inode);
bprm607fs/exec.cbprm.buf[127] = '\0';
bprm608fs/exec.cif ((cp = strchr(bprm.buf, '\n')) == NULL)
bprm609fs/exec.ccp = bprm.buf+127;
bprm611fs/exec.cwhile (cp > bprm.buf) {
bprm618fs/exec.cfor (cp = bprm.buf+2; (*cp == ' ') || (*cp == '\t'); cp++);
bprm638fs/exec.cbprm.p = copy_strings(bprm.envc, envp, bprm.page, bprm.p, 0);
bprm639fs/exec.cbprm.p = copy_strings(--bprm.argc, argv+1, bprm.page, bprm.p, 0);
bprm649fs/exec.cbprm.p = copy_strings(1, &bprm.filename, bprm.page, bprm.p, 2);
bprm650fs/exec.cbprm.argc++;
bprm652fs/exec.cbprm.p = copy_strings(1, &i_arg, bprm.page, bprm.p, 2);
bprm653fs/exec.cbprm.argc++;
bprm655fs/exec.cbprm.p = copy_strings(1, &i_name, bprm.page, bprm.p, 2);
bprm656fs/exec.cbprm.argc++;
bprm657fs/exec.cif (!bprm.p) {
bprm666fs/exec.cretval = open_namei(interp, 0, 0, &bprm.inode, NULL);
bprm672fs/exec.cbprm.p = copy_strings(bprm.envc,envp,bprm.page,bprm.p,0);
bprm673fs/exec.cbprm.p = copy_strings(bprm.argc,argv,bprm.page,bprm.p,0);
bprm674fs/exec.cif (!bprm.p) {
bprm680fs/exec.cbprm.sh_bang = sh_bang;
bprm686fs/exec.cretval = fn(&bprm, regs);
bprm688fs/exec.ciput(bprm.inode);
bprm694fs/exec.ciput(bprm.inode);
bprm697fs/exec.cfree_page(bprm.page[i]);
bprm744fs/exec.cint load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
bprm749fs/exec.cunsigned long p = bprm->p;
bprm751fs/exec.cex = *((struct exec *) bprm->buf);    /* exec-header */
bprm755fs/exec.cbprm->inode->i_size < ex.a_text+ex.a_data+ex.a_syms+N_TXTOFF(ex)) {
bprm760fs/exec.c(N_TXTOFF(ex) < bprm->inode->i_sb->s_blocksize)) {
bprm771fs/exec.cflush_old_exec(bprm);
bprm778fs/exec.ccurrent->suid = current->euid = bprm->e_uid;
bprm781fs/exec.ccurrent->sgid = current->egid = bprm->e_gid;
bprm786fs/exec.cread_exec(bprm->inode, 32, (char *) 0, ex.a_text+ex.a_data);
bprm791fs/exec.cfd = open_inode(bprm->inode, O_RDONLY);
bprm801fs/exec.cread_exec(bprm->inode, N_TXTOFF(ex),
bprm823fs/exec.ccurrent->executable = bprm->inode;
bprm824fs/exec.cbprm->inode->i_count++;
bprm829fs/exec.cp += change_ldt(ex.a_text,bprm->page);
bprm831fs/exec.cp = (unsigned long) create_tables((char *)p,bprm->argc,bprm->envc);
bprm42include/linux/binfmts.hextern void flush_old_exec(struct linux_binprm * bprm);