]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: explicitly enable echo for --pty
authorKarel Zak <kzak@redhat.com>
Tue, 23 Feb 2021 10:37:15 +0000 (11:37 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 23 Feb 2021 10:37:15 +0000 (11:37 +0100)
Since 75ccd75a2fa1194c6415c47b0024a438e26f1ad7 we need to explicitly
set echo flag by ul_pty_slave_echo(pty, 1).

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su-common.c

index caf20adc569aa66f601cda267d36efac70e5446f..ca49429df2983d175154605aeefd2b4e428b2dc7 100644 (file)
@@ -513,6 +513,8 @@ static void create_watching_parent(struct su_context *su)
                cb->child_wait    = wait_for_child_cb;
                cb->child_sigstop = wait_for_child_cb;
 
+               ul_pty_slave_echo(su->pty, 1);
+
                /* create pty */
                if (ul_pty_setup(su->pty))
                        err(EXIT_FAILURE, _("failed to create pseudo-terminal"));