X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=9d5723173e043e3d2d882c3c0948da1064011144;hp=07add425d2fc7bbebfe18d028aa8b719d7a86099;hb=1c8218665d39f212eb7cddaea70c5ab66d7e26c7;hpb=1d2aa7dcc09cd7ed06d18372eb85407f556cb529 diff --git a/command.c b/command.c index 07add425..9d572317 100644 --- a/command.c +++ b/command.c @@ -804,8 +804,7 @@ out: #define HANDSHAKE_BUFSIZE 4096 -static int run_command(struct command_context *cc, struct iovec *iov, - const char *peername) +static int run_command(struct command_context *cc, struct iovec *iov) { int ret, i, argc; char *p, *end, **argv; @@ -838,8 +837,8 @@ static int run_command(struct command_context *cc, struct iovec *iov, p += strlen(p) + 1; } argv[argc] = NULL; - PARA_NOTICE_LOG("calling com_%s() for %s@%s\n", lls_command_name(lcmd), - cc->u->name, peername); + PARA_NOTICE_LOG("calling com_%s() for user %s\n", + lls_command_name(lcmd), cc->u->name); ret = lls(lls_parse(argc, argv, lcmd, &lpr, &errctx)); if (ret >= 0) { const struct server_cmd_user_data *ud = lls_user_data(lcmd); @@ -860,7 +859,6 @@ static int run_command(struct command_context *cc, struct iovec *iov, * Perform user authentication and execute a command. * * \param fd The file descriptor to send output to. - * \param peername Identifies the connecting peer. * * Whenever para_server accepts an incoming tcp connection on the port it * listens on, it forks and the resulting child calls this function. @@ -881,7 +879,7 @@ static int run_command(struct command_context *cc, struct iovec *iov, * * \sa alarm(2), \ref crypt.c, \ref crypt.h. */ -__noreturn void handle_connect(int fd, const char *peername) +__noreturn void handle_connect(int fd) { int ret; unsigned char rand_buf[CHALLENGE_SIZE + 2 * SESSION_KEY_LEN]; @@ -967,7 +965,7 @@ __noreturn void handle_connect(int fd, const char *peername) ret = recv_sb(&cc->scc, SBD_COMMAND, MAX_COMMAND_LEN, &iov); if (ret < 0) goto net_err; - ret = run_command(cc, &iov, peername); + ret = run_command(cc, &iov); free(iov.iov_base); if (ret < 0) goto err_out;