[BACK]Return to kern_exec.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/kern_exec.c between version 1.514 and 1.515

version 1.514, 2021/11/26 08:06:12 version 1.515, 2022/02/05 23:10:20
Line 1038  pathexec(struct proc *p, const char *res
Line 1038  pathexec(struct proc *p, const char *res
   
 /* XXX elsewhere */  /* XXX elsewhere */
 static int  static int
 credexec(struct lwp *l, struct vattr *attr)  credexec(struct lwp *l, struct execve_data *data)
 {  {
         struct proc *p = l->l_proc;          struct proc *p = l->l_proc;
           struct vattr *attr = &data->ed_attr;
         int error;          int error;
   
         /*          /*
Line 1061  credexec(struct lwp *l, struct vattr *at
Line 1062  credexec(struct lwp *l, struct vattr *at
                  */                   */
                 proc_crmod_enter();                  proc_crmod_enter();
                 proc_crmod_leave(NULL, NULL, true);                  proc_crmod_leave(NULL, NULL, true);
                   if (data->ed_argc == 0) {
                           DPRINTF((
                               "%s: not executing set[ug]id binary with no args\n",
                               __func__));
                           return EINVAL;
                   }
   
                 /* Make sure file descriptors 0..2 are in use. */                  /* Make sure file descriptors 0..2 are in use. */
                 if ((error = fd_checkstd()) != 0) {                  if ((error = fd_checkstd()) != 0) {
Line 1273  execve_runproc(struct lwp *l, struct exe
Line 1280  execve_runproc(struct lwp *l, struct exe
         p->p_flag |= PK_EXEC;          p->p_flag |= PK_EXEC;
         mutex_exit(p->p_lock);          mutex_exit(p->p_lock);
   
         error = credexec(l, &data->ed_attr);          error = credexec(l, data);
         if (error)          if (error)
                 goto exec_abort;                  goto exec_abort;
   

Legend:
Removed from v.1.514  
changed lines
  Added in v.1.515

CVSweb <webmaster@jp.NetBSD.org>