Hello community,

here is the log from the commit of package sshfs for openSUSE:Factory checked 
in at 2019-04-18 09:56:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sshfs (Old)
 and      /work/SRC/openSUSE:Factory/.sshfs.new.17052 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sshfs"

Thu Apr 18 09:56:41 2019 rev:32 rq:695102 version:3.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/sshfs/sshfs.changes      2019-03-20 
13:19:20.185343189 +0100
+++ /work/SRC/openSUSE:Factory/.sshfs.new.17052/sshfs.changes   2019-04-18 
09:56:43.825352837 +0200
@@ -1,0 +2,8 @@
+Wed Apr 17 07:52:42 UTC 2019 - Paolo Stivanin <[email protected]>
+
+- Update to 3.5.2
+  * Fixed "-o idmap=user" to map both UID and GID on all OSs.
+  * Fixed improper handling of sequential spaces spaces in
+    "ssh_command" option
+
+-------------------------------------------------------------------

Old:
----
  sshfs-3.5.1.tar.xz
  sshfs-3.5.1.tar.xz.asc

New:
----
  sshfs-3.5.2.tar.xz
  sshfs-3.5.2.tar.xz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sshfs.spec ++++++
--- /var/tmp/diff_new_pack.2cRPAk/_old  2019-04-18 09:56:44.593353321 +0200
+++ /var/tmp/diff_new_pack.2cRPAk/_new  2019-04-18 09:56:44.597353323 +0200
@@ -12,12 +12,12 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via https://bugs.opensuse.org/
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
 Name:           sshfs
-Version:        3.5.1
+Version:        3.5.2
 Release:        0
 Summary:        Filesystem client based on SSH file transfer protocol
 License:        GPL-2.0-or-later

++++++ sshfs-3.5.1.tar.xz -> sshfs-3.5.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshfs-3.5.1/AUTHORS new/sshfs-3.5.2/AUTHORS
--- old/sshfs-3.5.1/AUTHORS     2018-12-22 15:33:52.000000000 +0100
+++ new/sshfs-3.5.2/AUTHORS     2019-04-13 10:25:45.000000000 +0200
@@ -13,7 +13,6 @@
 Contributors (autogenerated list)
 ---------------------------------
 
-
 Alan Jenkins <[email protected]>
 Alexander Neumann <[email protected]>
 Anatol Pomozov <[email protected]>
@@ -22,7 +21,9 @@
 Bill Zissimopoulos <[email protected]>
 Brandon Carter <[email protected]>
 Chris Wolfe <[email protected]>
+Clayton G. Hobbs <[email protected]>
 Daniel Lublin <[email protected]>
+DrDaveD <[email protected]>
 gala <[email protected]>
 George Vlahavas <[email protected]>
 G.raud Meyer <[email protected]>
@@ -34,6 +35,7 @@
 Mike Kelly <[email protected]>
 Miklos Szeredi <[email protected]>
 Miklos Szeredi <[email protected]>
+mssalvatore <[email protected]>
 Nikolaus Rath <[email protected]>
 Percy Jahn <[email protected]>
 Qais Patankar <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshfs-3.5.1/ChangeLog.rst 
new/sshfs-3.5.2/ChangeLog.rst
--- old/sshfs-3.5.1/ChangeLog.rst       2018-12-22 15:33:52.000000000 +0100
+++ new/sshfs-3.5.2/ChangeLog.rst       2019-04-13 10:25:45.000000000 +0200
@@ -1,3 +1,9 @@
+Release 3.5.2 (2019-04-13)
+--------------------------
+
+* Fixed "-o idmap=user" to map both UID and GID on all OSs.
+* Fixed improper handling of sequential spaces spaces in "ssh_command" option
+
 Release 3.5.1 (2018-12-22)
 --------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshfs-3.5.1/meson.build new/sshfs-3.5.2/meson.build
--- old/sshfs-3.5.1/meson.build 2018-12-22 15:33:52.000000000 +0100
+++ new/sshfs-3.5.2/meson.build 2019-04-13 10:25:45.000000000 +0200
@@ -1,5 +1,5 @@
-project('sshfs', 'c', version: '3.5.1',
-        meson_version: '>= 0.38',
+project('sshfs', 'c', version: '3.5.2',
+        meson_version: '>= 0.40',
         default_options: [ 'buildtype=debugoptimized' ])
 
 add_global_arguments('-D_REENTRANT', '-DHAVE_CONFIG_H',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshfs-3.5.1/sshfs.c new/sshfs-3.5.2/sshfs.c
--- old/sshfs-3.5.1/sshfs.c     2018-12-22 15:33:52.000000000 +0100
+++ new/sshfs-3.5.2/sshfs.c     2019-04-13 10:25:45.000000000 +0200
@@ -264,10 +264,8 @@
        int server_version;
        unsigned remote_uid;
        unsigned local_uid;
-#ifdef __APPLE__
        unsigned remote_gid;
        unsigned local_gid;
-#endif
        int remote_uid_detected;
        unsigned blksize;
        char *progname;
@@ -789,17 +787,12 @@
                }
        }
 
