comparison svr-chansession.c @ 465:af3307f46a3d

merge of '295b11312e327fe6c4f33512674ea4a1a9790344' and '426d7aeea950d007ed7ef9f03f9f40b138a769cb'
author Matt Johnston <matt@ucc.asn.au>
date Sun, 13 Jan 2008 04:01:46 +0000
parents 4317be8b7cf9 1009980436c2
children f11544d96354
comparison
equal deleted inserted replaced
464:4317be8b7cf9 465:af3307f46a3d
796 796
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 /* 11 == strlen("/hushlogin\0") */ 801 /* 12 == strlen("/.hushlogin\0") */
802 len = strlen(ses.authstate.pw_dir) + 11; 802 len = strlen(ses.authstate.pw->pw_dir) + 12;
803 803
804 hushpath = m_malloc(len); 804 hushpath = m_malloc(len);
805 snprintf(hushpath, len, "%s/hushlogin", ses.authstate.pw_dir); 805 snprintf(hushpath, len, "%s/.hushlogin", ses.authstate.pw->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) {