Lines Matching refs:rc
329 int rc; in myssh_is_known() local
350 rc = ssh_get_server_publickey(sshc->ssh_session, &pubkey); in myssh_is_known()
352 rc = ssh_get_publickey(sshc->ssh_session, &pubkey); in myssh_is_known()
354 if(rc != SSH_OK) in myssh_is_known()
355 return rc; in myssh_is_known()
362 rc = ssh_get_publickey_hash(pubkey, SSH_PUBLICKEY_HASH_MD5, in myssh_is_known()
364 if(rc != SSH_OK || hlen != 16) { in myssh_is_known()
379 rc = SSH_ERROR; in myssh_is_known()
383 rc = SSH_OK; in myssh_is_known()
397 rc = ssh_pki_export_pubkey_base64(knownhostsentry->publickey, in myssh_is_known()
399 if(rc != SSH_OK) { in myssh_is_known()
425 rc = SSH_ERROR; in myssh_is_known()
464 rc = ssh_pki_export_pubkey_base64(pubkey, &found_base64); in myssh_is_known()
465 if(rc != SSH_OK) in myssh_is_known()
495 rc = SSH_ERROR; in myssh_is_known()
500 rc = func(data, knownkeyp, /* from the knownhosts file */ in myssh_is_known()
505 switch(rc) { in myssh_is_known()
508 rc = ssh_session_update_known_hosts(sshc->ssh_session); in myssh_is_known()
510 rc = ssh_write_knownhost(sshc->ssh_session); in myssh_is_known()
512 if(rc != SSH_OK) { in myssh_is_known()
519 rc = SSH_ERROR; in myssh_is_known()
525 rc = SSH_ERROR; in myssh_is_known()
530 rc = SSH_OK; in myssh_is_known()
547 return rc; in myssh_is_known()
553 rc = SSH_ERROR; \
560 rc = SSH_ERROR; \
565 rc = SSH_OK; \
575 rc = SSH_OK; \
585 rc = SSH_OK; \
596 int rc; in myssh_auth_interactive() local
603 rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL); in myssh_auth_interactive()
604 if(rc == SSH_AUTH_AGAIN) in myssh_auth_interactive()
607 if(rc != SSH_AUTH_INFO) in myssh_auth_interactive()
614 rc = ssh_userauth_kbdint_setanswer(sshc->ssh_session, 0, conn->passwd); in myssh_auth_interactive()
615 if(rc < 0) in myssh_auth_interactive()
622 rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL); in myssh_auth_interactive()
623 if(rc == SSH_AUTH_AGAIN) in myssh_auth_interactive()
625 else if(rc == SSH_AUTH_SUCCESS) in myssh_auth_interactive()
626 rc = SSH_OK; in myssh_auth_interactive()
627 else if(rc == SSH_AUTH_INFO) { in myssh_auth_interactive()
636 rc = SSH_ERROR; in myssh_auth_interactive()
641 rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL); in myssh_auth_interactive()
642 if(rc == SSH_AUTH_AGAIN) in myssh_auth_interactive()
644 else if(rc == SSH_AUTH_SUCCESS) in myssh_auth_interactive()
645 rc = SSH_OK; in myssh_auth_interactive()
647 rc = SSH_ERROR; in myssh_auth_interactive()
655 return rc; in myssh_auth_interactive()
671 int rc = SSH_NO_ERROR, err; in myssh_statemach_act() local
696 rc = ssh_connect(sshc->ssh_session); in myssh_statemach_act()
698 myssh_block2waitfor(conn, (rc == SSH_AGAIN)); in myssh_statemach_act()
699 if(rc == SSH_AGAIN) { in myssh_statemach_act()
704 if(rc != SSH_OK) { in myssh_statemach_act()
715 rc = myssh_is_known(data); in myssh_statemach_act()
716 if(rc != SSH_OK) { in myssh_statemach_act()
726 rc = ssh_userauth_none(sshc->ssh_session, NULL); in myssh_statemach_act()
727 if(rc == SSH_AUTH_AGAIN) { in myssh_statemach_act()
728 rc = SSH_AGAIN; in myssh_statemach_act()
732 if(rc == SSH_AUTH_SUCCESS) { in myssh_statemach_act()
738 else if(rc == SSH_AUTH_ERROR) { in myssh_statemach_act()
785 rc = ssh_userauth_try_publickey(sshc->ssh_session, NULL, in myssh_statemach_act()
787 if(rc == SSH_AUTH_AGAIN) { in myssh_statemach_act()
788 rc = SSH_AGAIN; in myssh_statemach_act()
792 if(rc != SSH_OK) { in myssh_statemach_act()
798 rc = ssh_pki_import_privkey_file(data-> in myssh_statemach_act()
802 if(rc != SSH_OK) { in myssh_statemach_act()
814 rc = ssh_userauth_publickey_auto(sshc->ssh_session, NULL, in myssh_statemach_act()
816 if(rc == SSH_AUTH_AGAIN) { in myssh_statemach_act()
817 rc = SSH_AGAIN; in myssh_statemach_act()
820 if(rc == SSH_AUTH_SUCCESS) { in myssh_statemach_act()
821 rc = SSH_OK; in myssh_statemach_act()
832 rc = ssh_userauth_publickey(sshc->ssh_session, NULL, sshc->privkey); in myssh_statemach_act()
833 if(rc == SSH_AUTH_AGAIN) { in myssh_statemach_act()
834 rc = SSH_AGAIN; in myssh_statemach_act()
838 if(rc == SSH_AUTH_SUCCESS) { in myssh_statemach_act()
845 infof(data, "Failed public key authentication (rc: %d)", rc); in myssh_statemach_act()
856 rc = ssh_userauth_gssapi(sshc->ssh_session); in myssh_statemach_act()
857 if(rc == SSH_AUTH_AGAIN) { in myssh_statemach_act()
858 rc = SSH_AGAIN; in myssh_statemach_act()
862 if(rc == SSH_AUTH_SUCCESS) { in myssh_statemach_act()
863 rc = SSH_OK; in myssh_statemach_act()
884 rc = myssh_auth_interactive(conn); in myssh_statemach_act()
885 if(rc == SSH_AGAIN) { in myssh_statemach_act()
888 if(rc == SSH_OK) { in myssh_statemach_act()
907 rc = ssh_userauth_password(sshc->ssh_session, NULL, conn->passwd); in myssh_statemach_act()
908 if(rc == SSH_AUTH_AGAIN) { in myssh_statemach_act()
909 rc = SSH_AGAIN; in myssh_statemach_act()
913 if(rc == SSH_AUTH_SUCCESS) { in myssh_statemach_act()
959 rc = sftp_init(sshc->sftp_session); in myssh_statemach_act()
960 if(rc != SSH_OK) { in myssh_statemach_act()
1046 rc = sftp_setstat(sshc->sftp_session, sshc->quote_path2, in myssh_statemach_act()
1048 if(rc && !sshc->acceptfail) { in myssh_statemach_act()
1065 rc = sftp_symlink(sshc->sftp_session, sshc->quote_path2, in myssh_statemach_act()
1067 if(rc && !sshc->acceptfail) { in myssh_statemach_act()
1081 rc = sftp_mkdir(sshc->sftp_session, sshc->quote_path1, in myssh_statemach_act()
1083 if(rc && !sshc->acceptfail) { in myssh_statemach_act()
1096 rc = sftp_rename(sshc->sftp_session, sshc->quote_path1, in myssh_statemach_act()
1098 if(rc && !sshc->acceptfail) { in myssh_statemach_act()
1112 rc = sftp_rmdir(sshc->sftp_session, sshc->quote_path1); in myssh_statemach_act()
1113 if(rc && !sshc->acceptfail) { in myssh_statemach_act()
1126 rc = sftp_unlink(sshc->sftp_session, sshc->quote_path1); in myssh_statemach_act()
1127 if(rc && !sshc->acceptfail) { in myssh_statemach_act()
1281 rc = 0; in myssh_statemach_act()
1331 if(rc) in myssh_statemach_act()
1342 rc = sftp_seek64(sshc->sftp_file, data->state.resume_from); in myssh_statemach_act()
1343 if(rc) { in myssh_statemach_act()
1400 rc = sftp_mkdir(sshc->sftp_session, protop->path, in myssh_statemach_act()
1404 if(rc < 0) { in myssh_statemach_act()
1417 rc = 0; /* clear rc and continue */ in myssh_statemach_act()
1673 rc = sftp_seek64(sshc->sftp_file, from); in myssh_statemach_act()
1674 if(rc) { in myssh_statemach_act()
1710 rc = sftp_seek64(sshc->sftp_file, data->state.resume_from); in myssh_statemach_act()
1711 if(rc) { in myssh_statemach_act()
1831 rc = ssh_scp_init(sshc->scp_session); in myssh_statemach_act()
1832 if(rc != SSH_OK) { in myssh_statemach_act()
1839 rc = ssh_scp_push_file(sshc->scp_session, protop->path, in myssh_statemach_act()
1842 if(rc != SSH_OK) { in myssh_statemach_act()
1870 rc = ssh_scp_init(sshc->scp_session); in myssh_statemach_act()
1871 if(rc != SSH_OK) { in myssh_statemach_act()
1883 rc = ssh_scp_pull_request(sshc->scp_session); in myssh_statemach_act()
1884 if(rc != SSH_SCP_REQUEST_NEWFILE) { in myssh_statemach_act()
1916 rc = ssh_scp_close(sshc->scp_session); in myssh_statemach_act()
1917 if(rc == SSH_AGAIN) { in myssh_statemach_act()
1923 if(rc != SSH_OK) { in myssh_statemach_act()
2023 } while(!rc && (sshc->state != SSH_STOP)); in myssh_statemach_act()
2026 if(rc == SSH_AGAIN) { in myssh_statemach_act()
2167 int rc; in myssh_connect() local
2197 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_HOST, ipv6); in myssh_connect()
2200 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_HOST, conn->host.name); in myssh_connect()
2202 if(rc != SSH_OK) { in myssh_connect()
2207 rc = ssh_options_parse_config(ssh->ssh_session, NULL); in myssh_connect()
2208 if(rc != SSH_OK) { in myssh_connect()
2213 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_FD, &sock); in myssh_connect()
2214 if(rc != SSH_OK) { in myssh_connect()
2221 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_USER, conn->user); in myssh_connect()
2222 if(rc != SSH_OK) { in myssh_connect()
2230 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_KNOWNHOSTS, in myssh_connect()
2232 if(rc != SSH_OK) { in myssh_connect()
2239 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_PORT, in myssh_connect()
2241 if(rc != SSH_OK) { in myssh_connect()
2248 rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_COMPRESSION, in myssh_connect()
2250 if(rc != SSH_OK) { in myssh_connect()
2260 rc = ssh_pki_import_pubkey_file(data->set.str[STRING_SSH_PUBLIC_KEY], in myssh_connect()
2262 if(rc != SSH_OK) { in myssh_connect()
2413 int rc; in scp_send() local
2419 rc = ssh_scp_write(conn->proto.sshc.scp_session, mem, len); in scp_send()
2425 myssh_block2waitfor(conn, (rc == SSH_AGAIN)); in scp_send()
2427 if(rc == SSH_AGAIN) { in scp_send()
2433 if(rc != SSH_OK) { in scp_send()