taglinefilesource code
bprm73fs/binfmt_coff.cstatic int load_object (struct linux_binprm *bprm,
bprm112fs/binfmt_coff.cload_object (struct linux_binprm * bprm, struct pt_regs *regs, int lib_ok)
bprm114fs/binfmt_coff.cCOFF_FILHDR  *coff_hdr = (COFF_FILHDR *) bprm->buf;  /* COFF Header */
bprm132fs/binfmt_coff.cprintk ("binfmt_coff entry: %s\n", bprm->filename);
bprm190fs/binfmt_coff.cif (!bprm->inode->i_op ||
bprm191fs/binfmt_coff.c!bprm->inode->i_op->default_file_ops->mmap) {
bprm218fs/binfmt_coff.cstatus = read_exec (bprm->inode,       /* INODE for file       */
bprm379fs/binfmt_coff.cfd = open_inode (bprm->inode, O_RDONLY);
bprm440fs/binfmt_coff.cflush_old_exec (bprm);
bprm449fs/binfmt_coff.cbprm->p += change_ldt (0, bprm->page);
bprm450fs/binfmt_coff.cbprm->p -= MAX_ARG_PAGES*PAGE_SIZE;
bprm451fs/binfmt_coff.cbprm->p  = (unsigned long) create_tables ((char *) bprm->p,
bprm452fs/binfmt_coff.cbprm->argc,
bprm453fs/binfmt_coff.cbprm->envc,
bprm464fs/binfmt_coff.ccurrent->euid        = bprm->e_uid;
bprm466fs/binfmt_coff.ccurrent->egid        = bprm->e_gid;
bprm467fs/binfmt_coff.ccurrent->executable  = bprm->inode; /* Store inode for file  */
bprm468fs/binfmt_coff.c++bprm->inode->i_count;             /* Count the open inode  */
bprm471fs/binfmt_coff.ccurrent->start_stack = bprm->p;
bprm539fs/binfmt_coff.cstatus = preload_library (bprm, sect_ptr, fp);
bprm723fs/binfmt_coff.cload_coff_binary (struct linux_binprm *bprm, struct pt_regs *regs)
bprm725fs/binfmt_coff.creturn (load_object (bprm, regs, 1));
bprm737fs/binfmt_coff.cstruct linux_binprm *bprm;  /* Parameters for the load operation   */
bprm742fs/binfmt_coff.cbprm = (struct linux_binprm *) kmalloc (sizeof (struct linux_binprm),
bprm744fs/binfmt_coff.cif (0 == bprm) {
bprm755fs/binfmt_coff.cmemset (bprm, '\0', sizeof (struct linux_binprm));
bprm758fs/binfmt_coff.cbprm->inode    = file->f_inode;   /* The only item _really_ needed */
bprm759fs/binfmt_coff.cbprm->filename = "";              /* Make it a legal string        */
bprm764fs/binfmt_coff.cstatus = read_exec (bprm->inode,   /* INODE for file       */
bprm766fs/binfmt_coff.cbprm->buf,           /* Buffer for read      */
bprm767fs/binfmt_coff.csizeof (bprm->buf)); /* Size of the buffer   */
bprm772fs/binfmt_coff.cstatus = load_object (bprm, &regs, 0);
bprm776fs/binfmt_coff.ckfree (bprm);                 /* Release the buffer area */
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,0);
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 */
bprm460fs/exec.cvoid flush_old_exec(struct linux_binprm * bprm)
bprm468fs/exec.cname = bprm->filename;
bprm511fs/exec.cif (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
bprm512fs/exec.c!permission(bprm->inode,MAY_READ))
bprm537fs/exec.cstruct linux_binprm bprm;
bprm546fs/exec.cbprm.p = PAGE_SIZE*MAX_ARG_PAGES-4;
bprm548fs/exec.cbprm.page[i] = 0;
bprm549fs/exec.cretval = open_namei(filename, 0, 0, &bprm.inode, NULL);
bprm552fs/exec.cbprm.filename = filename;
bprm553fs/exec.cbprm.argc = count(argv);
bprm554fs/exec.cbprm.envc = count(envp);
bprm557fs/exec.cif (!S_ISREG(bprm.inode->i_mode)) {  /* must be regular file */
bprm561fs/exec.cif (IS_NOEXEC(bprm.inode)) {    /* FS mustn't be mounted noexec */
bprm565fs/exec.cif (!bprm.inode->i_sb) {
bprm569fs/exec.ci = bprm.inode->i_mode;
bprm570fs/exec.cif (IS_NOSUID(bprm.inode) && (((i & S_ISUID) && bprm.inode->i_uid != current->
bprm571fs/exec.ceuid) || ((i & S_ISGID) && !in_group_p(bprm.inode->i_gid))) &&
bprm578fs/exec.cbprm.e_uid = current->euid;
bprm579fs/exec.cbprm.e_gid = current->egid;
bprm581fs/exec.cbprm.e_uid = (i & S_ISUID) ? bprm.inode->i_uid : current->euid;
bprm582fs/exec.cbprm.e_gid = (i & S_ISGID) ? bprm.inode->i_gid : current->egid;
bprm584fs/exec.cif (current->euid == bprm.inode->i_uid)
bprm586fs/exec.celse if (in_group_p(bprm.inode->i_gid))
bprm589fs/exec.c!((bprm.inode->i_mode & 0111) && suser())) {
bprm593fs/exec.cmemset(bprm.buf,0,sizeof(bprm.buf));
bprm596fs/exec.cretval = read_exec(bprm.inode,0,bprm.buf,128);
bprm600fs/exec.cif ((bprm.buf[0] == '#') && (bprm.buf[1] == '!') && (!sh_bang)) {
bprm608fs/exec.ciput(bprm.inode);
bprm609fs/exec.cbprm.buf[127] = '\0';
bprm610fs/exec.cif ((cp = strchr(bprm.buf, '\n')) == NULL)
bprm611fs/exec.ccp = bprm.buf+127;
bprm613fs/exec.cwhile (cp > bprm.buf) {
bprm620fs/exec.cfor (cp = bprm.buf+2; (*cp == ' ') || (*cp == '\t'); cp++);
bprm640fs/exec.cbprm.p = copy_strings(bprm.envc, envp, bprm.page, bprm.p, 0);
bprm641fs/exec.cbprm.p = copy_strings(--bprm.argc, argv+1, bprm.page, bprm.p, 0);
bprm651fs/exec.cbprm.p = copy_strings(1, &bprm.filename, bprm.page, bprm.p, 2);
bprm652fs/exec.cbprm.argc++;
bprm654fs/exec.cbprm.p = copy_strings(1, &i_arg, bprm.page, bprm.p, 2);
bprm655fs/exec.cbprm.argc++;
bprm657fs/exec.cbprm.p = copy_strings(1, &i_name, bprm.page, bprm.p, 2);
bprm658fs/exec.cbprm.argc++;
bprm659fs/exec.cif (!bprm.p) {
bprm668fs/exec.cretval = open_namei(interp, 0, 0, &bprm.inode, NULL);
bprm674fs/exec.cbprm.p = copy_strings(bprm.envc,envp,bprm.page,bprm.p,0);
bprm675fs/exec.cbprm.p = copy_strings(bprm.argc,argv,bprm.page,bprm.p,0);
bprm676fs/exec.cif (!bprm.p) {
bprm682fs/exec.cbprm.sh_bang = sh_bang;
bprm688fs/exec.cretval = fn(&bprm, regs);
bprm690fs/exec.ciput(bprm.inode);
bprm696fs/exec.ciput(bprm.inode);
bprm699fs/exec.cfree_page(bprm.page[i]);
bprm757fs/exec.cint load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
bprm762fs/exec.cunsigned long p = bprm->p;
bprm764fs/exec.cex = *((struct exec *) bprm->buf);    /* exec-header */
bprm768fs/exec.cbprm->inode->i_size < ex.a_text+ex.a_data+ex.a_syms+N_TXTOFF(ex)) {
bprm773fs/exec.c(N_TXTOFF(ex) < bprm->inode->i_sb->s_blocksize)) {
bprm784fs/exec.cflush_old_exec(bprm);
bprm791fs/exec.ccurrent->suid = current->euid = bprm->e_uid;
bprm794fs/exec.ccurrent->sgid = current->egid = bprm->e_gid;
bprm799fs/exec.cread_exec(bprm->inode, 32, (char *) 0, ex.a_text+ex.a_data);
bprm804fs/exec.cfd = open_inode(bprm->inode, O_RDONLY);
bprm814fs/exec.cread_exec(bprm->inode, N_TXTOFF(ex),
bprm836fs/exec.ccurrent->executable = bprm->inode;
bprm837fs/exec.cbprm->inode->i_count++;
bprm842fs/exec.cp += change_ldt(ex.a_text,bprm->page);
bprm844fs/exec.cp = (unsigned long) create_tables((char *)p,bprm->argc,bprm->envc,0);
bprm42include/linux/binfmts.hextern void flush_old_exec(struct linux_binprm * bprm);