newch = channel_new("auth socket",
nc = channel_new("auth socket",
auth_input_request_forwarding(struct passwd * pw){	int sock, newch;	struct sockaddr_un sunaddr;	if (auth_get_socket_name() != NULL)		fatal("Protocol error: authentication forwarding requested twice.");	/* Temporarily drop privileged uid for mkdir/bind. */	temporarily_use_uid(pw);	/* Allocate a buffer for the socket name, and format the name. */	channel_forwarded_auth_socket_name = xmalloc(MAX_SOCKET_NAME);	channel_forwarded_auth_socket_dir = xmalloc(MAX_SOCKET_NAME);	strlcpy(channel_forwarded_auth_socket_dir, "/tmp/ssh-XXXXXXXX", MAX_SOCKET_NAME);	/* Create private directory for socket */	if (mkdtemp(channel_forwarded_auth_socket_dir) == NULL) {		packet_send_debug("Agent forwarding disabled: mkdtemp() failed: %.100s",		    strerror(errno));		restore_uid();		xfree(channel_forwarded_auth_socket_name);		xfree(channel_forwarded_auth_socket_dir);		channel_forwarded_auth_socket_name = NULL;		channel_forwarded_auth_socket_dir = NULL;		return 0;	}	snprintf(channel_forwarded_auth_socket_name, MAX_SOCKET_NAME, "%s/agent.%d",		 channel_forwarded_auth_socket_dir, (int) getpid());	if (atexit(cleanup_socket) < 0) {		int saved = errno;		cleanup_socket();		packet_disconnect("socket: %.100s", strerror(saved));	}	/* Create the socket. */	sock = socket(AF_UNIX, SOCK_STREAM, 0);	if (sock < 0)		packet_disconnect("socket: %.100s", strerror(errno));	/* Bind it to the name. */	memset(&sunaddr, 0, sizeof(sunaddr));	sunaddr.sun_family = AF_UNIX;	strncpy(sunaddr.sun_path, channel_forwarded_auth_socket_name,		sizeof(sunaddr.sun_path));	if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0)		packet_disconnect("bind: %.100s", strerror(errno));	/* Restore the privileged uid. */	restore_uid();	/* Start listening on the socket. */	if (listen(sock, 5) < 0)		packet_disconnect("listen: %.100s", strerror(errno));	/* Allocate a channel for the authentication agent socket. */	newch = channel_new("auth socket",	    SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1,	    CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,	    0, xstrdup("auth socket"), 1);	strlcpy(channels[newch].path, channel_forwarded_auth_socket_name,	    sizeof(channels[newch].path));	return 1;}