aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_ioctl.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-09-19 20:09:27 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-19 20:09:27 -0400
commit0ce49a3945474fc942ec37c0c0efece60f592f80 (patch)
treef42b821b2d9e2d8775bc22f56d444c2cc7b7b7dd /drivers/char/tty_ioctl.c
parent9e4859ef5462193643fd2b3c8ffb298e5a4a4319 (diff)
parenta88a8eff1e6e32d3288986a9d36c6a449c032d3a (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/char/tty_ioctl.c')
-rw-r--r--drivers/char/tty_ioctl.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 4a8969cef315..3ee73cf64bd2 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -795,6 +795,19 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
795 if (L_ICANON(tty)) 795 if (L_ICANON(tty))
796 retval = inq_canon(tty); 796 retval = inq_canon(tty);
797 return put_user(retval, (unsigned int __user *) arg); 797 return put_user(retval, (unsigned int __user *) arg);
798#ifndef TCGETS2
799 case TIOCGLCKTRMIOS:
800 if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked))
801 return -EFAULT;
802 return 0;
803
804 case TIOCSLCKTRMIOS:
805 if (!capable(CAP_SYS_ADMIN))
806 return -EPERM;
807 if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg))
808 return -EFAULT;
809 return 0;
810#else
798 case TIOCGLCKTRMIOS: 811 case TIOCGLCKTRMIOS:
799 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked)) 812 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked))
800 return -EFAULT; 813 return -EFAULT;
@@ -806,6 +819,7 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
806 if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg)) 819 if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg))
807 return -EFAULT; 820 return -EFAULT;
808 return 0; 821 return 0;
822#endif
809 823
810 case TIOCPKT: 824 case TIOCPKT:
811 { 825 {