From 8634576313bf2151959c3279ad35e04a83e393fe Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Fri, 14 Sep 2007 17:03:01 -0700 Subject: [PATCH] --- yaml --- r: 64964 b: refs/heads/master c: bb8bd3a52a5dbca8bea31bfc72dacfb384170e69 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/char/tty_ioctl.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f8066a839ad1..74161d2cd41d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2605a103cadb29053d6bc7e81c7de802ec75ce6c +refs/heads/master: bb8bd3a52a5dbca8bea31bfc72dacfb384170e69 diff --git a/trunk/drivers/char/tty_ioctl.c b/trunk/drivers/char/tty_ioctl.c index 4a8969cef315..3ee73cf64bd2 100644 --- a/trunk/drivers/char/tty_ioctl.c +++ b/trunk/drivers/char/tty_ioctl.c @@ -795,6 +795,19 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, if (L_ICANON(tty)) retval = inq_canon(tty); return put_user(retval, (unsigned int __user *) arg); +#ifndef TCGETS2 + case TIOCGLCKTRMIOS: + if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked)) + return -EFAULT; + return 0; + + case TIOCSLCKTRMIOS: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg)) + return -EFAULT; + return 0; +#else case TIOCGLCKTRMIOS: if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked)) return -EFAULT; @@ -806,6 +819,7 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file, if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg)) return -EFAULT; return 0; +#endif case TIOCPKT: {