Lines Matching refs:sshc

242   struct ssh_conn *sshc = &conn->proto.sshc;
309 if(sshc->state != nowstate) {
311 (void *) sshc, names[sshc->state], names[nowstate],
316 sshc->state = nowstate;
333 struct ssh_conn *sshc = &conn->proto.sshc;
352 rc = ssh_get_server_publickey(sshc->ssh_session, &pubkey);
354 rc = ssh_get_publickey(sshc->ssh_session, &pubkey);
396 vstate = ssh_session_get_known_hosts_entry(sshc->ssh_session,
453 vstate = ssh_is_server_known(sshc->ssh_session);
513 rc = ssh_session_update_known_hosts(sshc->ssh_session);
515 rc = ssh_write_knownhost(sshc->ssh_session);
556 sshc->actualcode = _r; \
562 sshc->actualcode = \
563 sftp_error_to_CURLE(sftp_get_error(sshc->sftp_session)); \
568 if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) { \
578 if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) { \
588 if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) { \
601 struct ssh_conn *sshc = &conn->proto.sshc;
605 switch(sshc->kbd_state) {
607 rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL);
614 nprompts = ssh_userauth_kbdint_getnprompts(sshc->ssh_session);
618 rc = ssh_userauth_kbdint_setanswer(sshc->ssh_session, 0, conn->passwd);
624 sshc->kbd_state = 1;
626 rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL);
632 nprompts = ssh_userauth_kbdint_getnprompts(sshc->ssh_session);
636 sshc->kbd_state = 2;
643 sshc->kbd_state = 2;
645 rc = ssh_userauth_kbdint(sshc->ssh_session, NULL, NULL);
658 sshc->kbd_state = 0;
673 struct ssh_conn *sshc = &conn->proto.sshc;
682 switch(sshc->state) {
684 sshc->secondCreateDirs = 0;
685 sshc->nextstate = SSH_NO_STATE;
686 sshc->actualcode = CURLE_OK;
694 ssh_set_blocking(sshc->ssh_session, 0);
700 rc = ssh_connect(sshc->ssh_session);
724 sshc->authed = FALSE;
726 rc = ssh_userauth_none(sshc->ssh_session, NULL);
733 sshc->authed = TRUE;
743 sshc->auth_methods = ssh_userauth_list(sshc->ssh_session, NULL);
744 if(sshc->auth_methods)
746 sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY ?
748 sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC ?
750 sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE ?
752 sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD ?
754 if(sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {
758 else if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) {
761 else if(sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE) {
764 else if(sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD) {
783 if(sshc->pubkey && !data->set.ssl.key_passwd) {
784 rc = ssh_userauth_try_publickey(sshc->ssh_session, NULL,
785 sshc->pubkey);
800 NULL, &sshc->privkey);
813 rc = ssh_userauth_publickey_auto(sshc->ssh_session, NULL,
821 sshc->authed = TRUE;
831 rc = ssh_userauth_publickey(sshc->ssh_session, NULL, sshc->privkey);
838 sshc->authed = TRUE;
855 rc = ssh_userauth_gssapi(sshc->ssh_session);
863 sshc->authed = TRUE;
888 sshc->authed = TRUE;
906 rc = ssh_userauth_password(sshc->ssh_session, NULL, conn->passwd);
913 sshc->authed = TRUE;
923 if(!sshc->authed) {
948 ssh_set_blocking(sshc->ssh_session, 1);
950 sshc->sftp_session = sftp_new(sshc->ssh_session);
951 if(!sshc->sftp_session) {
953 ssh_get_error(sshc->ssh_session));
958 rc = sftp_init(sshc->sftp_session);
961 ssh_get_error(sshc->ssh_session));
971 sshc->homedir = sftp_canonicalize_path(sshc->sftp_session, ".");
972 if(!sshc->homedir) {
976 data->state.most_recent_ftp_entrypath = sshc->homedir;
987 result = Curl_getworkingpath(data, sshc->homedir, &protop->path);
989 sshc->actualcode = result;
996 sshc->quote_item = data->set.quote;
1007 sshc->quote_item = data->set.postquote;
1021 Curl_safefree(sshc->quote_path1);
1022 Curl_safefree(sshc->quote_path2);
1024 sshc->quote_item = sshc->quote_item->next;
1026 if(sshc->quote_item) {
1030 if(sshc->nextstate != SSH_NO_STATE) {
1031 state(data, sshc->nextstate);
1032 sshc->nextstate = SSH_NO_STATE;
1045 rc = sftp_setstat(sshc->sftp_session, sshc->quote_path2,
1046 sshc->quote_attrs);
1047 if(rc && !sshc->acceptfail) {
1048 Curl_safefree(sshc->quote_path1);
1049 Curl_safefree(sshc->quote_path2);
1051 ssh_get_error(sshc->ssh_session));
1053 sshc->nextstate = SSH_NO_STATE;
1054 sshc->actualcode = CURLE_QUOTE_ERROR;
1055 /* sshc->actualcode = sftp_error_to_CURLE(err);
1064 rc = sftp_symlink(sshc->sftp_session, sshc->quote_path2,
1065 sshc->quote_path1);
1066 if(rc && !sshc->acceptfail) {
1067 Curl_safefree(sshc->quote_path1);
1068 Curl_safefree(sshc->quote_path2);
1070 ssh_get_error(sshc->ssh_session));
1072 sshc->nextstate = SSH_NO_STATE;
1073 sshc->actualcode = CURLE_QUOTE_ERROR;
1080 rc = sftp_mkdir(sshc->sftp_session, sshc->quote_path1,
1082 if(rc && !sshc->acceptfail) {
1083 Curl_safefree(sshc->quote_path1);
1085 ssh_get_error(sshc->ssh_session));
1087 sshc->nextstate = SSH_NO_STATE;
1088 sshc->actualcode = CURLE_QUOTE_ERROR;
1095 rc = sftp_rename(sshc->sftp_session, sshc->quote_path1,
1096 sshc->quote_path2);
1097 if(rc && !sshc->acceptfail) {
1098 Curl_safefree(sshc->quote_path1);
1099 Curl_safefree(sshc->quote_path2);
1101 ssh_get_error(sshc->ssh_session));
1103 sshc->nextstate = SSH_NO_STATE;
1104 sshc->actualcode = CURLE_QUOTE_ERROR;
1111 rc = sftp_rmdir(sshc->sftp_session, sshc->quote_path1);
1112 if(rc && !sshc->acceptfail) {
1113 Curl_safefree(sshc->quote_path1);
1115 ssh_get_error(sshc->ssh_session));
1117 sshc->nextstate = SSH_NO_STATE;
1118 sshc->actualcode = CURLE_QUOTE_ERROR;
1125 rc = sftp_unlink(sshc->sftp_session, sshc->quote_path1);
1126 if(rc && !sshc->acceptfail) {
1127 Curl_safefree(sshc->quote_path1);
1129 ssh_get_error(sshc->ssh_session));
1131 sshc->nextstate = SSH_NO_STATE;
1132 sshc->actualcode = CURLE_QUOTE_ERROR;
1142 statvfs = sftp_statvfs(sshc->sftp_session, sshc->quote_path1);
1143 if(!statvfs && !sshc->acceptfail) {
1144 Curl_safefree(sshc->quote_path1);
1146 ssh_get_error(sshc->ssh_session));
1148 sshc->nextstate = SSH_NO_STATE;
1149 sshc->actualcode = CURLE_QUOTE_ERROR;
1181 sshc->nextstate = SSH_NO_STATE;
1189 sshc->nextstate = SSH_NO_STATE;
1190 sshc->actualcode = result;
1210 attrs = sftp_stat(sshc->sftp_session, protop->path);
1239 attrs = sftp_stat(sshc->sftp_session, protop->path);
1267 if(sshc->sftp_file)
1268 sftp_close(sshc->sftp_file);
1269 sshc->sftp_file =
1270 sftp_open(sshc->sftp_session, protop->path,
1272 if(!sshc->sftp_file) {
1273 err = sftp_get_error(sshc->sftp_session);
1281 sshc->secondCreateDirs = 1;
1341 rc = sftp_seek64(sshc->sftp_file, data->state.resume_from);
1359 sshc->orig_waitfor = data->req.keepon;
1377 sshc->slash_pos = protop->path + 1; /* ignore the leading '/' */
1386 sshc->slash_pos = strchr(sshc->slash_pos, '/');
1387 if(sshc->slash_pos) {
1388 *sshc->slash_pos = 0;
1399 rc = sftp_mkdir(sshc->sftp_session, protop->path,
1401 *sshc->slash_pos = '/';
1402 ++sshc->slash_pos;
1409 err = sftp_get_error(sshc->sftp_session);
1432 sshc->sftp_dir = sftp_opendir(sshc->sftp_session,
1434 if(!sshc->sftp_dir) {
1436 ssh_get_error(sshc->ssh_session));
1444 Curl_dyn_reset(&sshc->readdir_buf);
1445 if(sshc->readdir_attrs)
1446 sftp_attributes_free(sshc->readdir_attrs);
1448 sshc->readdir_attrs = sftp_readdir(sshc->sftp_session, sshc->sftp_dir);
1449 if(sshc->readdir_attrs) {
1450 sshc->readdir_filename = sshc->readdir_attrs->name;
1451 sshc->readdir_longentry = sshc->readdir_attrs->longname;
1452 sshc->readdir_len = strlen(sshc->readdir_filename);
1457 tmpLine = aprintf("%s\n", sshc->readdir_filename);
1460 sshc->actualcode = CURLE_OUT_OF_MEMORY;
1464 tmpLine, sshc->readdir_len + 1);
1474 if(Curl_dyn_add(&sshc->readdir_buf, sshc->readdir_longentry)) {
1475 sshc->actualcode = CURLE_OUT_OF_MEMORY;
1480 if((sshc->readdir_attrs->flags & SSH_FILEXFER_ATTR_PERMISSIONS) &&
1481 ((sshc->readdir_attrs->permissions & SSH_S_IFMT) ==
1483 sshc->readdir_linkPath = aprintf("%s%s", protop->path,
1484 sshc->readdir_filename);
1486 if(!sshc->readdir_linkPath) {
1488 sshc->actualcode = CURLE_OUT_OF_MEMORY;
1499 else if(sftp_dir_eof(sshc->sftp_dir)) {
1505 ssh_get_error(sshc->ssh_session));
1512 if(sshc->readdir_link_attrs)
1513 sftp_attributes_free(sshc->readdir_link_attrs);
1515 sshc->readdir_link_attrs = sftp_lstat(sshc->sftp_session,
1516 sshc->readdir_linkPath);
1517 if(sshc->readdir_link_attrs == 0) {
1519 ssh_get_error(sshc->ssh_session));
1524 if(!sshc->readdir_link_attrs->name) {
1525 sshc->readdir_tmp = sftp_readlink(sshc->sftp_session,
1526 sshc->readdir_linkPath);
1527 if(!sshc->readdir_filename)
1528 sshc->readdir_len = 0;
1530 sshc->readdir_len = strlen(sshc->readdir_tmp);
1531 sshc->readdir_longentry = NULL;
1532 sshc->readdir_filename = sshc->readdir_tmp;
1535 sshc->readdir_len = strlen(sshc->readdir_link_attrs->name);
1536 sshc->readdir_filename = sshc->readdir_link_attrs->name;
1537 sshc->readdir_longentry = sshc->readdir_link_attrs->longname;
1540 Curl_safefree(sshc->readdir_linkPath);
1542 if(Curl_dyn_addf(&sshc->readdir_buf, " -> %s",
1543 sshc->readdir_filename)) {
1544 sshc->actualcode = CURLE_OUT_OF_MEMORY;
1548 sftp_attributes_free(sshc->readdir_link_attrs);
1549 sshc->readdir_link_attrs = NULL;
1550 sshc->readdir_filename = NULL;
1551 sshc->readdir_longentry = NULL;
1556 if(Curl_dyn_addn(&sshc->readdir_buf, "\n", 1))
1560 Curl_dyn_ptr(&sshc->readdir_buf),
1561 Curl_dyn_len(&sshc->readdir_buf));
1563 ssh_string_free_char(sshc->readdir_tmp);
1564 sshc->readdir_tmp = NULL;
1574 sftp_closedir(sshc->sftp_dir);
1575 sshc->sftp_dir = NULL;
1586 if(sshc->sftp_file)
1587 sftp_close(sshc->sftp_file);
1589 sshc->sftp_file = sftp_open(sshc->sftp_session, protop->path,
1591 if(!sshc->sftp_file) {
1593 ssh_get_error(sshc->ssh_session));
1598 sftp_file_set_nonblocking(sshc->sftp_file);
1607 attrs = sftp_fstat(sshc->sftp_file);
1671 rc = sftp_seek64(sshc->sftp_file, from);
1710 rc = sftp_seek64(sshc->sftp_file, data->state.resume_from);
1740 sshc->actualcode = result;
1743 sshc->sftp_recv_state = 0;
1749 if(sshc->sftp_file) {
1750 sftp_close(sshc->sftp_file);
1751 sshc->sftp_file = NULL;
1760 if(sshc->nextstate != SSH_NO_STATE &&
1761 sshc->nextstate != SSH_SFTP_CLOSE) {
1762 state(data, sshc->nextstate);
1763 sshc->nextstate = SSH_SFTP_CLOSE;
1767 result = sshc->actualcode;
1776 if(sshc->sftp_file) {
1777 sftp_close(sshc->sftp_file);
1778 sshc->sftp_file = NULL;
1781 if(sshc->sftp_session) {
1782 sftp_free(sshc->sftp_session);
1783 sshc->sftp_session = NULL;
1786 SSH_STRING_FREE_CHAR(sshc->homedir);
1793 result = Curl_getworkingpath(data, sshc->homedir, &protop->path);
1795 sshc->actualcode = result;
1801 ssh_set_blocking(sshc->ssh_session, 1);
1806 sshc->actualcode = CURLE_UPLOAD_FAILED;
1811 sshc->scp_session =
1812 ssh_scp_new(sshc->ssh_session, SSH_SCP_WRITE, protop->path);
1816 sshc->scp_session =
1817 ssh_scp_new(sshc->ssh_session, SSH_SCP_READ, protop->path);
1821 if(!sshc->scp_session) {
1822 err_msg = ssh_get_error(sshc->ssh_session);
1831 rc = ssh_scp_init(sshc->scp_session);
1833 err_msg = ssh_get_error(sshc->ssh_session);
1839 rc = ssh_scp_push_file(sshc->scp_session, protop->path,
1843 err_msg = ssh_get_error(sshc->ssh_session);
1857 sshc->orig_waitfor = data->req.keepon;
1870 rc = ssh_scp_init(sshc->scp_session);
1872 err_msg = ssh_get_error(sshc->ssh_session);
1883 rc = ssh_scp_pull_request(sshc->scp_session);
1885 err_msg = ssh_get_error(sshc->ssh_session);
1892 bytecount = ssh_scp_request_get_size(sshc->scp_session);
1915 if(sshc->scp_session) {
1916 rc = ssh_scp_close(sshc->scp_session);
1925 ssh_get_error(sshc->ssh_session));
1933 if(sshc->scp_session) {
1934 ssh_scp_free(sshc->scp_session);
1935 sshc->scp_session = NULL;
1939 ssh_set_blocking(sshc->ssh_session, 0);
1948 if(sshc->scp_session) {
1949 ssh_scp_free(sshc->scp_session);
1950 sshc->scp_session = NULL;
1953 ssh_disconnect(sshc->ssh_session);
1961 SSH_STRING_FREE_CHAR(sshc->homedir);
1967 if(sshc->ssh_session) {
1968 ssh_free(sshc->ssh_session);
1969 sshc->ssh_session = NULL;
1974 DEBUGASSERT(sshc->ssh_session == NULL);
1975 DEBUGASSERT(sshc->scp_session == NULL);
1977 if(sshc->readdir_tmp) {
1978 ssh_string_free_char(sshc->readdir_tmp);
1979 sshc->readdir_tmp = NULL;
1982 if(sshc->quote_attrs)
1983 sftp_attributes_free(sshc->quote_attrs);
1985 if(sshc->readdir_attrs)
1986 sftp_attributes_free(sshc->readdir_attrs);
1988 if(sshc->readdir_link_attrs)
1989 sftp_attributes_free(sshc->readdir_link_attrs);
1991 if(sshc->privkey)
1992 ssh_key_free(sshc->privkey);
1993 if(sshc->pubkey)
1994 ssh_key_free(sshc->pubkey);
1996 Curl_safefree(sshc->rsa_pub);
1997 Curl_safefree(sshc->rsa);
1998 Curl_safefree(sshc->quote_path1);
1999 Curl_safefree(sshc->quote_path2);
2000 Curl_dyn_free(&sshc->readdir_buf);
2001 Curl_safefree(sshc->readdir_linkPath);
2002 SSH_STRING_FREE_CHAR(sshc->homedir);
2005 result = sshc->actualcode;
2007 memset(sshc, 0, sizeof(struct ssh_conn));
2010 sshc->state = SSH_SESSION_FREE; /* current */
2011 sshc->nextstate = SSH_NO_STATE;
2018 sshc->nextstate = SSH_NO_STATE;
2023 } while(!rc && (sshc->state != SSH_STOP));
2060 struct ssh_conn *sshc = &conn->proto.sshc;
2064 conn->waitfor = sshc->orig_waitfor;
2067 int dir = ssh_get_poll_flags(sshc->ssh_session);
2083 struct ssh_conn *sshc = &conn->proto.sshc;
2088 *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
2098 struct ssh_conn *sshc = &conn->proto.sshc;
2101 while((sshc->state != SSH_STOP) && !result) {
2144 struct ssh_conn *sshc = &conn->proto.sshc;
2149 Curl_dyn_init(&sshc->readdir_buf, PATH_MAX * 2);
2186 ssh = &conn->proto.sshc;
2322 struct ssh_conn *sshc = &conn->proto.sshc;
2328 sshc->actualcode = CURLE_OK; /* reset error code */
2329 sshc->secondCreateDirs = 0; /* reset the create dir attempt state
2353 struct ssh_conn *ssh = &conn->proto.sshc;
2411 rc = ssh_scp_write(conn->proto.sshc.scp_session, mem, len);
2442 nread = ssh_scp_read(conn->proto.sshc.scp_session, mem, len);
2521 if(conn->proto.sshc.ssh_session) {
2537 struct ssh_conn *sshc = &conn->proto.sshc;
2544 sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
2564 nwrite = sftp_write(conn->proto.sshc.sftp_file, mem, len);
2596 switch(conn->proto.sshc.sftp_recv_state) {
2598 conn->proto.sshc.sftp_file_index =
2599 sftp_async_read_begin(conn->proto.sshc.sftp_file,
2601 if(conn->proto.sshc.sftp_file_index < 0) {
2608 conn->proto.sshc.sftp_recv_state = 1;
2610 nread = sftp_async_read(conn->proto.sshc.sftp_file,
2612 conn->proto.sshc.sftp_file_index);
2625 conn->proto.sshc.sftp_recv_state = 0;
2639 struct ssh_conn *sshc = &conn->proto.sshc;
2645 char *cmd = sshc->quote_item->data;
2646 sshc->acceptfail = FALSE;
2655 sshc->acceptfail = TRUE;
2663 sshc->actualcode = CURLE_OUT_OF_MEMORY;
2665 sshc->nextstate = SSH_NO_STATE;
2678 sshc->nextstate = SSH_NO_STATE;
2679 sshc->actualcode = result;
2694 sshc->nextstate = SSH_NO_STATE;
2695 sshc->actualcode = CURLE_QUOTE_ERROR;
2703 result = Curl_get_pathname(&cp, &sshc->quote_path1, sshc->homedir);
2710 sshc->nextstate = SSH_NO_STATE;
2711 sshc->actualcode = result;
2728 /* sshc->quote_path1 contains the mode to set */
2730 result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
2737 Curl_safefree(sshc->quote_path1);
2739 sshc->nextstate = SSH_NO_STATE;
2740 sshc->actualcode = result;
2743 sshc->quote_attrs = NULL;
2750 /* sshc->quote_path1 is the source */
2752 result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
2758 Curl_safefree(sshc->quote_path1);
2760 sshc->nextstate = SSH_NO_STATE;
2761 sshc->actualcode = result;
2776 result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
2782 Curl_safefree(sshc->quote_path1);
2784 sshc->nextstate = SSH_NO_STATE;
2785 sshc->actualcode = result;
2808 Curl_safefree(sshc->quote_path1);
2809 Curl_safefree(sshc->quote_path2);
2811 sshc->nextstate = SSH_NO_STATE;
2812 sshc->actualcode = CURLE_QUOTE_ERROR;
2818 struct ssh_conn *sshc = &conn->proto.sshc;
2819 char *cmd = sshc->quote_item->data;
2820 sshc->acceptfail = FALSE;
2829 sshc->acceptfail = TRUE;
2832 /* We read the file attributes, store them in sshc->quote_attrs
2837 if(sshc->quote_attrs)
2838 sftp_attributes_free(sshc->quote_attrs);
2839 sshc->quote_attrs = sftp_stat(sshc->sftp_session, sshc->quote_path2);
2840 if(!sshc->quote_attrs) {
2841 Curl_safefree(sshc->quote_path1);
2842 Curl_safefree(sshc->quote_path2);
2844 sftp_get_error(sshc->sftp_session));
2846 sshc->nextstate = SSH_NO_STATE;
2847 sshc->actualcode = CURLE_QUOTE_ERROR;
2853 sshc->quote_attrs->gid = (uint32_t)strtoul(sshc->quote_path1, NULL, 10);
2854 if(sshc->quote_attrs->gid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
2855 !sshc->acceptfail) {
2856 Curl_safefree(sshc->quote_path1);
2857 Curl_safefree(sshc->quote_path2);
2860 sshc->nextstate = SSH_NO_STATE;
2861 sshc->actualcode = CURLE_QUOTE_ERROR;
2864 sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_UIDGID;
2868 perms = (mode_t)strtoul(sshc->quote_path1, NULL, 8);
2870 if(perms == 0 && !ISDIGIT(sshc->quote_path1[0])) {
2871 Curl_safefree(sshc->quote_path1);
2872 Curl_safefree(sshc->quote_path2);
2875 sshc->nextstate = SSH_NO_STATE;
2876 sshc->actualcode = CURLE_QUOTE_ERROR;
2879 sshc->quote_attrs->permissions = perms;
2880 sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_PERMISSIONS;
2883 sshc->quote_attrs->uid = (uint32_t)strtoul(sshc->quote_path1, NULL, 10);
2884 if(sshc->quote_attrs->uid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
2885 !sshc->acceptfail) {
2886 Curl_safefree(sshc->quote_path1);
2887 Curl_safefree(sshc->quote_path2);
2890 sshc->nextstate = SSH_NO_STATE;
2891 sshc->actualcode = CURLE_QUOTE_ERROR;
2894 sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_UIDGID;
2898 time_t date = Curl_getdate_capped(sshc->quote_path1);
2911 Curl_safefree(sshc->quote_path1);
2912 Curl_safefree(sshc->quote_path2);
2914 sshc->nextstate = SSH_NO_STATE;
2915 sshc->actualcode = CURLE_QUOTE_ERROR;
2919 sshc->quote_attrs->atime = (uint32_t)date;
2921 sshc->quote_attrs->mtime = (uint32_t)date;
2923 sshc->quote_attrs->flags |= SSH_FILEXFER_ATTR_ACMODTIME;