-#ifdef __APPLE__
        if (sshfs.remote_uid_detected) {
                if (uid == sshfs.remote_uid)
                        uid = sshfs.local_uid;
                if (gid == sshfs.remote_gid)
                        gid = sshfs.local_gid;
        }
-#else /* !__APPLE__ */
-       if (sshfs.remote_uid_detected && uid == sshfs.remote_uid)
-               uid = sshfs.local_uid;
-#endif /* __APPLE__ */
        if (sshfs.idmap == IDMAP_FILE && sshfs.uid_map)
                if (translate_id(&uid, sshfs.uid_map) == -1)
                        return -EPERM;
@@ -1296,9 +1289,10 @@
        pthread_mutex_unlock(&sshfs.lock);
 }
 
-static int clean_req(void *key_, struct request *req)
+static int clean_req(void *key_, struct request *req, gpointer user_data_)
 {
        (void) key_;
+       (void) user_data_;
 
        req->error = -EIO;
        if (req->want_reply)
@@ -1600,10 +1594,8 @@
 
        sshfs.remote_uid = stbuf.st_uid;
        sshfs.local_uid = getuid();
-#ifdef __APPLE__
        sshfs.remote_gid = stbuf.st_gid;
        sshfs.local_gid = getgid();
-#endif
        sshfs.remote_uid_detected = 1;
        DEBUG("remote_uid = %i\n", sshfs.remote_uid);
 
@@ -2424,17 +2416,12 @@
                        return -EIO;
        }
        
-#ifdef __APPLE__
        if (sshfs.remote_uid_detected) {
                if (uid == sshfs.local_uid)
                        uid = sshfs.remote_uid;
                if (gid == sshfs.local_gid)
                        gid = sshfs.remote_gid;
        }
-#else /* !__APPLE__ */
-       if (sshfs.remote_uid_detected && uid == sshfs.local_uid)
-               uid = sshfs.remote_uid;
-#endif /* __APPLE__ */
        if (sshfs.idmap == IDMAP_FILE && sshfs.r_uid_map)
                if(translate_id(&uid, sshfs.r_uid_map) == -1)
                        return -EPERM;
@@ -3484,7 +3471,19 @@
                                }
                        }
 #else
-                       sshfs.mountpoint = realpath(arg, NULL);
+                        int fd, len;
+                        if (sscanf(arg, "/dev/fd/%u%n", &fd, &len) == 1 &&
+                            len == strlen(arg)) {
+                                /*
+                                 * Allow /dev/fd/N unchanged; it can be
+                                 * use for pre-mounting a generic fuse
+                                 * mountpoint to later be completely
+                                 * unprivileged with libfuse >= 3.3.0.
+                                 */
+                                sshfs.mountpoint = arg;
+                        } else {
+                                sshfs.mountpoint = realpath(arg, NULL);
+                        }
 #endif
                        if (!sshfs.mountpoint) {
                                fprintf(stderr, "sshfs: bad mount point `%s': 
%s\n",
@@ -3597,40 +3596,60 @@
        return 0;
 }
 
-static void set_ssh_command(void)
+// Behaves similarly to strtok(), but allows for the ' ' delimiter to be 
escaped
+// by '\ '.
+static char *tokenize_on_space(char *str)
 {
-       char *s;
-       char *d;
-       int i = 0;
-       int end = 0;
+       static char *pos = NULL;
+       char *start = NULL;
 
-       d = sshfs.ssh_command;
-       s = sshfs.ssh_command;
-       while (!end) {
-               switch (*s) {
-               case '\0':
-                       end = 1;
-               case ' ':
-                       *d = '\0';
-                       if (i == 0) {
-                               replace_arg(&sshfs.ssh_args.argv[0],
-                                           sshfs.ssh_command);
-                       } else {
-                               if (fuse_opt_insert_arg(&sshfs.ssh_args, i,
-                                               sshfs.ssh_command) == -1)
-                                       _exit(1);
-                       }
-                       i++;
-                       d = sshfs.ssh_command;
+       if (str)
+               pos = str;
+
+       if (!pos)
+               return NULL;
+
+       // trim any leading spaces
+       while (*pos == ' ')
+               pos++;
+
+       start = pos;
+
+       while (pos && *pos != '\0') {
+               // break on space, but not on '\ '
+               if (*pos == ' ' && *(pos - 1) != '\\') {
                        break;
+               }
+               pos++;
+       }
 
-               case '\\':
-                       if (s[1])
-                               s++;
-               default:
-                       *d++ = *s;
+       if (*pos == '\0') {
+               pos = NULL;
+       }
+       else {
+               *pos = '\0';
+               pos++;
+       }
+
+       return start;
+}
+
+static void set_ssh_command(void)
+{
+       char *token = NULL;
+       int i = 0;
+
+       token = tokenize_on_space(sshfs.ssh_command);
+       while (token != NULL) {
+               if (i == 0) {
+                       replace_arg(&sshfs.ssh_args.argv[0], token);
+               } else {
+                       if (fuse_opt_insert_arg(&sshfs.ssh_args, i, token) == 
-1)
+                               _exit(1);
                }
-               s++;
+               i++;
+
+               token = tokenize_on_space(NULL);
        }
 }
 



Reply via email to