コード例 #1
0
ファイル: monitor.c プロジェクト: east11210/openssh-portable
int
mm_answer_term(int sock, Buffer *req)
{
	struct ssh *ssh = active_state;	/* XXX */
	extern struct monitor *pmonitor;
	int res, status;

	debug3("%s: tearing down sessions", __func__);

	/* The child is terminating */
	session_destroy_all(ssh, &mm_session_close);

#ifdef USE_PAM
	if (options.use_pam)
		sshpam_cleanup();
#endif

	while (waitpid(pmonitor->m_pid, &status, 0) == -1)
		if (errno != EINTR)
			exit(1);

	res = WIFEXITED(status) ? WEXITSTATUS(status) : 1;

	/* Terminate process */
	exit(res);
}
コード例 #2
0
ファイル: auth-pam.c プロジェクト: Alkzndr/freebsd
void
finish_pam(void)
{
	sshpam_cleanup();
}