Lines Matching defs:sshp
969 struct SSHPROTO *sshp = data->req.p.ssh;
1459 result = Curl_getworkingpath(data, sshc->homedir, &sshp->path);
1514 sshp->path);
1596 memset(&sshp->quote_attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES));
1713 &sshp->quote_attrs);
1732 sshp->quote_attrs.gid = strtoul(sshc->quote_path1, NULL, 10);
1733 sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
1734 if(sshp->quote_attrs.gid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
1746 sshp->quote_attrs.permissions = strtoul(sshc->quote_path1, NULL, 8);
1747 sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_PERMISSIONS;
1749 if(sshp->quote_attrs.permissions == 0 &&
1761 sshp->quote_attrs.uid = strtoul(sshc->quote_path1, NULL, 10);
1762 sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_UIDGID;
1763 if(sshp->quote_attrs.uid == 0 && !ISDIGIT(sshc->quote_path1[0]) &&
1799 sshp->quote_attrs.atime = (unsigned long)date;
1801 sshp->quote_attrs.mtime = (unsigned long)date;
1803 sshp->quote_attrs.flags = LIBSSH2_SFTP_ATTR_ACMODTIME;
1815 &sshp->quote_attrs);
2018 rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path,
2019 curlx_uztoui(strlen(sshp->path)),
2036 if(sshp->path[strlen(sshp->path)-1] == '/')
2056 rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path,
2057 curlx_uztoui(strlen(sshp->path)),
2087 libssh2_sftp_open_ex(sshc->sftp_session, sshp->path,
2088 curlx_uztoui(strlen(sshp->path)),
2117 (strlen(sshp->path) > 1))) {
2228 if(strlen(sshp->path) > 1) {
2229 sshc->slash_pos = sshp->path + 1; /* ignore the leading '/' */
2242 infof(data, "Creating directory '%s'", sshp->path);
2251 rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshp->path,
2252 curlx_uztoui(strlen(sshp->path)),
2291 sshp->path,
2293 strlen(sshp->path)),
2309 sshp->readdir_filename = malloc(PATH_MAX + 1);
2310 if(!sshp->readdir_filename) {
2315 sshp->readdir_longentry = malloc(PATH_MAX + 1);
2316 if(!sshp->readdir_longentry) {
2317 Curl_safefree(sshp->readdir_filename);
2322 Curl_dyn_init(&sshp->readdir, PATH_MAX * 2);
2328 sshp->readdir_filename,
2330 sshp->readdir_longentry,
2332 &sshp->readdir_attrs);
2338 sshp->readdir_filename[readdir_len] = '\0';
2342 sshp->readdir_filename,
2354 result = Curl_dyn_add(&sshp->readdir, sshp->readdir_longentry);
2357 if((sshp->readdir_attrs.flags & LIBSSH2_SFTP_ATTR_PERMISSIONS) &&
2358 ((sshp->readdir_attrs.permissions & LIBSSH2_SFTP_S_IFMT) ==
2360 Curl_dyn_init(&sshp->readdir_link, PATH_MAX);
2361 result = Curl_dyn_addf(&sshp->readdir_link, "%s%s", sshp->path,
2362 sshp->readdir_filename);
2378 Curl_safefree(sshp->readdir_filename);
2379 Curl_safefree(sshp->readdir_longentry);
2390 Curl_safefree(sshp->readdir_filename);
2391 Curl_safefree(sshp->readdir_longentry);
2400 Curl_dyn_ptr(&sshp->readdir_link),
2401 (int)Curl_dyn_len(&sshp->readdir_link),
2402 sshp->readdir_filename,
2407 Curl_dyn_free(&sshp->readdir_link);
2410 result = Curl_dyn_addf(&sshp->readdir, " -> %s", sshp->readdir_filename);
2413 Curl_safefree(sshp->readdir_filename);
2414 Curl_safefree(sshp->readdir_longentry);
2424 result = Curl_dyn_addn(&sshp->readdir, "\n", 1);
2427 Curl_dyn_ptr(&sshp->readdir),
2428 Curl_dyn_len(&sshp->readdir));
2431 Curl_dyn_free(&sshp->readdir);
2435 Curl_dyn_reset(&sshp->readdir);
2447 Curl_safefree(sshp->readdir_filename);
2448 Curl_safefree(sshp->readdir_longentry);
2460 libssh2_sftp_open_ex(sshc->sftp_session, sshp->path,
2461 curlx_uztoui(strlen(sshp->path)),
2485 rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path,
2486 curlx_uztoui(strlen(sshp->path)),
2632 Curl_safefree(sshp->path);
2686 result = Curl_getworkingpath(data, sshc->homedir, &sshp->path);
2715 SCP_SEND(sshc->ssh_session, sshp->path, data->set.new_file_perms,
2783 sshp->path, &sb);
2788 sshp->path, &sb);
3501 struct SSHPROTO *sshp = data->req.p.ssh;
3510 Curl_safefree(sshp->path);
3511 Curl_safefree(sshp->readdir_filename);
3512 Curl_safefree(sshp->readdir_longentry);
3513 Curl_dyn_free(&sshp->readdir);