diff 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
line wrap: on
line diff
--- a/svr-chansession.c	Thu Oct 18 12:18:44 2007 +0000
+++ b/svr-chansession.c	Fri Nov 02 15:03:16 2007 +0000
@@ -794,11 +794,11 @@
 		if (svr_opts.domotd) {
 			/* don't show the motd if ~/.hushlogin exists */
 
-			/* 11 == strlen("/hushlogin\0") */
-			len = strlen(ses.authstate.pw->pw_dir) + 11; 
+			/* 12 == strlen("/.hushlogin\0") */
+			len = strlen(ses.authstate.pw->pw_dir) + 12; 
 
 			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) {
 				/* more than a screenful is stupid IMHO */