The unified diff between revisions [295b1131..] and [d9cc9067..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'svr-chansession.c'

#
#
# patch "svr-chansession.c"
#  from [e455821f3c70a5f8b997e4fba07b756515b89097]
#    to [96ab7c8a7804cf95f0619b45bcaa9ff1a4195dcb]
#
============================================================
--- svr-chansession.c	e455821f3c70a5f8b997e4fba07b756515b89097
+++ svr-chansession.c	96ab7c8a7804cf95f0619b45bcaa9ff1a4195dcb
@@ -798,11 +798,11 @@ static int ptycommand(struct Channel *ch
 		if (svr_opts.domotd) {
 			/* don't show the motd if ~/.hushlogin exists */

-			/* 11 == strlen("/hushlogin\0") */
-			len = strlen(ses.authstate.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_dir);
+			snprintf(hushpath, len, "%s/.hushlogin", ses.authstate.pw->pw_dir);

 			if (stat(hushpath, &sb) < 0) {
 				/* more than a screenful is stupid IMHO */