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

Collapse All | Expand All

(-)a/session.c (-2 / +5 lines)
Lines 1221-1232 void Link Here
1221
do_child(struct ssh *ssh, Session *s, const char *command)
1221
do_child(struct ssh *ssh, Session *s, const char *command)
1222
{
1222
{
1223
	extern char **environ;
1223
	extern char **environ;
1224
	char **env;
1224
	char **env, *argv[ARGV_MAX], remote_id[512];
1225
	char *argv[ARGV_MAX];
1226
	const char *shell, *shell0;
1225
	const char *shell, *shell0;
1227
	struct passwd *pw = s->pw;
1226
	struct passwd *pw = s->pw;
1228
	int r = 0;
1227
	int r = 0;
1229
1228
1229
	sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
1230
1230
	/* remove hostkey from the child's memory */
1231
	/* remove hostkey from the child's memory */
1231
	destroy_sensitive_data();
1232
	destroy_sensitive_data();
1232
	ssh_packet_clear_keys(ssh);
1233
	ssh_packet_clear_keys(ssh);
Lines 1322-1327 do_child(struct ssh *ssh, Session *s, const char *command) Link Here
1322
	signal(SIGPIPE, SIG_DFL);
1323
	signal(SIGPIPE, SIG_DFL);
1323
1324
1324
	if (s->is_subsystem == SUBSYSTEM_INT_SFTP_ERROR) {
1325
	if (s->is_subsystem == SUBSYSTEM_INT_SFTP_ERROR) {
1326
		error("Connection from %s: refusing non-sftp session",
1327
		    remote_id);
1325
		printf("This service allows sftp connections only.\n");
1328
		printf("This service allows sftp connections only.\n");
1326
		fflush(NULL);
1329
		fflush(NULL);
1327
		exit(1);
1330
		exit(1);

Return to bug 2960