diff options
author | Karel Zak | 2017-09-07 10:45:24 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-18 11:49:11 +0200 |
commit | 61b3106ba3501ddcbcc39c69df57a49aa926adae (patch) | |
tree | 153f08749ab39d20cd9d659551a5061051fd50d5 /login-utils | |
parent | su: (pty) fix child signal mask usage (diff) | |
download | kernel-qcow2-util-linux-61b3106ba3501ddcbcc39c69df57a49aa926adae.tar.gz kernel-qcow2-util-linux-61b3106ba3501ddcbcc39c69df57a49aa926adae.tar.xz kernel-qcow2-util-linux-61b3106ba3501ddcbcc39c69df57a49aa926adae.zip |
su: (pty) fix slave terminal attributes initialization
Reported-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/su-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/su-common.c b/login-utils/su-common.c index bfccb4643..f873c23bc 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -273,7 +273,7 @@ static void pty_create(struct su_context *su) rc = openpty(&su->pty_master, &su->pty_slave, NULL, NULL, NULL); /* set slave attributes */ - if (rc < 0) { + if (!rc) { tcgetattr(su->pty_slave, &slave_attrs); cfmakeraw(&slave_attrs); tcsetattr(su->pty_slave, TCSANOW, &slave_attrs); |