mirror of
https://github.com/clearml/dropbear
synced 2025-04-07 06:04:15 +00:00
Actually use ~/.hushlogin rather than ~/hushlogin to ignore motd.
--HG-- extra : convert_revision : 426d7aeea950d007ed7ef9f03f9f40b138a769cb
This commit is contained in:
parent
25554bc331
commit
b2ac4eb29b
@ -794,11 +794,11 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
|
|||||||
if (svr_opts.domotd) {
|
if (svr_opts.domotd) {
|
||||||
/* don't show the motd if ~/.hushlogin exists */
|
/* don't show the motd if ~/.hushlogin exists */
|
||||||
|
|
||||||
/* 11 == strlen("/hushlogin\0") */
|
/* 12 == strlen("/.hushlogin\0") */
|
||||||
len = strlen(ses.authstate.pw->pw_dir) + 11;
|
len = strlen(ses.authstate.pw->pw_dir) + 12;
|
||||||
|
|
||||||
hushpath = m_malloc(len);
|
hushpath = m_malloc(len);
|
||||||
snprintf(hushpath, len, "%s/hushlogin", ses.authstate.pw->pw_dir);
|
snprintf(hushpath, len, "%s/.hushlogin", ses.authstate.pw->pw_dir);
|
||||||
|
|
||||||
if (stat(hushpath, &sb) < 0) {
|
if (stat(hushpath, &sb) < 0) {
|
||||||
/* more than a screenful is stupid IMHO */
|
/* more than a screenful is stupid IMHO */
|
||||||
|
Loading…
Reference in New Issue
Block a user