diff svr-auth.c @ 22:c1e5d9195402

merge of abac2150ee4f4031a98016241fbd136d24fed127 and ffa047425729e478a5b49b1ab0f8ec71c08a1421
author Matt Johnston <matt@ucc.asn.au>
date Wed, 23 Jun 2004 07:14:16 +0000
parents d7cc5b484a2e
children 469950e86d0f
line wrap: on
line diff
--- a/svr-auth.c	Mon Jun 07 11:36:07 2004 +0000
+++ b/svr-auth.c	Wed Jun 23 07:14:16 2004 +0000
@@ -52,7 +52,7 @@
  * on initialisation */
 static void authclear() {
 	
-	svr_ses.authstate.authdone = 0;
+	ses.authdone = 0;
 	svr_ses.authstate.pw = NULL;
 	svr_ses.authstate.username = NULL;
 	svr_ses.authstate.printableuser = NULL;
@@ -102,7 +102,7 @@
 	TRACE(("enter recv_msg_userauth_request"));
 
 	/* ignore packets if auth is already done */
-	if (svr_ses.authstate.authdone == 1) {
+	if (ses.authdone == 1) {
 		return;
 	}
 
@@ -339,7 +339,11 @@
 	buf_putbyte(ses.writepayload, SSH_MSG_USERAUTH_SUCCESS);
 	encrypt_packet();
 
-	svr_ses.authstate.authdone = 1;
+	ses.authdone = 1;
+
+	if (svr_ses.authstate.pw->pw_uid == 0) {
+		ses.allowprivport = 1;
+	}
 
 	/* Remove from the list of pre-auth sockets. Should be m_close(), since if
 	 * we fail, we might end up leaking connection slots, and disallow new