--- zzzz-none-000/linux-2.6.13.1/fs/exec.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/fs/exec.c 2007-08-17 12:10:39.000000000 +0000 @@ -19,7 +19,7 @@ * current->executable is only used by the procfs. This allows a dispatch * table to check for several different types of binary formats. We keep * trying until we recognize the file or we run out of supported binary - * formats. + * formats. */ #include @@ -85,7 +85,7 @@ fmt->next = formats; formats = fmt; write_unlock(&binfmt_lock); - return 0; + return 0; } EXPORT_SYMBOL(register_binfmt); @@ -466,7 +466,7 @@ stack_base += PAGE_SIZE; } up_write(&mm->mmap_sem); - + return 0; } @@ -674,7 +674,9 @@ */ if (!thread_group_leader(current)) { struct task_struct *leader = current->group_leader, *parent; +#if defined(CONFIG_PROC_FS) struct dentry *proc_dentry1, *proc_dentry2; +#endif /*--- #if defined(CONFIG_PROC_FS) ---*/ unsigned long exit_state, ptrace; /* @@ -687,8 +689,10 @@ spin_lock(&leader->proc_lock); spin_lock(¤t->proc_lock); +#if defined(CONFIG_PROC_FS) proc_dentry1 = proc_pid_unhash(current); proc_dentry2 = proc_pid_unhash(leader); +#endif /*--- #if defined(CONFIG_PROC_FS) ---*/ write_lock_irq(&tasklist_lock); BUG_ON(leader->tgid != current->tgid); @@ -737,8 +741,10 @@ write_unlock_irq(&tasklist_lock); spin_unlock(&leader->proc_lock); spin_unlock(¤t->proc_lock); +#if defined(CONFIG_PROC_FS) proc_pid_flush(proc_dentry1); proc_pid_flush(proc_dentry2); +#endif /*--- #if defined(CONFIG_PROC_FS) ---*/ BUG_ON(exit_state != EXIT_ZOMBIE); release_task(leader); @@ -789,7 +795,7 @@ BUG_ON(!thread_group_leader(current)); return 0; } - + /* * These functions flushes out all traces of the currently running executable * so that a new one can be started @@ -898,7 +904,7 @@ current->flags &= ~PF_RANDOMIZE; flush_thread(); - if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || + if (bprm->e_uid != current->euid || bprm->e_gid != current->egid || permission(bprm->file->f_dentry->d_inode,MAY_READ, NULL) || (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)) { suid_keys(current); @@ -909,7 +915,7 @@ group */ current->self_exec_id++; - + flush_signal_handlers(current, 0); flush_old_files(current->files); @@ -924,8 +930,8 @@ EXPORT_SYMBOL(flush_old_exec); -/* - * Fill the binprm structure from the inode. +/* + * Fill the binprm structure from the inode. * Check permissions, then read the first 128 (BINPRM_BUF_SIZE) bytes */ int prepare_binprm(struct linux_binprm *bprm)