diff options
| author | Michael Forney <mforney@mforney.org> | 2017-09-21 22:30:20 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-09-25 19:23:07 -0700 |
| commit | 28e4786f06f2468b0fc304daed245bf908f2ae0e (patch) | |
| tree | 57e240875817cc4ac0ee7ae389327ea706f66609 /pkg/sshfs/patch | |
| parent | b62a42b67fdb29b449b10601618dc53847c19024 (diff) | |
sshfs: Update to 3.3.0
Diffstat (limited to 'pkg/sshfs/patch')
5 files changed, 41 insertions, 41 deletions
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 7fbd71ce..1f3bd1ef 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 bc0f086e2d95b79c6061ea8894c57a5b5350bd4d Mon Sep 17 00:00:00 2001 +From 62e87ccce46212f06297e92b7dbe56427a80b864 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 a76ae8a..7078618 100644 +index 50ec384..ac0b889 100644 --- a/sshfs.c +++ b/sshfs.c @@ -171,6 +171,17 @@ struct request { @@ -29,7 +29,7 @@ index a76ae8a..7078618 100644 struct sshfs_io { int num_reqs; pthread_cond_t finished; -@@ -250,7 +261,7 @@ struct sshfs { +@@ -249,7 +260,7 @@ struct sshfs { int slave; char *host; char *base_path; @@ -220,7 +220,7 @@ index a76ae8a..7078618 100644 fprintf(stderr, "bad reply ID\n"); goto out; } -@@ -1821,7 +1861,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1817,7 +1857,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, struct request **reqp) { int err; @@ -228,7 +228,7 @@ index a76ae8a..7078618 100644 struct request *req = g_new0(struct request, 1); req->want_reply = want_reply; -@@ -1832,8 +1871,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1828,8 +1867,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, pthread_mutex_lock(&sshfs.lock); if (begin_func) begin_func(req); @@ -237,7 +237,7 @@ index a76ae8a..7078618 100644 err = start_processing_thread(); if (err) { pthread_mutex_unlock(&sshfs.lock); -@@ -1844,21 +1881,24 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1840,21 +1877,24 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, while (sshfs.outstanding_len > sshfs.max_outstanding_len) pthread_cond_wait(&sshfs.outstanding_cond, &sshfs.lock); @@ -266,7 +266,7 @@ index a76ae8a..7078618 100644 pthread_mutex_unlock(&sshfs.lock); if (!rmed && !want_reply) { -@@ -2031,7 +2071,7 @@ static int sftp_readdir_send(struct request **req, struct buffer *handle) +@@ -2027,7 +2067,7 @@ static int sftp_readdir_send(struct request **req, struct buffer *handle) static int sshfs_req_pending(struct request *req) { @@ -275,7 +275,7 @@ index a76ae8a..7078618 100644 return 1; else return 0; -@@ -3308,11 +3348,6 @@ static int processing_init(void) +@@ -3286,11 +3326,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); diff --git a/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch b/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch index 4d773a3a..fdb8e7ec 100644 --- a/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch +++ b/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch @@ -1,4 +1,4 @@ -From 57729cac91c4ccccec2a98c7589bdacc6220f232 Mon Sep 17 00:00:00 2001 +From 7005f705fb992abcd511465339b819ca93ec6f84 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 17:28:40 -0700 Subject: [PATCH] Use bool instead of gboolean @@ -8,7 +8,7 @@ Subject: [PATCH] Use bool instead of gboolean 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshfs.c b/sshfs.c -index 7078618..9e86ec0 100644 +index ac0b889..30013ab 100644 --- a/sshfs.c +++ b/sshfs.c @@ -18,6 +18,7 @@ @@ -19,7 +19,7 @@ index 7078618..9e86ec0 100644 #include <stdio.h> #include <stdlib.h> #include <unistd.h> -@@ -1893,7 +1894,7 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1889,7 +1890,7 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, err = -EIO; if (sftp_send_iov(type, req->id, iov, count) == -1) { 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 4105d0b2..f8208223 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 c9574c7ceb8195007bd3dde81dc06438beaf4f69 Mon Sep 17 00:00:00 2001 +From 4fb86974c0713baf526ad9a7ea2cf8a7666d9045 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,10 +8,10 @@ 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 9e86ec0..4a01e4b 100644 +index 30013ab..9cb3965 100644 --- a/sshfs.c +++ b/sshfs.c -@@ -2081,14 +2081,14 @@ static int sshfs_req_pending(struct request *req) +@@ -2077,14 +2077,14 @@ static int sshfs_req_pending(struct request *req) static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, fuse_fill_dir_t filler) { @@ -29,7 +29,7 @@ index 9e86ec0..4a01e4b 100644 while (!done || outstanding) { struct request *req; struct buffer name; -@@ -2103,16 +2103,14 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, +@@ -2099,16 +2099,14 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, break; } @@ -49,7 +49,7 @@ index 9e86ec0..4a01e4b 100644 outstanding--; if (done) { -@@ -2151,7 +2149,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, +@@ -2147,7 +2145,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, } } } diff --git a/pkg/sshfs/patch/0005-Use-standard-C-functions.patch b/pkg/sshfs/patch/0005-Use-standard-C-functions.patch index 5695152c..cf8a4849 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 088c5b6b0fa85da8fdb8490f8a587631967488ad Mon Sep 17 00:00:00 2001 +From 85a40a85e9847621bd808833997517e35ee42e26 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,7 +8,7 @@ Subject: [PATCH] Use standard C functions 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/sshfs.c b/sshfs.c -index 4a01e4b..3f03640 100644 +index 9cb3965..2087f71 100644 --- a/sshfs.c +++ b/sshfs.c @@ -654,25 +654,25 @@ static inline void buf_add_path(struct buffer *buf, const char *path) @@ -68,7 +68,7 @@ index 4a01e4b..3f03640 100644 } static void chunk_put(struct read_chunk *chunk) -@@ -1862,8 +1862,10 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1858,8 +1858,10 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, struct request **reqp) { int err; @@ -80,7 +80,7 @@ index 4a01e4b..3f03640 100644 req->want_reply = want_reply; req->end_func = end_func; req->data = data; -@@ -2579,8 +2581,10 @@ static int sshfs_open_common(const char *path, mode_t mode, +@@ -2557,8 +2559,10 @@ static int sshfs_open_common(const char *path, mode_t mode, if (fi->flags & O_APPEND) pflags |= SSH_FXF_APPEND; @@ -93,7 +93,7 @@ index 4a01e4b..3f03640 100644 list_init(&sf->write_reqs); pthread_cond_init(&sf->write_finished, NULL); /* Assume random read after open */ -@@ -2624,7 +2628,7 @@ static int sshfs_open_common(const char *path, mode_t mode, +@@ -2602,7 +2606,7 @@ static int sshfs_open_common(const char *path, mode_t mode, } else { if (sshfs.dir_cache) cache_invalidate(path); @@ -102,7 +102,7 @@ index 4a01e4b..3f03640 100644 } buf_free(&buf); return err; -@@ -2691,7 +2695,7 @@ static void sshfs_file_put(struct sshfs_file *sf) +@@ -2669,7 +2673,7 @@ static void sshfs_file_put(struct sshfs_file *sf) { sf->refs--; if (!sf->refs) @@ -111,7 +111,7 @@ index 4a01e4b..3f03640 100644 } static void sshfs_file_get(struct sshfs_file *sf) -@@ -2761,9 +2765,11 @@ static void sshfs_read_begin(struct request *req) +@@ -2739,9 +2743,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) { @@ -124,7 +124,7 @@ index 4a01e4b..3f03640 100644 pthread_cond_init(&chunk->sio.finished, NULL); list_init(&chunk->reqs); chunk->size = size; -@@ -2777,7 +2783,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size, +@@ -2755,7 +2761,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; @@ -135,7 +135,7 @@ index 4a01e4b..3f03640 100644 rreq->sio = &chunk->sio; rreq->size = bsize; buf_init(&rreq->data, 0); -@@ -2848,7 +2856,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size) +@@ -2826,7 +2834,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); @@ -144,7 +144,7 @@ index 4a01e4b..3f03640 100644 } } -@@ -3468,9 +3476,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)) { @@ -157,7 +157,7 @@ index 4a01e4b..3f03640 100644 return 0; } /* Pass through */ -@@ -3495,9 +3504,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: @@ -170,7 +170,7 @@ index 4a01e4b..3f03640 100644 return 0; case KEY_COMPRESS: -@@ -3505,9 +3515,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: @@ -183,7 +183,7 @@ index 4a01e4b..3f03640 100644 return 0; default: -@@ -3663,17 +3674,19 @@ static char *find_base_path(void) +@@ -3639,17 +3650,19 @@ static char *find_base_path(void) static char *fsname_escape_commas(char *fsnameold) { @@ -205,7 +205,7 @@ index 4a01e4b..3f03640 100644 return fsname; } -@@ -4008,15 +4021,20 @@ int main(int argc, char *argv[]) +@@ -3982,15 +3995,20 @@ int main(int argc, char *argv[]) else sshfs.max_outstanding_len = ~0; @@ -230,7 +230,7 @@ index 4a01e4b..3f03640 100644 ssh_add_arg(sshfs.host); if (sshfs.sftp_server) sftp_server = sshfs.sftp_server; -@@ -4043,10 +4061,11 @@ int main(int argc, char *argv[]) +@@ -4017,10 +4035,11 @@ int main(int argc, char *argv[]) sshfs.max_write = 65536; fsname = fsname_escape_commas(fsname); 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 70faac0d..2cc8ad55 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 dd4e958a1aedb579c7ebbc4fae78849c3db42d9f Mon Sep 17 00:00:00 2001 +From 6769e1407bf4a239501a8c401e9c3e38de66d4a9 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,10 +8,10 @@ Subject: [PATCH] Disable uidmap and gidmap support 1 file changed, 16 insertions(+) diff --git a/sshfs.c b/sshfs.c -index 58cf1ff..b7effca 100644 +index 5ab4ca9..f09164a 100644 --- a/sshfs.c +++ b/sshfs.c -@@ -247,10 +247,12 @@ struct sshfs { +@@ -246,10 +246,12 @@ struct sshfs { char *mountpoint; char *uid_file; char *gid_file; @@ -24,7 +24,7 @@ index 58cf1ff..b7effca 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 58cf1ff..b7effca 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), @@ -75,7 +75,7 @@ index 58cf1ff..b7effca 100644 memset(stbuf, 0, sizeof(struct stat)); stbuf->st_mode = mode; -@@ -2466,12 +2476,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid, +@@ -2462,12 +2472,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 58cf1ff..b7effca 100644 buf_init(&buf, 0); if (sf == NULL) -@@ -3713,6 +3725,7 @@ static int ssh_connect(void) +@@ -3689,6 +3701,7 @@ static int ssh_connect(void) return 0; } @@ -98,7 +98,7 @@ index 58cf1ff..b7effca 100644 /* number of ':' separated fields in a passwd/group file that we care * about */ #define IDMAP_FIELDS 3 -@@ -3887,6 +3900,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,7 +106,7 @@ index 58cf1ff..b7effca 100644 #ifdef __APPLE__ int main(int argc, char *argv[], __unused char *envp[], char **exec_path) -@@ -3977,6 +3991,7 @@ int main(int argc, char *argv[]) +@@ -3951,6 +3965,7 @@ int main(int argc, char *argv[]) if (sshfs.idmap == IDMAP_USER) sshfs.detect_uid = 1; @@ -114,7 +114,7 @@ index 58cf1ff..b7effca 100644 else if (sshfs.idmap == IDMAP_FILE) { sshfs.uid_map = NULL; sshfs.gid_map = NULL; -@@ -3991,6 +4006,7 @@ int main(int argc, char *argv[]) +@@ -3965,6 +3980,7 @@ int main(int argc, char *argv[]) if (sshfs.gid_file) load_gid_map(); } |
