mirror of
https://github.com/clearml/dropbear
synced 2025-04-04 04:50:57 +00:00
Don't display the MOTD when an explicit command is run.
(possibly via authorized_keys(5) restrictions), even when a pseudo-terminal has been allocated for the session. In other words, only display the MOTD when the server starts the user's default shell.
This commit is contained in:
parent
23cc2bfb8c
commit
dc01a8edd4
@ -814,7 +814,7 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
|
||||
login_free_entry(li);
|
||||
|
||||
#ifdef DO_MOTD
|
||||
if (svr_opts.domotd) {
|
||||
if (svr_opts.domotd && !chansess->cmd) {
|
||||
/* don't show the motd if ~/.hushlogin exists */
|
||||
|
||||
/* 12 == strlen("/.hushlogin\0") */
|
||||
|
Loading…
Reference in New Issue
Block a user