Commit dc01a8ed authored by Guilhem Moulin's avatar Guilhem Moulin
Browse files

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.
parent 23cc2bfb
......@@ -814,7 +814,7 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
#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") */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment