comparison svr-chansession.c @ 462:1009980436c2

Actually use ~/.hushlogin rather than ~/hushlogin to ignore motd.
author Matt Johnston <matt@ucc.asn.au>
date Fri, 02 Nov 2007 15:03:16 +0000
parents 5df05d0a5366
children af3307f46a3d
comparison
equal deleted inserted replaced
461:db4f6adcb7e2 462:1009980436c2
792 792
793 #ifdef DO_MOTD 793 #ifdef DO_MOTD
794 if (svr_opts.domotd) { 794 if (svr_opts.domotd) {
795 /* don't show the motd if ~/.hushlogin exists */ 795 /* don't show the motd if ~/.hushlogin exists */
796 796
797 /* 11 == strlen("/hushlogin\0") */ 797 /* 12 == strlen("/.hushlogin\0") */
798 len = strlen(ses.authstate.pw->pw_dir) + 11; 798 len = strlen(ses.authstate.pw->pw_dir) + 12;
799 799
800 hushpath = m_malloc(len); 800 hushpath = m_malloc(len);
801 snprintf(hushpath, len, "%s/hushlogin", ses.authstate.pw->pw_dir); 801 snprintf(hushpath, len, "%s/.hushlogin", ses.authstate.pw->pw_dir);
802 802
803 if (stat(hushpath, &sb) < 0) { 803 if (stat(hushpath, &sb) < 0) {
804 /* more than a screenful is stupid IMHO */ 804 /* more than a screenful is stupid IMHO */
805 motdbuf = buf_new(80 * 25); 805 motdbuf = buf_new(80 * 25);
806 if (buf_readfile(motdbuf, MOTD_FILENAME) == DROPBEAR_SUCCESS) { 806 if (buf_readfile(motdbuf, MOTD_FILENAME) == DROPBEAR_SUCCESS) {