summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-08-04 23:12:01 -0700
committerMichael Forney <mforney@mforney.org>2017-08-04 23:12:01 -0700
commit1e82f712da448324211295f9a8504922eaa5cc4a (patch)
treebdc01fce7f85f4a4ee0aa400c1bf8716c06bf3b2 /pkg
parentfe999931fbb6b4b7ed268c97d66fdace2eec5297 (diff)
sshfs: Update to 3.1.0
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sshfs/config.h2
-rw-r--r--pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch34
-rw-r--r--pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch8
-rw-r--r--pkg/sshfs/patch/0005-Use-standard-C-functions.patch40
-rw-r--r--pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch28
-rw-r--r--pkg/sshfs/rev2
m---------pkg/sshfs/src0
7 files changed, 57 insertions, 57 deletions
diff --git a/pkg/sshfs/config.h b/pkg/sshfs/config.h
index 01f41c15..eb0b4992 100644
--- a/pkg/sshfs/config.h
+++ b/pkg/sshfs/config.h
@@ -1,2 +1,2 @@
#define IDMAP_DEFAULT "none"
-#define PACKAGE_VERSION "3.0.0"
+#define PACKAGE_VERSION "3.1.0"
diff --git a/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch b/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch
index 90f24465..95071dbc 100644
--- a/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch
+++ b/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch
@@ -1,4 +1,4 @@
-From 6ff3918c325fb7cef56c081cbaa7538435bb2f7a Mon Sep 17 00:00:00 2001
+From 7b709a968b3505ac0e55a0fdea8c54791ed718d6 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:25:36 -0700
Subject: [PATCH] Use a compact array and free list for requests
@@ -8,7 +8,7 @@ Subject: [PATCH] Use a compact array and free list for requests
1 file changed, 80 insertions(+), 45 deletions(-)
diff --git a/sshfs.c b/sshfs.c
-index a20f727..5adb290 100644
+index 3c4f242..c5ed603 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -171,6 +171,17 @@ struct request {
@@ -38,7 +38,7 @@ index a20f727..5adb290 100644
pthread_mutex_t lock;
pthread_mutex_t lock_write;
int processing_thread_started;
-@@ -1149,12 +1160,6 @@ static int do_write(struct iovec *iov, size_t count)
+@@ -1154,12 +1165,6 @@ static int do_write(struct iovec *iov, size_t count)
return 0;
}
@@ -51,7 +51,7 @@ index a20f727..5adb290 100644
static void buf_to_iov(const struct buffer *buf, struct iovec *iov)
{
iov->iov_base = buf->p;
-@@ -1247,6 +1252,43 @@ static void request_free(struct request *req)
+@@ -1252,6 +1257,43 @@ static void request_free(struct request *req)
g_free(req);
}
@@ -95,7 +95,7 @@ index a20f727..5adb290 100644
static void chunk_free(struct read_chunk *chunk)
{
while (!list_empty(&chunk->reqs)) {
-@@ -1276,21 +1318,6 @@ static void chunk_put_locked(struct read_chunk *chunk)
+@@ -1281,21 +1323,6 @@ static void chunk_put_locked(struct read_chunk *chunk)
pthread_mutex_unlock(&sshfs.lock);
}
@@ -117,7 +117,7 @@ index a20f727..5adb290 100644
static int process_one_request(void)
{
int res;
-@@ -1307,8 +1334,7 @@ static int process_one_request(void)
+@@ -1312,8 +1339,7 @@ static int process_one_request(void)
return -1;
pthread_mutex_lock(&sshfs.lock);
@@ -127,7 +127,7 @@ index a20f727..5adb290 100644
if (req == NULL)
fprintf(stderr, "request %i not found\n", id);
else {
-@@ -1320,7 +1346,7 @@ static int process_one_request(void)
+@@ -1325,7 +1351,7 @@ static int process_one_request(void)
sshfs.outstanding_len <= sshfs.max_outstanding_len) {
pthread_cond_broadcast(&sshfs.outstanding_cond);
}
@@ -136,7 +136,7 @@ index a20f727..5adb290 100644
}
pthread_mutex_unlock(&sshfs.lock);
if (req != NULL) {
-@@ -1381,6 +1407,9 @@ static void close_conn(void)
+@@ -1386,6 +1412,9 @@ static void close_conn(void)
static void *process_requests(void *data_)
{
@@ -146,7 +146,7 @@ index a20f727..5adb290 100644
(void) data_;
while (1) {
-@@ -1391,7 +1420,20 @@ static void *process_requests(void *data_)
+@@ -1396,7 +1425,20 @@ static void *process_requests(void *data_)
pthread_mutex_lock(&sshfs.lock);
sshfs.processing_thread_started = 0;
close_conn();
@@ -168,7 +168,7 @@ index a20f727..5adb290 100644
sshfs.connver ++;
sshfs.outstanding_len = 0;
pthread_cond_broadcast(&sshfs.outstanding_cond);
-@@ -1539,7 +1581,6 @@ static int sftp_error_to_errno(uint32_t error)
+@@ -1544,7 +1586,6 @@ static int sftp_error_to_errno(uint32_t error)
static void sftp_detect_uid()
{
int flags;
@@ -176,7 +176,7 @@ index a20f727..5adb290 100644
uint32_t replid;
uint8_t type;
struct buffer buf;
-@@ -1549,7 +1590,7 @@ static void sftp_detect_uid()
+@@ -1554,7 +1595,7 @@ static void sftp_detect_uid()
buf_init(&buf, 5);
buf_add_string(&buf, ".");
buf_to_iov(&buf, &iov[0]);
@@ -185,7 +185,7 @@ index a20f727..5adb290 100644
goto out;
buf_clear(&buf);
if (sftp_read(&type, &buf) == -1)
-@@ -1560,7 +1601,7 @@ static void sftp_detect_uid()
+@@ -1565,7 +1606,7 @@ static void sftp_detect_uid()
}
if (buf_get_uint32(&buf, &replid) == -1)
goto out;
@@ -194,7 +194,7 @@ index a20f727..5adb290 100644
fprintf(stderr, "bad reply ID\n");
goto out;
}
-@@ -1597,7 +1638,6 @@ out:
+@@ -1602,7 +1643,6 @@ out:
static int sftp_check_root(const char *base_path)
{
int flags;
@@ -202,7 +202,7 @@ index a20f727..5adb290 100644
uint32_t replid;
uint8_t type;
struct buffer buf;
-@@ -1609,7 +1649,7 @@ static int sftp_check_root(const char *base_path)
+@@ -1614,7 +1654,7 @@ static int sftp_check_root(const char *base_path)
buf_init(&buf, 0);
buf_add_string(&buf, remote_dir);
buf_to_iov(&buf, &iov[0]);
@@ -211,7 +211,7 @@ index a20f727..5adb290 100644
goto out;
buf_clear(&buf);
if (sftp_read(&type, &buf) == -1)
-@@ -1620,7 +1660,7 @@ static int sftp_check_root(const char *base_path)
+@@ -1625,7 +1665,7 @@ static int sftp_check_root(const char *base_path)
}
if (buf_get_uint32(&buf, &replid) == -1)
goto out;
@@ -275,7 +275,7 @@ index a20f727..5adb290 100644
return 1;
else
return 0;
-@@ -3277,11 +3317,6 @@ static int processing_init(void)
+@@ -3285,11 +3325,6 @@ static int processing_init(void)
pthread_mutex_init(&sshfs.lock, NULL);
pthread_mutex_init(&sshfs.lock_write, NULL);
pthread_cond_init(&sshfs.outstanding_cond, NULL);
@@ -288,5 +288,5 @@ index a20f727..5adb290 100644
}
--
-2.13.2
+2.14.0
diff --git a/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch b/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch
index 9cc8fa37..ada8d835 100644
--- a/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch
+++ b/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch
@@ -1,4 +1,4 @@
-From 0999525da1aa7c5c32f64df50f741dc0861e12de Mon Sep 17 00:00:00 2001
+From decf2655c5c0a32d4efc5d33ceb9515ccbc87020 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:30:20 -0700
Subject: [PATCH] Use struct list_head instead of GList
@@ -8,7 +8,7 @@ Subject: [PATCH] Use struct list_head instead of GList
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/sshfs.c b/sshfs.c
-index 6c4272b..6958a2a 100644
+index 1c13b23..19ef6b2 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -2079,14 +2079,14 @@ static int sshfs_req_pending(struct request *req)
@@ -49,7 +49,7 @@ index 6c4272b..6958a2a 100644
outstanding--;
if (done) {
-@@ -2144,7 +2142,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
+@@ -2149,7 +2147,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset,
}
}
}
@@ -59,5 +59,5 @@ index 6c4272b..6958a2a 100644
return err;
}
--
-2.13.2
+2.14.0
diff --git a/pkg/sshfs/patch/0005-Use-standard-C-functions.patch b/pkg/sshfs/patch/0005-Use-standard-C-functions.patch
index fae6393d..4da0d718 100644
--- a/pkg/sshfs/patch/0005-Use-standard-C-functions.patch
+++ b/pkg/sshfs/patch/0005-Use-standard-C-functions.patch
@@ -1,4 +1,4 @@
-From 2ac64fcc424a0883ef988d46eea9add27ec9cc8a Mon Sep 17 00:00:00 2001
+From 3935747a1d4c3d22db567c9bc84d3abda85cc8a8 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 17:42:29 -0700
Subject: [PATCH] Use standard C functions
@@ -8,10 +8,10 @@ Subject: [PATCH] Use standard C functions
1 file changed, 54 insertions(+), 35 deletions(-)
diff --git a/sshfs.c b/sshfs.c
-index 6958a2a..2e7429b 100644
+index 19ef6b2..2882058 100644
--- a/sshfs.c
+++ b/sshfs.c
-@@ -647,25 +647,25 @@ static inline void buf_add_path(struct buffer *buf, const char *path)
+@@ -652,25 +652,25 @@ static inline void buf_add_path(struct buffer *buf, const char *path)
if (sshfs.base_path[0]) {
if (path[1]) {
if (sshfs.base_path[strlen(sshfs.base_path)-1] != '/') {
@@ -47,7 +47,7 @@ index 6958a2a..2e7429b 100644
}
static int buf_check_get(struct buffer *buf, size_t len)
-@@ -1250,7 +1250,7 @@ static void request_free(struct request *req)
+@@ -1255,7 +1255,7 @@ static void request_free(struct request *req)
{
buf_free(&req->reply);
sem_destroy(&req->ready);
@@ -56,7 +56,7 @@ index 6958a2a..2e7429b 100644
}
static int request_table_insert(struct request_table *reqtab, struct request *req)
-@@ -1298,9 +1298,9 @@ static void chunk_free(struct read_chunk *chunk)
+@@ -1303,9 +1303,9 @@ static void chunk_free(struct read_chunk *chunk)
rreq = list_entry(chunk->reqs.prev, struct read_req, list);
list_del(&rreq->list);
buf_free(&rreq->data);
@@ -80,7 +80,7 @@ index 6958a2a..2e7429b 100644
req->want_reply = want_reply;
req->end_func = end_func;
req->data = data;
-@@ -2552,7 +2554,9 @@ static int sshfs_open_common(const char *path, mode_t mode,
+@@ -2557,7 +2559,9 @@ static int sshfs_open_common(const char *path, mode_t mode,
if (fi->flags & O_TRUNC)
pflags |= SSH_FXF_TRUNC;
@@ -91,7 +91,7 @@ index 6958a2a..2e7429b 100644
list_init(&sf->write_reqs);
pthread_cond_init(&sf->write_finished, NULL);
/* Assume random read after open */
-@@ -2596,7 +2600,7 @@ static int sshfs_open_common(const char *path, mode_t mode,
+@@ -2601,7 +2605,7 @@ static int sshfs_open_common(const char *path, mode_t mode,
} else {
if (sshfs.dir_cache)
cache_invalidate(path);
@@ -100,7 +100,7 @@ index 6958a2a..2e7429b 100644
}
buf_free(&buf);
return err;
-@@ -2663,7 +2667,7 @@ static void sshfs_file_put(struct sshfs_file *sf)
+@@ -2668,7 +2672,7 @@ static void sshfs_file_put(struct sshfs_file *sf)
{
sf->refs--;
if (!sf->refs)
@@ -109,7 +109,7 @@ index 6958a2a..2e7429b 100644
}
static void sshfs_file_get(struct sshfs_file *sf)
-@@ -2733,9 +2737,11 @@ static void sshfs_read_begin(struct request *req)
+@@ -2738,9 +2742,11 @@ static void sshfs_read_begin(struct request *req)
static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size,
off_t offset)
{
@@ -122,7 +122,7 @@ index 6958a2a..2e7429b 100644
pthread_cond_init(&chunk->sio.finished, NULL);
list_init(&chunk->reqs);
chunk->size = size;
-@@ -2749,7 +2755,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size,
+@@ -2754,7 +2760,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size,
struct read_req *rreq;
size_t bsize = size < sshfs.max_read ? size : sshfs.max_read;
@@ -133,7 +133,7 @@ index 6958a2a..2e7429b 100644
rreq->sio = &chunk->sio;
rreq->size = bsize;
buf_init(&rreq->data, 0);
-@@ -2820,7 +2828,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size)
+@@ -2825,7 +2833,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size)
size -= rreq->res;
list_del(&rreq->list);
buf_free(&rreq->data);
@@ -142,7 +142,7 @@ index 6958a2a..2e7429b 100644
}
}
-@@ -3436,9 +3444,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
+@@ -3444,9 +3452,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
switch (key) {
case FUSE_OPT_KEY_OPT:
if (is_ssh_opt(arg)) {
@@ -155,7 +155,7 @@ index 6958a2a..2e7429b 100644
return 0;
}
/* Pass through */
-@@ -3463,9 +3472,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
+@@ -3471,9 +3480,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
case KEY_PORT:
@@ -168,7 +168,7 @@ index 6958a2a..2e7429b 100644
return 0;
case KEY_COMPRESS:
-@@ -3473,9 +3483,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
+@@ -3481,9 +3491,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
return 0;
case KEY_CONFIGFILE:
@@ -181,7 +181,7 @@ index 6958a2a..2e7429b 100644
return 0;
default:
-@@ -3631,17 +3642,19 @@ static char *find_base_path(void)
+@@ -3639,17 +3650,19 @@ static char *find_base_path(void)
static char *fsname_escape_commas(char *fsnameold)
{
@@ -203,7 +203,7 @@ index 6958a2a..2e7429b 100644
return fsname;
}
-@@ -3978,15 +3991,20 @@ int main(int argc, char *argv[])
+@@ -3987,15 +4000,20 @@ int main(int argc, char *argv[])
else
sshfs.max_outstanding_len = ~0;
@@ -228,7 +228,7 @@ index 6958a2a..2e7429b 100644
ssh_add_arg(sshfs.host);
if (sshfs.sftp_server)
sftp_server = sshfs.sftp_server;
-@@ -4013,10 +4031,11 @@ int main(int argc, char *argv[])
+@@ -4022,10 +4040,11 @@ int main(int argc, char *argv[])
sshfs.max_write = 65536;
fsname = fsname_escape_commas(fsname);
@@ -241,8 +241,8 @@ index 6958a2a..2e7429b 100644
+ free(tmp);
+ free(fsname);
-
- #if !defined(__CYGWIN__)
+ if(sshfs.dir_cache)
+ sshfs.op = cache_wrap(&sshfs_oper);
--
-2.13.2
+2.14.0
diff --git a/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch b/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch
index 9578d8d1..6170520c 100644
--- a/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch
+++ b/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch
@@ -1,4 +1,4 @@
-From 8cc018747c2ecc882484c3c58015453a6d267aeb Mon Sep 17 00:00:00 2001
+From 28e5307aac095886980afe80f8fa5730c0333f5d Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 5 Jun 2016 18:24:16 -0700
Subject: [PATCH] Disable uidmap and gidmap support
@@ -8,7 +8,7 @@ Subject: [PATCH] Disable uidmap and gidmap support
1 file changed, 16 insertions(+)
diff --git a/sshfs.c b/sshfs.c
-index 04f1892..e027265 100644
+index 567c3fa..ace6e8e 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -246,10 +246,12 @@ struct sshfs {
@@ -24,7 +24,7 @@ index 04f1892..e027265 100644
unsigned max_read;
unsigned max_write;
unsigned ssh_ver;
-@@ -382,7 +384,9 @@ enum {
+@@ -381,7 +383,9 @@ enum {
enum {
IDMAP_NONE,
IDMAP_USER,
@@ -34,7 +34,7 @@ index 04f1892..e027265 100644
};
enum {
-@@ -403,7 +407,9 @@ static struct fuse_opt sshfs_opts[] = {
+@@ -402,7 +406,9 @@ static struct fuse_opt sshfs_opts[] = {
SSHFS_OPT("workaround=%s", workarounds, 0),
SSHFS_OPT("idmap=none", idmap, IDMAP_NONE),
SSHFS_OPT("idmap=user", idmap, IDMAP_USER),
@@ -44,7 +44,7 @@ index 04f1892..e027265 100644
SSHFS_OPT("uidfile=%s", uid_file, 0),
SSHFS_OPT("gidfile=%s", gid_file, 0),
SSHFS_OPT("nomap=ignore", nomap, NOMAP_IGNORE),
-@@ -530,6 +536,7 @@ static int list_empty(const struct list_head *head)
+@@ -535,6 +541,7 @@ static int list_empty(const struct list_head *head)
return head->next == head;
}
@@ -52,7 +52,7 @@ index 04f1892..e027265 100644
/* given a pointer to the uid/gid, and the mapping table, remap the
* uid/gid, if necessary */
static inline int translate_id(uint32_t *id, GHashTable *map)
-@@ -547,6 +554,7 @@ static inline int translate_id(uint32_t *id, GHashTable *map)
+@@ -552,6 +559,7 @@ static inline int translate_id(uint32_t *id, GHashTable *map)
abort();
}
}
@@ -60,7 +60,7 @@ index 04f1892..e027265 100644
static inline void buf_init(struct buffer *buf, size_t size)
{
-@@ -794,12 +802,14 @@ static int buf_get_attrs(struct buffer *buf, struct stat *stbuf, int *flagsp)
+@@ -799,12 +807,14 @@ static int buf_get_attrs(struct buffer *buf, struct stat *stbuf, int *flagsp)
if (sshfs.remote_uid_detected && uid == sshfs.remote_uid)
uid = sshfs.local_uid;
#endif /* __APPLE__ */
@@ -75,7 +75,7 @@ index 04f1892..e027265 100644
memset(stbuf, 0, sizeof(struct stat));
stbuf->st_mode = mode;
-@@ -2459,12 +2469,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid,
+@@ -2464,12 +2474,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid,
if (sshfs.remote_uid_detected && uid == sshfs.local_uid)
uid = sshfs.remote_uid;
#endif /* __APPLE__ */
@@ -90,7 +90,7 @@ index 04f1892..e027265 100644
buf_init(&buf, 0);
if (sf == NULL)
-@@ -3681,6 +3693,7 @@ static int ssh_connect(void)
+@@ -3689,6 +3701,7 @@ static int ssh_connect(void)
return 0;
}
@@ -98,7 +98,7 @@ index 04f1892..e027265 100644
/* number of ':' separated fields in a passwd/group file that we care
* about */
#define IDMAP_FIELDS 3
-@@ -3855,6 +3868,7 @@ static inline void load_gid_map(void)
+@@ -3863,6 +3876,7 @@ static inline void load_gid_map(void)
{
read_id_map(sshfs.gid_file, &groupname_to_gid, "gid", &sshfs.gid_map, &sshfs.r_gid_map);
}
@@ -106,15 +106,15 @@ index 04f1892..e027265 100644
#ifdef __APPLE__
int main(int argc, char *argv[], __unused char *envp[], char **exec_path)
-@@ -3947,6 +3961,7 @@ int main(int argc, char *argv[])
-
+@@ -3956,6 +3970,7 @@ int main(int argc, char *argv[])
+
if (sshfs.idmap == IDMAP_USER)
sshfs.detect_uid = 1;
+#if 0
else if (sshfs.idmap == IDMAP_FILE) {
sshfs.uid_map = NULL;
sshfs.gid_map = NULL;
-@@ -3961,6 +3976,7 @@ int main(int argc, char *argv[])
+@@ -3970,6 +3985,7 @@ int main(int argc, char *argv[])
if (sshfs.gid_file)
load_gid_map();
}
@@ -123,5 +123,5 @@ index 04f1892..e027265 100644
free(sshfs.gid_file);
--
-2.13.2
+2.14.0
diff --git a/pkg/sshfs/rev b/pkg/sshfs/rev
index 00750edc..b8626c4c 100644
--- a/pkg/sshfs/rev
+++ b/pkg/sshfs/rev
@@ -1 +1 @@
-3
+4
diff --git a/pkg/sshfs/src b/pkg/sshfs/src
-Subproject ff6194b5c76e4b0a9d522e5d93efbfab0b23d2d
+Subproject fc63c646020a185b1665153a95cf8a2b04255ad