diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-10-21 22:08:47 +0800 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-10-21 22:08:47 +0800 |
commit | dc01a8edd466d77efbb318608095fd756c68239d (patch) | |
tree | 6b8aa0a53a228900a0ea31fbde6d672704aba336 /svr-chansession.c | |
parent | 23cc2bfb8cf82d378c4e678b9505ec328998aee7 (diff) |
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.
Diffstat (limited to 'svr-chansession.c')
-rw-r--r-- | svr-chansession.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index e44299e..bfaf7f6 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -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") */ |