Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fc63c64602 | |||
| 1e6e067fdf | |||
| 44a56f0cac | |||
| 653de120c8 | |||
| 63300fd564 | |||
| 45710c81d7 | |||
| 161ece55a3 | |||
| db149d1d87 | |||
| 861d308a03 | |||
| 319f0dde18 | |||
| 82766d1093 | |||
| 6f6491cd13 | |||
| 03a693d295 | |||
| 55eb1f00e6 | |||
| 37b6969067 |
+2
-1
@@ -1,6 +1,5 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
group: deprecated-2017Q2
|
||||
|
||||
language:
|
||||
- c
|
||||
@@ -13,6 +12,8 @@ addons:
|
||||
- clang
|
||||
- gcc
|
||||
- gcc-6
|
||||
before_install:
|
||||
- pip install pip==8.1.1 && pip3 install pip==8.1.1
|
||||
install: test/travis-install.sh
|
||||
script: test/travis-build.sh
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
Release 3.1.0 (2017-08-04)
|
||||
--------------------------
|
||||
|
||||
* Temporarily disabled the writeback cache feature, since there
|
||||
have been reports of dataloss when appending to files when
|
||||
writeback caching is enabled.
|
||||
|
||||
* Fixed a crash due to a race condition when listing
|
||||
directory contents.
|
||||
|
||||
* For improved backwards compatibility, SSHFS now also silently
|
||||
accepts the old ``-o cache_*`` options.
|
||||
|
||||
Release 3.0.0 (2017-07-08)
|
||||
--------------------------
|
||||
|
||||
|
||||
@@ -586,6 +586,19 @@ static const struct fuse_opt cache_opts[] = {
|
||||
clean_interval_secs), 0 },
|
||||
{ "dcache_min_clean_interval=%u", offsetof(struct cache,
|
||||
min_clean_interval_secs), 0 },
|
||||
|
||||
/* For backwards compatibility */
|
||||
{ "cache_timeout=%u", offsetof(struct cache, stat_timeout_secs), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, dir_timeout_secs), 0 },
|
||||
{ "cache_timeout=%u", offsetof(struct cache, link_timeout_secs), 0 },
|
||||
{ "cache_stat_timeout=%u", offsetof(struct cache, stat_timeout_secs), 0 },
|
||||
{ "cache_dir_timeout=%u", offsetof(struct cache, dir_timeout_secs), 0 },
|
||||
{ "cache_link_timeout=%u", offsetof(struct cache, link_timeout_secs), 0 },
|
||||
{ "cache_max_size=%u", offsetof(struct cache, max_size), 0 },
|
||||
{ "cache_clean_interval=%u", offsetof(struct cache,
|
||||
clean_interval_secs), 0 },
|
||||
{ "cache_min_clean_interval=%u", offsetof(struct cache,
|
||||
min_clean_interval_secs), 0 },
|
||||
FUSE_OPT_END
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
AC_INIT(sshfs, 3.0.0)
|
||||
AC_INIT(sshfs, 3.1.0)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
project('sshfs', 'c', version: '3.0.0',
|
||||
project('sshfs', 'c', version: '3.1.0',
|
||||
meson_version: '>= 0.38',
|
||||
default_options: [ 'buildtype=plain' ])
|
||||
|
||||
|
||||
@@ -279,7 +279,6 @@ struct sshfs {
|
||||
int ext_statvfs;
|
||||
int ext_hardlink;
|
||||
int ext_fsync;
|
||||
mode_t mnt_mode;
|
||||
struct fuse_operations *op;
|
||||
|
||||
/* statistics */
|
||||
@@ -423,7 +422,13 @@ static struct fuse_opt sshfs_opts[] = {
|
||||
FUSE_OPT_KEY("-p ", KEY_PORT),
|
||||
FUSE_OPT_KEY("-C", KEY_COMPRESS),
|
||||
FUSE_OPT_KEY("-F ", KEY_CONFIGFILE),
|
||||
|
||||
/* For backwards compatibility */
|
||||
SSHFS_OPT("cache=yes", dir_cache, 1),
|
||||
SSHFS_OPT("cache=no", dir_cache, 0),
|
||||
|
||||
FUSE_OPT_END
|
||||
|
||||
};
|
||||
|
||||
static struct fuse_opt workaround_opts[] = {
|
||||
@@ -1644,16 +1649,11 @@ static int sftp_check_root(const char *base_path)
|
||||
if (!(flags & SSH_FILEXFER_ATTR_PERMISSIONS))
|
||||
goto out;
|
||||
|
||||
if (S_ISDIR(sshfs.mnt_mode) && !S_ISDIR(stbuf.st_mode)) {
|
||||
if (!S_ISDIR(stbuf.st_mode)) {
|
||||
fprintf(stderr, "%s:%s: Not a directory\n", sshfs.host,
|
||||
remote_dir);
|
||||
goto out;
|
||||
}
|
||||
if ((sshfs.mnt_mode ^ stbuf.st_mode) & S_IFMT) {
|
||||
fprintf(stderr, "%s:%s: type of file differs from mountpoint\n",
|
||||
sshfs.host, remote_dir);
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = 0;
|
||||
|
||||
@@ -2073,11 +2073,16 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
|
||||
outstanding--;
|
||||
|
||||
if (done) {
|
||||
/* We need to cache want_reply, since processing
|
||||
thread may free req right after unlock() if
|
||||
want_reply == 0 */
|
||||
int want_reply;
|
||||
pthread_mutex_lock(&sshfs.lock);
|
||||
if (sshfs_req_pending(req))
|
||||
req->want_reply = 0;
|
||||
want_reply = req->want_reply;
|
||||
pthread_mutex_unlock(&sshfs.lock);
|
||||
if (!req->want_reply)
|
||||
if (!want_reply)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2490,7 +2495,7 @@ static int sshfs_open_common(const char *path, mode_t mode,
|
||||
uint32_t pflags = 0;
|
||||
struct iovec iov;
|
||||
uint8_t type;
|
||||
uint64_t wrctr;
|
||||
uint64_t wrctr = 0;
|
||||
|
||||
if (sshfs.dir_cache)
|
||||
wrctr = cache_get_write_ctr();
|
||||
@@ -3145,6 +3150,9 @@ static int sshfs_getattr(const char *path, struct stat *stbuf,
|
||||
}
|
||||
if (!err) {
|
||||
err = buf_get_attrs(&outbuf, stbuf, NULL);
|
||||
#ifdef __APPLE__
|
||||
stbuf->st_blksize = 0;
|
||||
#endif
|
||||
buf_free(&outbuf);
|
||||
}
|
||||
buf_free(&buf);
|
||||
@@ -3820,9 +3828,6 @@ int main(int argc, char *argv[])
|
||||
const char *sftp_server;
|
||||
struct fuse *fuse;
|
||||
struct fuse_session *se;
|
||||
#if !defined(__CYGWIN__)
|
||||
struct stat st;
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (!realpath(*exec_path, sshfs_program_path)) {
|
||||
@@ -3847,7 +3852,7 @@ int main(int argc, char *argv[])
|
||||
sshfs.wfd = -1;
|
||||
sshfs.ptyfd = -1;
|
||||
sshfs.dir_cache = 1;
|
||||
sshfs.writeback_cache = 1;
|
||||
sshfs.writeback_cache = 0;
|
||||
sshfs.show_help = 0;
|
||||
sshfs.show_version = 0;
|
||||
sshfs.singlethread = 0;
|
||||
@@ -3895,7 +3900,11 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "see `%s -h' for usage\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if(sshfs.writeback_cache)
|
||||
printf("NOTICE: writeback cache is disabled in this release due to potential\n"
|
||||
"dataloss. It will be re-enabled in a future SSHFS release.\n");
|
||||
|
||||
if (sshfs.idmap == IDMAP_USER)
|
||||
sshfs.detect_uid = 1;
|
||||
else if (sshfs.idmap == IDMAP_FILE) {
|
||||
@@ -3984,18 +3993,6 @@ int main(int argc, char *argv[])
|
||||
g_free(tmp);
|
||||
g_free(fsname);
|
||||
|
||||
|
||||
#if !defined(__CYGWIN__)
|
||||
res = stat(sshfs.mountpoint, &st);
|
||||
if (res == -1) {
|
||||
perror(sshfs.mountpoint);
|
||||
exit(1);
|
||||
}
|
||||
sshfs.mnt_mode = st.st_mode;
|
||||
#elif defined(__CYGWIN__)
|
||||
sshfs.mnt_mode = S_IFDIR | 0755;
|
||||
#endif
|
||||
|
||||
if(sshfs.dir_cache)
|
||||
sshfs.op = cache_wrap(&sshfs_oper);
|
||||
else
|
||||
|
||||
@@ -14,16 +14,19 @@ ninja --version
|
||||
meson --version
|
||||
|
||||
# Install fuse
|
||||
wget https://github.com/libfuse/libfuse/releases/download/fuse-3.0.2/fuse-3.0.2.tar.gz
|
||||
tar xzf fuse-3.0.2.tar.gz
|
||||
cd fuse-3.0.2
|
||||
wget https://github.com/libfuse/libfuse/archive/master.zip
|
||||
unzip master.zip
|
||||
cd libfuse-master
|
||||
mkdir build
|
||||
cd build
|
||||
export CC=gcc-6
|
||||
meson ..
|
||||
ninja
|
||||
sudo ninja install
|
||||
test -e /usr/local/lib/pkgconfig || sudo mkdir /usr/local/lib/pkgconfig
|
||||
sudo mv /usr/local/lib/*/pkgconfig/* /usr/local/lib/pkgconfig/
|
||||
ls -d1 /usr/local/lib/*-linux-gnu | sudo tee /etc/ld.so.conf.d/usrlocal.conf
|
||||
sudo ldconfig
|
||||
|
||||
# Setup ssh
|
||||
ssh-keygen -b 768 -t rsa -f ~/.ssh/id_rsa -P ''
|
||||
|
||||
Reference in New Issue
Block a user