X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=379cc4d90044659fa893b22781b4f685f8534bac;hp=c7d1c46791aa09f439bb553e1f8cfdf543f9b51c;hb=d080286b39f943baf22f1b531816d8209d8685d6;hpb=cd0abca282ec1cd29510f4cf8fefb04aa7e20ad7 diff --git a/command.c b/command.c index c7d1c467..379cc4d9 100644 --- a/command.c +++ b/command.c @@ -654,8 +654,8 @@ out: /** * perform user authentication and execute a command * - * \param fd the file descriptor to send output to - * \param addr socket address info of peer + * \param fd The file descriptor to send output to + * \param peername Identifies the connecting peer. * * \return EXIT_SUCCESS or EXIT_FAILURE * @@ -680,7 +680,7 @@ out: * * \sa alarm(2), rc4(3), crypt.c, crypt.h */ -int handle_connect(int fd, struct sockaddr_in *addr) +int handle_connect(int fd, const char *peername) { int ret, argc, use_rc4 = 0; char buf[4096]; @@ -790,7 +790,7 @@ int handle_connect(int fd, struct sockaddr_in *addr) mmd->num_commands++; mmd_unlock(); PARA_NOTICE_LOG("calling com_%s() for %s@%s\n", cmd->name, u->name, - inet_ntoa(addr->sin_addr)); + peername); ret = cmd->handler(fd, argc, argv); if (ret >= 0) { ret = EXIT_SUCCESS;