--- openssh-4.7p1/gss-serv.c
+++ openssh-4.7p1/gss-serv.c
@@ -355,6 +355,13 @@
 		child_set_env(envp, envsizep, gssapi_client.store.envvar,
 		    gssapi_client.store.envval);
 	}
+	if (gssapi_client.exportedname.length != 0 &&
+	    gssapi_client.exportedname.value != NULL) {
+	        debug("Setting %s to %s", "SSH_GSSAPI_NAME",
+		    gssapi_client.exportedname.value);
+		child_set_env(envp, envsizep, "SSH_GSSAPI_NAME",
+		    gssapi_client.exportedname.value);
+	}
 }
 
 /* Privileged */
