diff -Nru sshfs-fuse-2.4/debian/changelog sshfs-fuse-2.4/debian/changelog --- sshfs-fuse-2.4/debian/changelog 2012-04-28 02:18:29.000000000 +0000 +++ sshfs-fuse-2.4/debian/changelog 2012-09-14 18:23:00.000000000 +0000 @@ -1,3 +1,9 @@ +sshfs-fuse (2.4-1ubuntu1) quantal; urgency=low + + * Return the correct X_OK access for sshfs mounts (LP: #1017870). + + -- Alkis Georgopoulos Fri, 14 Sep 2012 14:22:37 -0400 + sshfs-fuse (2.4-1) unstable; urgency=low * New upstream version. diff -Nru sshfs-fuse-2.4/debian/control sshfs-fuse-2.4/debian/control --- sshfs-fuse-2.4/debian/control 2012-04-28 02:00:25.000000000 +0000 +++ sshfs-fuse-2.4/debian/control 2012-09-14 18:21:42.000000000 +0000 @@ -1,7 +1,8 @@ Source: sshfs-fuse Section: utils Priority: optional -Maintainer: Bartosz Fenski +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Bartosz Fenski Uploaders: Dmitry Smirnov Build-Depends: debhelper (>= 9), autoconf, automake, libglib2.0-dev, libfuse-dev, pkg-config Standards-Version: 3.9.3 diff -Nru sshfs-fuse-2.4/debian/patches/lp1017870.patch sshfs-fuse-2.4/debian/patches/lp1017870.patch --- sshfs-fuse-2.4/debian/patches/lp1017870.patch 1970-01-01 00:00:00.000000000 +0000 +++ sshfs-fuse-2.4/debian/patches/lp1017870.patch 2012-09-14 18:18:51.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.4-1ubuntu1) quantal; 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.4.orig/sshfs.c ++++ sshfs-fuse-2.4/sshfs.c +@@ -247,6 +247,7 @@ struct sshfs { + int ext_statvfs; + int ext_hardlink; + mode_t mnt_mode; ++ struct fuse_operations *op; + + /* statistics */ + uint64_t bytes_sent; +@@ -1915,6 +1916,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; +@@ -3115,6 +3132,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, +@@ -3215,10 +3233,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 + } + +@@ -3856,7 +3875,8 @@ int main(int argc, char *argv[]) + if (res == -1) + perror("WARNING: failed to set FD_CLOEXEC 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.4.orig/cache.c ++++ sshfs-fuse-2.4/cache.c +@@ -490,6 +490,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.4/debian/patches/series sshfs-fuse-2.4/debian/patches/series --- sshfs-fuse-2.4/debian/patches/series 2012-04-28 01:19:42.000000000 +0000 +++ sshfs-fuse-2.4/debian/patches/series 2012-09-14 18:16:35.000000000 +0000 @@ -1,2 +1,3 @@ sshfs.1 lintianisation.patch +lp1017870.patch