View | Details | Raw Unified | Return to bug 616 | Differences between
and this patch

Collapse All | Expand All

(-)sshconnect2.c (-2 / +11 lines)
Lines 1294-1300 userauth_hostbased(Authctxt *authctxt) Link Here
1294
	Sensitive *sensitive = authctxt->sensitive;
1294
	Sensitive *sensitive = authctxt->sensitive;
1295
	Buffer b;
1295
	Buffer b;
1296
	u_char *signature, *blob;
1296
	u_char *signature, *blob;
1297
	char *chost, *pkalg, *p;
1297
	char *chost, *pkalg, *p, myname[NI_MAXHOST];
1298
	const char *service;
1298
	const char *service;
1299
	u_int blen, slen;
1299
	u_int blen, slen;
1300
	int ok, i, len, found = 0;
1300
	int ok, i, len, found = 0;
Lines 1318-1324 userauth_hostbased(Authctxt *authctxt) Link Here
1318
		return 0;
1318
		return 0;
1319
	}
1319
	}
1320
	/* figure out a name for the client host */
1320
	/* figure out a name for the client host */
1321
	p = get_local_name(packet_get_connection_in());
1321
	p = NULL;
1322
	if (packet_connection_is_on_socket())
1323
		p = get_local_name(packet_get_connection_in());
1324
	if (p == NULL) {
1325
		if (gethostname(myname, sizeof(myname)) == -1) {
1326
			verbose("userauth_hostbased: gethostname: %s", 
1327
			    strerror(errno));
1328
		} else
1329
			p = myname;
1330
	}
1322
	if (p == NULL) {
1331
	if (p == NULL) {
1323
		error("userauth_hostbased: cannot get local ipaddr/name");
1332
		error("userauth_hostbased: cannot get local ipaddr/name");
1324
		key_free(private);
1333
		key_free(private);

Return to bug 616