diff options
author | Kevin Steves <stevesk@pobox.com> | 2001-02-05 12:42:17 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2001-02-05 12:42:17 +0000 |
commit | ef4eea9badfb65f05ac24f786b710cc3f27f0e43 (patch) | |
tree | f54abef181ccd6ad5285a5c16b4c159d8b74e932 | |
parent | d2ddda4efab29fd8663757634773fa10e557e0f3 (diff) |
- stevesk@cvs.openbsd.org 2001/02/04 08:32:27
[many files; did this manually to our top-level source dir]
unexpand and remove end-of-line whitespace; ok markus@
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | acconfig.h | 2 | ||||
-rw-r--r-- | auth-chall.c | 2 | ||||
-rw-r--r-- | auth-pam.c | 60 | ||||
-rw-r--r-- | auth-passwd.c | 10 | ||||
-rw-r--r-- | auth.c | 8 | ||||
-rw-r--r-- | auth1.c | 18 | ||||
-rw-r--r-- | auth2.c | 26 | ||||
-rw-r--r-- | authfd.c | 2 | ||||
-rw-r--r-- | canohost.c | 2 | ||||
-rw-r--r-- | channels.c | 16 | ||||
-rw-r--r-- | cipher.c | 6 | ||||
-rw-r--r-- | cli.c | 10 | ||||
-rw-r--r-- | cli.h | 2 | ||||
-rw-r--r-- | defines.h | 28 | ||||
-rw-r--r-- | dispatch.c | 2 | ||||
-rw-r--r-- | entropy.c | 130 | ||||
-rw-r--r-- | includes.h | 6 | ||||
-rw-r--r-- | kex.c | 10 | ||||
-rw-r--r-- | kex.h | 2 | ||||
-rw-r--r-- | key.c | 26 | ||||
-rw-r--r-- | log.h | 2 | ||||
-rw-r--r-- | loginrec.c | 104 | ||||
-rw-r--r-- | loginrec.h | 8 | ||||
-rw-r--r-- | logintest.c | 30 | ||||
-rw-r--r-- | md5crypt.c | 12 | ||||
-rw-r--r-- | nchan.c | 2 | ||||
-rw-r--r-- | packet.c | 4 | ||||
-rw-r--r-- | pty.c | 8 | ||||
-rw-r--r-- | rijndael.c | 114 | ||||
-rw-r--r-- | rsa.c | 2 | ||||
-rw-r--r-- | scp.c | 4 | ||||
-rw-r--r-- | servconf.c | 8 | ||||
-rw-r--r-- | serverloop.c | 6 | ||||
-rw-r--r-- | session.c | 16 | ||||
-rw-r--r-- | sftp-client.c | 2 | ||||
-rw-r--r-- | sftp-int.c | 12 | ||||
-rw-r--r-- | sftp-server.c | 8 | ||||
-rw-r--r-- | sftp.c | 4 | ||||
-rw-r--r-- | ssh-add.c | 2 | ||||
-rw-r--r-- | ssh-agent.c | 2 | ||||
-rw-r--r-- | ssh-dss.c | 2 | ||||
-rw-r--r-- | ssh-keygen.c | 2 | ||||
-rw-r--r-- | ssh-keyscan.c | 2 | ||||
-rw-r--r-- | ssh.c | 4 | ||||
-rw-r--r-- | sshconnect.c | 4 | ||||
-rw-r--r-- | sshconnect2.c | 20 | ||||
-rw-r--r-- | sshd.c | 8 | ||||
-rw-r--r-- | xmalloc.c | 2 |
49 files changed, 386 insertions, 382 deletions
@@ -1,7 +1,11 @@ 20010105 - - (bal) Disable groupaccess by setting NGROUP_MAX to 0 for platforms + - (bal) Disable groupaccess by setting NGROUPS_MAX to 0 for platforms that don't have NGROUPS_MAX. - (bal) AIX patch for auth1.c by William L. Jones <jones@hpc.utexas.edu> + - (stevesk) OpenBSD sync: + - stevesk@cvs.openbsd.org 2001/02/04 08:32:27 + [many files; did this manually to our top-level source dir] + unexpand and remove end-of-line whitespace; ok markus@ 20010104 - (bal) I think this is the last of the bsd-*.h that don't belong. @@ -225,7 +225,7 @@ /* Define if you are using Solaris-derived PAM which passes pam_messages */ /* to the conversation function with an extra level of indirection */ #undef PAM_SUN_CODEBASE - + /* Set this to your mail directory if you don't have maillock.h */ #undef MAIL_DIRECTORY diff --git a/auth-chall.c b/auth-chall.c index b8b0c5d1..9f5a151f 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -34,7 +34,7 @@ char * get_challenge(Authctxt *authctxt, char *devs) { static char challenge[1024]; - struct skey skey; + struct skey skey; if (skeychallenge(&skey, authctxt->user, challenge) == -1) return NULL; strlcat(challenge, "\nS/Key Password: ", sizeof challenge); @@ -32,7 +32,7 @@ #include "canohost.h" #include "readpass.h" -RCSID("$Id: auth-pam.c,v 1.23 2001/02/04 12:20:19 djm Exp $"); +RCSID("$Id: auth-pam.c,v 1.24 2001/02/05 12:42:17 stevesk Exp $"); #define NEW_AUTHTOK_MSG \ "Warning: Your password has expired, please change it now" @@ -97,7 +97,7 @@ static int pamconv(int num_msg, const struct pam_message **msg, /* PAM will free this later */ reply = malloc(num_msg * sizeof(*reply)); if (reply == NULL) - return PAM_CONV_ERR; + return PAM_CONV_ERR; for (count = 0; count < num_msg; count++) { switch(PAM_MSG_MEMBER(msg, count, msg_style)) { @@ -120,7 +120,7 @@ static int pamconv(int num_msg, const struct pam_message **msg, } reply[count].resp = xstrdup(pampasswd); } else { - reply[count].resp = + reply[count].resp = xstrdup(read_passphrase(PAM_MSG_MEMBER(msg, count, msg), 1)); } reply[count].resp_retcode = PAM_SUCCESS; @@ -158,19 +158,19 @@ void pam_cleanup_proc(void *context) { pam_retval = pam_close_session(pamh, 0); if (pam_retval != PAM_SUCCESS) { - log("Cannot close PAM session[%d]: %.200s", + log("Cannot close PAM session[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } pam_retval = pam_setcred(pamh, PAM_DELETE_CRED); if (pam_retval != PAM_SUCCESS) { - debug("Cannot delete credentials[%d]: %.200s", + debug("Cannot delete credentials[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } pam_retval = pam_end(pamh, pam_retval); if (pam_retval != PAM_SUCCESS) { - log("Cannot release PAM authentication[%d]: %.200s", + log("Cannot release PAM authentication[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } } @@ -193,15 +193,15 @@ int auth_pam_password(struct passwd *pw, const char *password) return 0; pampasswd = password; - + pamstate = INITIAL_LOGIN; pam_retval = do_pam_authenticate(0); if (pam_retval == PAM_SUCCESS) { - debug("PAM Password authentication accepted for user \"%.100s\"", + debug("PAM Password authentication accepted for user \"%.100s\"", pw->pw_name); return 1; } else { - debug("PAM Password authentication for \"%.100s\" failed[%d]: %s", + debug("PAM Password authentication for \"%.100s\" failed[%d]: %s", pw->pw_name, pam_retval, PAM_STRERROR(pamh, pam_retval)); return 0; } @@ -212,13 +212,13 @@ int do_pam_account(char *username, char *remote_user) { int pam_retval; extern ServerOptions options; - - debug("PAM setting rhost to \"%.200s\"", + + debug("PAM setting rhost to \"%.200s\"", get_canonical_hostname(options.reverse_mapping_check)); - pam_retval = pam_set_item(pamh, PAM_RHOST, + pam_retval = pam_set_item(pamh, PAM_RHOST, get_canonical_hostname(options.reverse_mapping_check)); if (pam_retval != PAM_SUCCESS) { - fatal("PAM set rhost failed[%d]: %.200s", + fatal("PAM set rhost failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } @@ -226,7 +226,7 @@ int do_pam_account(char *username, char *remote_user) debug("PAM setting ruser to \"%.200s\"", remote_user); pam_retval = pam_set_item(pamh, PAM_RUSER, remote_user); if (pam_retval != PAM_SUCCESS) { - fatal("PAM set ruser failed[%d]: %.200s", + fatal("PAM set ruser failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } } @@ -242,11 +242,11 @@ int do_pam_account(char *username, char *remote_user) password_change_required = 1; break; default: - log("PAM rejected by account configuration[%d]: %.200s", + log("PAM rejected by account configuration[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); return(0); } - + return(1); } @@ -259,31 +259,31 @@ void do_pam_session(char *username, const char *ttyname) debug("PAM setting tty to \"%.200s\"", ttyname); pam_retval = pam_set_item(pamh, PAM_TTY, ttyname); if (pam_retval != PAM_SUCCESS) { - fatal("PAM set tty failed[%d]: %.200s", + fatal("PAM set tty failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } } pam_retval = pam_open_session(pamh, 0); if (pam_retval != PAM_SUCCESS) { - fatal("PAM session setup failed[%d]: %.200s", + fatal("PAM session setup failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } } -/* Set PAM credentials */ +/* Set PAM credentials */ void do_pam_setcred(void) { int pam_retval; - + debug("PAM establishing creds"); pam_retval = pam_setcred(pamh, PAM_ESTABLISH_CRED); if (pam_retval != PAM_SUCCESS) { if(was_authenticated) { - fatal("PAM setcred failed[%d]: %.200s", + fatal("PAM setcred failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } else { - debug("PAM setcred failed[%d]: %.200s", + debug("PAM setcred failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } } @@ -295,7 +295,7 @@ int pam_password_change_required(void) return password_change_required; } -/* +/* * Have user change authentication token if pam_acct_mgmt() indicated * it was expired. This needs to be called after an interactive * session is established and the user's pty is connected to @@ -313,7 +313,7 @@ void do_pam_chauthtok(void) do { pam_retval = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); if (pam_retval != PAM_SUCCESS) { - log("PAM pam_chauthtok failed[%d]: %.200s", + log("PAM pam_chauthtok failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } } while (pam_retval != PAM_SUCCESS); @@ -337,21 +337,21 @@ void start_pam(const char *user) pam_retval = pam_start(SSHD_PAM_SERVICE, user, &conv, &pamh); if (pam_retval != PAM_SUCCESS) { - fatal("PAM initialisation failed[%d]: %.200s", + fatal("PAM initialisation failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } #ifdef PAM_TTY_KLUDGE /* * Some PAM modules (e.g. pam_time) require a TTY to operate, - * and will fail in various stupid ways if they don't get one. + * and will fail in various stupid ways if they don't get one. * sshd doesn't set the tty until too late in the auth process and may * not even need one (for tty-less connections) - * Kludge: Set a fake PAM_TTY + * Kludge: Set a fake PAM_TTY */ pam_retval = pam_set_item(pamh, PAM_TTY, "ssh"); if (pam_retval != PAM_SUCCESS) { - fatal("PAM set tty failed[%d]: %.200s", + fatal("PAM set tty failed[%d]: %.200s", pam_retval, PAM_STRERROR(pamh, pam_retval)); } #endif /* PAM_TTY_KLUDGE */ @@ -383,9 +383,9 @@ void pam_msg_cat(const char *msg) char *p; size_t new_msg_len; size_t pam_msg_len; - + new_msg_len = strlen(msg); - + if (pam_msg) { pam_msg_len = strlen(pam_msg); pam_msg = xrealloc(pam_msg, new_msg_len + pam_msg_len + 2); diff --git a/auth-passwd.c b/auth-passwd.c index 541aca60..9f763267 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -118,7 +118,7 @@ auth_password(struct passwd * pw, const char *password) * Empty password is only possible on NT if the user has _really_ * an empty password and authentication is done, though. */ - if (!is_winnt) + if (!is_winnt) #endif if (*password == '\0' && options.permit_empty_passwd == 0) return 0; @@ -155,13 +155,13 @@ auth_password(struct passwd * pw, const char *password) */ #if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) spw = getspnam(pw->pw_name); - if (spw != NULL) + if (spw != NULL) pw_password = spw->sp_pwdp; #endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ #ifdef HAVE_SCO_PROTECTED_PW spw = getprpwnam(pw->pw_name); - if (spw != NULL) + if (spw != NULL) pw_password = spw->ufld.fd_encrypt; #endif /* HAVE_SCO_PROTECTED_PW */ @@ -189,7 +189,7 @@ auth_password(struct passwd * pw, const char *password) encrypted_password = md5_crypt(password, salt); else encrypted_password = crypt(password, salt); -#else /* HAVE_MD5_PASSWORDS */ +#else /* HAVE_MD5_PASSWORDS */ # ifdef __hpux if (iscomsec()) encrypted_password = bigcrypt(password, salt); @@ -198,7 +198,7 @@ auth_password(struct passwd * pw, const char *password) # else encrypted_password = crypt(password, salt); # endif /* __hpux */ -#endif /* HAVE_MD5_PASSWORDS */ +#endif /* HAVE_MD5_PASSWORDS */ /* Authentication is accepted if the encrypted passwords are identical. */ return (strcmp(encrypted_password, pw_password) == 0); @@ -79,7 +79,7 @@ allowed_user(struct passwd * pw) return 0; /* Check password expiry */ - if ((spw->sp_lstchg >= 0) && (spw->sp_max >= 0) && + if ((spw->sp_lstchg >= 0) && (spw->sp_max >= 0) && (days > (spw->sp_lstchg + spw->sp_max))) return 0; } @@ -165,9 +165,9 @@ allowed_user(struct passwd * pw) Authctxt * authctxt_new(void) { - Authctxt *authctxt = xmalloc(sizeof(*authctxt)); - memset(authctxt, 0, sizeof(*authctxt)); - return authctxt; + Authctxt *authctxt = xmalloc(sizeof(*authctxt)); + memset(authctxt, 0, sizeof(*authctxt)); + return authctxt; } struct passwd * @@ -265,8 +265,8 @@ do_authloop(Authctxt *authctxt) authenticated = auth_pam_password(pw, password); #elif defined(HAVE_OSF_SIA) /* Do SIA auth with password */ - if (sia_validate_user(NULL, saved_argc, saved_argv, - get_canonical_hostname(options.reverse_mapping_check), + if (sia_validate_user(NULL, saved_argc, saved_argv, + get_canonical_hostname(options.reverse_mapping_check), pw->pw_name, NULL, 0, NULL, password) == SIASUCCESS) { authenticated = 1; } @@ -317,8 +317,8 @@ do_authloop(Authctxt *authctxt) fatal("INTERNAL ERROR: authenticated invalid user %s", authctxt->user); -#ifdef HAVE_CYGWIN - if (authenticated && +#ifdef HAVE_CYGWIN + if (authenticated && !check_nt_auth(type == SSH_CMSG_AUTH_PASSWORD,pw->pw_uid)) { packet_disconnect("Authentication rejected for uid %d.", (int)pw->pw_uid); @@ -329,7 +329,7 @@ do_authloop(Authctxt *authctxt) if (authenticated && authctxt->pw->pw_uid == 0 && !auth_root_allowed()) authenticated = 0; #endif -#ifdef USE_PAM +#ifdef USE_PAM if (authenticated && !do_pam_account(pw->pw_name, client_user)) authenticated = 0; #endif @@ -346,9 +346,9 @@ do_authloop(Authctxt *authctxt) return; if (authctxt->failures++ > AUTH_FAIL_MAX) { -#ifdef WITH_AIXAUTHENTICATE - loginfailed(authctxt->user, - get_canonical_hostname(options.reverse_mapping_check), +#ifdef WITH_AIXAUTHENTICATE + loginfailed(authctxt->user, + get_canonical_hostname(options.reverse_mapping_check), "ssh"); #endif /* WITH_AIXAUTHENTICATE */ packet_disconnect(AUTH_FAIL_MSG, authctxt->user); @@ -435,7 +435,7 @@ do_authentication() #ifdef WITH_AIXAUTHENTICATE /* We don't have a pty yet, so just label the line as "ssh" */ - if (loginsuccess(authctxt->user, + if (loginsuccess(authctxt->user, get_canonical_hostname(options.reverse_mapping_check), "ssh", &aixloginmsg) < 0) aixloginmsg = NULL; @@ -203,7 +203,7 @@ input_userauth_request(int type, int plen, void *ctxt) if ((style = strchr(user, ':')) != NULL) *style++ = 0; - if (authctxt->attempt++ == 0) { + if (authctxt->attempt++ == 0) { /* setup auth context */ struct passwd *pw = NULL; setproctitle("%s", user); @@ -300,7 +300,7 @@ done: return; } -void +void userauth_reply(Authctxt *authctxt, int authenticated) { char *methods; @@ -309,8 +309,8 @@ userauth_reply(Authctxt *authctxt, int authenticated) if (authenticated) { #ifdef WITH_AIXAUTHENTICATE /* We don't have a pty yet, so just label the line as "ssh" */ - if (loginsuccess(authctxt->user?authctxt->user:"NOUSER", - get_canonical_hostname(options.reverse_mapping_check), + if (loginsuccess(authctxt->user?authctxt->user:"NOUSER", + get_canonical_hostname(options.reverse_mapping_check), "ssh", &aixloginmsg) < 0) aixloginmsg = NULL; #endif /* WITH_AIXAUTHENTICATE */ @@ -323,7 +323,7 @@ userauth_reply(Authctxt *authctxt, int authenticated) authctxt->success = 1; } else { if (authctxt->failures++ > AUTH_FAIL_MAX) - packet_disconnect(AUTH_FAIL_MSG, authctxt->user); + packet_disconnect(AUTH_FAIL_MSG, authctxt->user); methods = authmethods_get(); packet_start(SSH2_MSG_USERAUTH_FAILURE); packet_put_cstring(methods); @@ -342,11 +342,11 @@ userauth_none(Authctxt *authctxt) if (m != NULL) m->enabled = NULL; packet_done(); - userauth_banner(); + userauth_banner(); if (authctxt->valid == 0) return(0); - + #ifdef HAVE_CYGWIN if (check_nt_auth(1, authctxt->pw->pw_uid) == 0) return(0); @@ -354,9 +354,9 @@ userauth_none(Authctxt *authctxt) #ifdef USE_PAM return auth_pam_password(authctxt->pw, ""); #elif defined(HAVE_OSF_SIA) - return (sia_validate_user(NULL, saved_argc, saved_argv, - get_canonical_hostname(options.reverse_mapping_check), - authctxt->user?authctxt->user:"NOUSER", NULL, 0, + return (sia_validate_user(NULL, saved_argc, saved_argv, + get_canonical_hostname(options.reverse_mapping_check), + authctxt->user?authctxt->user:"NOUSER", NULL, 0, NULL, "") == SIASUCCESS); #else /* !HAVE_OSF_SIA && !USE_PAM */ return auth_password(authctxt->pw, ""); @@ -382,9 +382,9 @@ userauth_passwd(Authctxt *authctxt) #ifdef USE_PAM auth_pam_password(authctxt->pw, password) == 1) #elif defined(HAVE_OSF_SIA) - sia_validate_user(NULL, saved_argc, saved_argv, - get_canonical_hostname(options.reverse_mapping_check), - authctxt->user?authctxt->user:"NOUSER", NULL, 0, NULL, + sia_validate_user(NULL, saved_argc, saved_argv, + get_canonical_hostname(options.reverse_mapping_check), + authctxt->user?authctxt->user:"NOUSER", NULL, 0, NULL, password) == SIASUCCESS) #else /* !USE_PAM && !HAVE_OSF_SIA */ auth_password(authctxt->pw, password) == 1) @@ -558,7 +558,7 @@ ssh_remove_all_identities(AuthenticationConnection *auth, int version) return decode_reply(type); } -int +int decode_reply(int type) { switch (type) { @@ -56,7 +56,7 @@ get_remote_hostname(int socket, int reverse_mapping_check) port = from6->sin6_port; memset(&from, 0, sizeof(from)); - + from4->sin_family = AF_INET; memcpy(&from4->sin_addr, &addr, sizeof(addr)); from4->sin_port = port; @@ -704,7 +704,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) int err = 0; int sz = sizeof(err); c->type = SSH_CHANNEL_OPEN; - if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { + if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, &sz) < 0) { debug("getsockopt SO_ERROR failed"); } else { if (err == 0) { @@ -1553,7 +1553,7 @@ channel_request_forwarding( if (remote_fwd) { host = listen_address; - ctype = SSH_CHANNEL_RPORT_LISTENER; + ctype = SSH_CHANNEL_RPORT_LISTENER; } else { host = host_to_connect; ctype =SSH_CHANNEL_PORT_LISTENER; @@ -1608,7 +1608,7 @@ channel_request_forwarding( error("bind: %.100s", strerror(errno)); else verbose("bind: %.100s", strerror(errno)); - + close(sock); continue; } @@ -1762,14 +1762,14 @@ channel_connect_to(const char *host, u_short host_port) error("connect %.100s port %s: %.100s", ntop, strport, strerror(errno)); close(sock); - continue; /* fail -- try next */ + continue; /* fail -- try next */ } break; /* success */ } freeaddrinfo(aitop); if (!ai) { - error("connect %.100s port %d: failed.", host, host_port); + error("connect %.100s port %d: failed.", host, host_port); return -1; } /* success */ @@ -1954,7 +1954,7 @@ x11_create_display_inet(int screen_number, int x11_display_offset) fatal("gethostname: %.100s", strerror(errno)); #ifdef IPADDR_IN_DISPLAY - /* + /* * HPUX detects the local hostname in the DISPLAY variable and tries * to set up a shared memory connection to the server, which it * incorrectly supposes to be local. @@ -1983,7 +1983,7 @@ x11_create_display_inet(int screen_number, int x11_display_offset) memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); /* Set DISPLAY to <ip address>:screen.display */ - snprintf(display, sizeof(display), "%.50s:%d.%d", inet_ntoa(my_addr), + snprintf(display, sizeof(display), "%.50s:%d.%d", inet_ntoa(my_addr), display_number, screen_number); } #else /* IPADDR_IN_DISPLAY */ @@ -2501,7 +2501,7 @@ channel_cancel_cleanup(int id) } c->dettach_user = NULL; } -void +void channel_register_filter(int id, channel_filter_fn *fn) { Channel *c = channel_lookup(id); @@ -266,7 +266,7 @@ cast_setkey(CipherContext *cc, const u_char *key, u_int keylen) void cast_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { - if (iv == NULL) + if (iv == NULL) fatal("no IV for %s.", cc->cipher->name); memcpy(cc->u.cast.iv, (char *)iv, 8); } @@ -295,7 +295,7 @@ rijndael_setkey(CipherContext *cc, const u_char *key, u_int keylen) void rijndael_setiv(CipherContext *cc, const u_char *iv, u_int ivlen) { - if (iv == NULL) + if (iv == NULL) fatal("no IV for %s.", cc->cipher->name); memcpy((u_char *)cc->u.rijndael.iv, iv, RIJNDAEL_BLOCKSIZE); } @@ -415,7 +415,7 @@ Cipher ciphers[] = { SSH_CIPHER_SSH2, 16, 32, rijndael_setkey, rijndael_setiv, rijndael_cbc_encrypt, rijndael_cbc_decrypt }, - { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL, NULL, NULL, NULL } + { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL, NULL, NULL, NULL } }; /*--*/ @@ -136,11 +136,11 @@ cli_write(const char* buf, int size) output = xmalloc(4*size); for (p = output, i = 0; i < size; i++) { - if (buf[i] == '\n') - *p++ = buf[i]; - else - p = vis(p, buf[i], 0, 0); - } + if (buf[i] == '\n') + *p++ = buf[i]; + else + p = vis(p, buf[i], 0, 0); + } len = p - output; for (pos = 0; pos < len; pos += ret) { @@ -9,7 +9,7 @@ * of response depending on arg. Tries to ensure that no other userland * buffer is storing the response. */ -char* cli_read_passphrase(const char* prompt, int from_stdin, +char* cli_read_passphrase(const char* prompt, int from_stdin, int echo_enable); char* cli_prompt(char* prompt, int echo_enable); void cli_mesg(char* mesg); @@ -19,13 +19,13 @@ #endif #ifdef HAVE_SYS_BITYPES_H # include <sys/bitypes.h> /* For u_intXX_t */ -#endif +#endif #ifdef HAVE_PATHS_H # include <paths.h> /* For _PATH_XXX */ -#endif +#endif #ifdef HAVE_LIMITS_H # include <limits.h> /* For PATH_MAX */ -#endif +#endif #ifdef HAVE_SYS_TIME_H # include <sys/time.h> /* For timersub */ #endif @@ -34,7 +34,7 @@ #endif #ifdef HAVE_SYS_CDEFS_H # include <sys/cdefs.h> /* For __P() |