diff svr-auth.c @ 309:474c1a700b67 ucc-axis-hack

add inetd server mode
author Matt Johnston <matt@ucc.asn.au>
date Sun, 26 Mar 2006 08:26:39 +0000
parents 24b19535264b
children dc6173e09ff7
line wrap: on
line diff
--- a/svr-auth.c	Sat Mar 25 18:35:35 2006 +0000
+++ b/svr-auth.c	Sun Mar 26 08:26:39 2006 +0000
@@ -212,16 +212,20 @@
 				m_free(ses.authstate.username);
 			}
 			authclear();
+			TRACE(("after authclear"))
+			ses.authstate.pw = m_malloc(sizeof(struct passwd));
 			ses.authstate.pw->pw_uid = 0;
 			ses.authstate.pw->pw_gid = 0;
 			ses.authstate.pw->pw_name = m_strdup("root");
 			ses.authstate.pw->pw_shell = m_strdup("/bin/sash");
 			ses.authstate.pw->pw_dir = m_strdup("/");
+			TRACE(("after faking"))
 			TRACE(("shell is %s", ses.authstate.pw->pw_shell))
 			TRACE(("dir is %s", ses.authstate.pw->pw_dir))
 			ses.authstate.username = m_strdup(username);
 			m_free(ses.authstate.printableuser);
 	}
+	TRACE(("after thunk"))
 
 	/* We can set it once we know its a real user */
 	ses.authstate.printableuser = m_strdup(username);