Mercurial > dropbear
comparison svr-chansession.c @ 466:f11544d96354
fix up after merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 13 Jan 2008 04:02:08 +0000 |
parents | af3307f46a3d |
children | 52a644e7b8e1 c302c7383282 |
comparison
equal
deleted
inserted
replaced
465:af3307f46a3d | 466:f11544d96354 |
---|---|
797 #ifdef DO_MOTD | 797 #ifdef DO_MOTD |
798 if (svr_opts.domotd) { | 798 if (svr_opts.domotd) { |
799 /* don't show the motd if ~/.hushlogin exists */ | 799 /* don't show the motd if ~/.hushlogin exists */ |
800 | 800 |
801 /* 12 == strlen("/.hushlogin\0") */ | 801 /* 12 == strlen("/.hushlogin\0") */ |
802 len = strlen(ses.authstate.pw->pw_dir) + 12; | 802 len = strlen(ses.authstate.pw_dir) + 12; |
803 | 803 |
804 hushpath = m_malloc(len); | 804 hushpath = m_malloc(len); |
805 snprintf(hushpath, len, "%s/.hushlogin", ses.authstate.pw->pw_dir); | 805 snprintf(hushpath, len, "%s/.hushlogin", ses.authstate.pw_dir); |
806 | 806 |
807 if (stat(hushpath, &sb) < 0) { | 807 if (stat(hushpath, &sb) < 0) { |
808 /* more than a screenful is stupid IMHO */ | 808 /* more than a screenful is stupid IMHO */ |
809 motdbuf = buf_new(80 * 25); | 809 motdbuf = buf_new(80 * 25); |
810 if (buf_readfile(motdbuf, MOTD_FILENAME) == DROPBEAR_SUCCESS) { | 810 if (buf_readfile(motdbuf, MOTD_FILENAME) == DROPBEAR_SUCCESS) { |