[BACK]Return to tty.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/tty.c between version 1.179.8.1 and 1.179.8.2

version 1.179.8.1, 2006/03/13 09:07:32 version 1.179.8.2, 2006/05/24 10:58:41
Line 61  __KERNEL_RCSID(0, "$NetBSD$");
Line 61  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/kprintf.h>  #include <sys/kprintf.h>
 #include <sys/namei.h>  #include <sys/namei.h>
 #include <sys/sysctl.h>  #include <sys/sysctl.h>
   #include <sys/kauth.h>
   
 #include <machine/stdarg.h>  #include <machine/stdarg.h>
   
Line 922  ttioctl(struct tty *tp, u_long cmd, cadd
Line 923  ttioctl(struct tty *tp, u_long cmd, cadd
                             "/dev/console", l);                              "/dev/console", l);
                         if ((error = namei(&nd)) != 0)                          if ((error = namei(&nd)) != 0)
                                 return error;                                  return error;
                         error = VOP_ACCESS(nd.ni_vp, VREAD, p->p_ucred, l);                          error = VOP_ACCESS(nd.ni_vp, VREAD, p->p_cred, l);
                         vput(nd.ni_vp);                          vput(nd.ni_vp);
                         if (error)                          if (error)
                                 return error;                                  return error;
Line 1111  ttioctl(struct tty *tp, u_long cmd, cadd
Line 1112  ttioctl(struct tty *tp, u_long cmd, cadd
                 splx(s);                  splx(s);
                 break;                  break;
         case TIOCSTI:                   /* simulate terminal input */          case TIOCSTI:                   /* simulate terminal input */
                 if (p->p_ucred->cr_uid && (flag & FREAD) == 0)                  if (kauth_cred_geteuid(p->p_cred) && (flag & FREAD) == 0)
                         return (EPERM);                          return (EPERM);
                 if (p->p_ucred->cr_uid && !isctty(p, tp))                  if (kauth_cred_geteuid(p->p_cred) && !isctty(p, tp))
                         return (EACCES);                          return (EACCES);
                 (*tp->t_linesw->l_rint)(*(u_char *)data, tp);                  (*tp->t_linesw->l_rint)(*(u_char *)data, tp);
                 break;                  break;
Line 1650  ttread(struct tty *tp, struct uio *uio, 
Line 1651  ttread(struct tty *tp, struct uio *uio, 
         long            lflag, slp;          long            lflag, slp;
         struct timeval  stime;          struct timeval  stime;
   
           stime.tv_usec = 0;      /* XXX gcc */
           stime.tv_sec = 0;       /* XXX gcc */
   
         cc = tp->t_cc;          cc = tp->t_cc;
         p = curproc;          p = curproc;
         error = 0;          error = 0;

Legend:
Removed from v.1.179.8.1  
changed lines
  Added in v.1.179.8.2

CVSweb <webmaster@jp.NetBSD.org>