projects
/
util-linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b96f1f6
)
agetty: Don't override TERM passed by the user
author
Daan De Meyer
<daan.j.demeyer@gmail.com>
Fri, 19 Apr 2024 18:07:47 +0000
(20:07 +0200)
committer
Chris Hofstaedtler
<zeha@debian.org>
Sat, 27 Apr 2024 12:23:31 +0000
(14:23 +0200)
Before
4869b259d68f65ea88df625ce8df9c0177d55a01
, any TERM passed
on the agetty command line would be used instead of the default TERM.
After
4869b259d68f65ea88df625ce8df9c0177d55a01
, the default TERM is
used unconditionally.
Fix the regression by checking if the user passed a custom TERM.
Fixes: 4869b259d68f65ea88df625ce8df9c0177d55a01
(cherry picked from commit
af354e92111769d57e43eb4f1825c0d99c894ddb
)
Gbp-Pq: Topic upstream
Gbp-Pq: Name agetty-Don-t-override-TERM-passed-by-the-user.patch
term-utils/agetty.c
patch
|
blob
|
history
diff --git
a/term-utils/agetty.c
b/term-utils/agetty.c
index 0fc6f151443e5ec122b4b8b991ec7654b4300961..0b9eb8be947d78b4625606abfc8e584669b017a1 100644
(file)
--- a/
term-utils/agetty.c
+++ b/
term-utils/agetty.c
@@
-1196,7
+1196,8
@@
static void open_tty(const char *tty, struct termios *tp, struct options *op)
#endif
}
- op->term = get_terminal_default_type(op->tty, !(op->flags & F_VCONSOLE));
+ if (!op->term)
+ op->term = get_terminal_default_type(op->tty, !(op->flags & F_VCONSOLE));
if (!op->term)
log_err(_("failed to allocate memory: %m"));