diff -Nru sshfs-fuse-2.3/debian/changelog sshfs-fuse-2.3/debian/changelog --- sshfs-fuse-2.3/debian/changelog 2012-01-08 12:09:46.000000000 +0000 +++ sshfs-fuse-2.3/debian/changelog 2012-09-14 19:06:07.000000000 +0000 @@ -1,3 +1,9 @@ +sshfs-fuse (2.3-1ubuntu0.1) precise-proposed; urgency=low + + * Return the correct X_OK access for sshfs mounts (LP: #1017870). + + -- Alkis Georgopoulos Fri, 14 Sep 2012 21:21:36 +0300 + sshfs-fuse (2.3-1) unstable; urgency=low * New upstream version. (Closes: #636357) diff -Nru sshfs-fuse-2.3/debian/control sshfs-fuse-2.3/debian/control --- sshfs-fuse-2.3/debian/control 2012-01-08 11:55:26.000000000 +0000 +++ sshfs-fuse-2.3/debian/control 2012-09-14 19:05:23.000000000 +0000 @@ -1,7 +1,8 @@ Source: sshfs-fuse Section: utils Priority: optional -Maintainer: Bartosz Fenski +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Bartosz Fenski Build-Depends: debhelper (>= 8.0.0), autotools-dev, libglib2.0-dev, libfuse-dev, pkg-config Standards-Version: 3.9.2 Homepage: http://fuse.sourceforge.net/sshfs.html diff -Nru sshfs-fuse-2.3/debian/patches/lp1017870.patch sshfs-fuse-2.3/debian/patches/lp1017870.patch --- sshfs-fuse-2.3/debian/patches/lp1017870.patch 1970-01-01 00:00:00.000000000 +0000 +++ sshfs-fuse-2.3/debian/patches/lp1017870.patch 2012-09-14 19:16:46.000000000 +0000 @@ -0,0 +1,87 @@ +Description: Return the correct X_OK access for sshfs mounts + sshfs-fuse always returned 0 in access(file, X_OK) calls, causing nautilus + to prompt "Do you want to run "login.defs", or display its contents?" for + text files that were not executable. + . + sshfs-fuse (2.3-1ubuntu0.1) precise; urgency=low + . + * Return the correct X_OK access for sshfs mounts (LP: #1017870). +Author: Alkis Georgopoulos +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1017870 +Origin: upstream, http://sourceforge.net/mailarchive/message.php?msg_id=29804620 + +--- sshfs-fuse-2.3.orig/sshfs.c ++++ sshfs-fuse-2.3/sshfs.c +@@ -220,6 +220,7 @@ struct sshfs { + int ext_statvfs; + int ext_hardlink; + mode_t mnt_mode; ++ struct fuse_operations *op; + + /* statistics */ + uint64_t bytes_sent; +@@ -1807,6 +1808,22 @@ static int sshfs_getattr(const char *pat + return err; + } + ++static int sshfs_access(const char *path, int mask) ++{ ++ struct stat stbuf; ++ int err = 0; ++ ++ if (mask & X_OK) { ++ err = sshfs.op->getattr(path, &stbuf); ++ if (!err) { ++ if (S_ISREG(stbuf.st_mode) && ++ !(stbuf.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) ++ err = -EACCES; ++ } ++ } ++ return err; ++} ++ + static int count_components(const char *p) + { + int ctr; +@@ -2846,6 +2863,7 @@ static struct fuse_cache_operations sshf + .oper = { + .init = sshfs_init, + .getattr = sshfs_getattr, ++ .access = sshfs_access, + .readlink = sshfs_readlink, + .mknod = sshfs_mknod, + .mkdir = sshfs_mkdir, +@@ -2939,10 +2957,11 @@ static int is_ssh_opt(const char *arg) + + static int sshfs_fuse_main(struct fuse_args *args) + { ++ sshfs.op = cache_init(&sshfs_oper); + #if FUSE_VERSION >= 26 +- return fuse_main(args->argc, args->argv, cache_init(&sshfs_oper), NULL); ++ return fuse_main(args->argc, args->argv, sshfs.op, NULL); + #else +- return fuse_main(args->argc, args->argv, cache_init(&sshfs_oper)); ++ return fuse_main(args->argc, args->argv, sshfs.op); + #endif + } + +@@ -3372,7 +3391,8 @@ int main(int argc, char *argv[]) + if (res == -1) + perror("WARNING: failed to set FD_CLOESEC on fuse device"); + +- fuse = fuse_new(ch, &args, cache_init(&sshfs_oper), ++ sshfs.op = cache_init(&sshfs_oper); ++ fuse = fuse_new(ch, &args, sshfs.op, + sizeof(struct fuse_operations), NULL); + if (fuse == NULL) { + fuse_unmount(mountpoint, ch); +--- sshfs-fuse-2.3.orig/cache.c ++++ sshfs-fuse-2.3/cache.c +@@ -496,6 +496,7 @@ static void cache_unity_fill(struct fuse + cache_oper->init = oper->oper.init; + #endif + cache_oper->getattr = oper->oper.getattr; ++ cache_oper->access = oper->oper.access; + cache_oper->readlink = oper->oper.readlink; + cache_oper->getdir = cache_unity_getdir; + cache_oper->mknod = oper->oper.mknod; diff -Nru sshfs-fuse-2.3/debian/patches/series sshfs-fuse-2.3/debian/patches/series --- sshfs-fuse-2.3/debian/patches/series 2012-01-08 12:05:52.000000000 +0000 +++ sshfs-fuse-2.3/debian/patches/series 2012-09-14 19:05:23.000000000 +0000 @@ -1 +1,2 @@ sshfs.1 +lp1017870.patch