Jan Engelhardt 2012-07-04 00:14:33 +00:00 committed by Git OBS Bridge
parent 507972094f
commit 52801a9c6a
8 changed files with 12 additions and 214 deletions

View File

@ -1,59 +0,0 @@
parent b7b0facdedceb051241cd4ae9154f7e640e30fa1 ()
commit fbe46eac3e5638034f73bba5f55475170843b172
Author: Jan Engelhardt <jengelh@inai.de>
Date: Tue Jun 26 13:54:05 2012 +0200
build: do not change CFLAGS
CFLAGS must not be touched: it is a user variable. Your previous way
of doing it meant that `export CFLAGS="-O1"; ./configure;` never had
any effect.
---
configure.ac | 9 ++++++---
src/Makefile.am | 3 ++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 94e2d8b..b618654 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,9 +17,9 @@ AC_ARG_WITH([core-foundation],
if test x"$enable_debug" == "xyes" ; then
- CFLAGS="${CFLAGS} -g -O0"
+ my_CFLAGS="-g -O0"
else
- CFLAGS="${CFLAGS} -O2"
+ my_CFLAGS="-O2"
fi
if test x"$enable_debug_output" == "xyes" ; then
@@ -31,7 +31,10 @@ if test x"$with_core_foundation" == "xyes" ; then
LDFLAGS="${LDFLAGS} -framework CoreFoundation"
fi
-CFLAGS="${CFLAGS} -Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=25"
+my_CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=25"
+my_CFLAGS="$my_CFLAGS -Wall"
+AC_SUBST([my_CPPFLAGS])
+AC_SUBST([my_CFLAGS])
# Check for xattrs
AC_CHECK_FUNCS([setxattr getxattr listxattr removexattr])
diff --git a/src/Makefile.am b/src/Makefile.am
index 1d5491c..29661a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,8 @@ bin_PROGRAMS = bindfs
noinst_HEADERS = debug.h permchain.h userinfo.h misc.h usermap.h
bindfs_SOURCES = bindfs.c permchain.c userinfo.c misc.c usermap.c
-AM_CFLAGS = $(fuse_CFLAGS)
+AM_CPPFLAGS = ${my_CPPFLAGS}
+AM_CFLAGS = ${my_CFLAGS} $(fuse_CFLAGS)
bindfs_LDADD = $(fuse_LIBS)
man_MANS = bindfs.1
--
# Created with git-export-patch

View File

@ -1,57 +0,0 @@
parent fbe46eac3e5638034f73bba5f55475170843b172 ()
commit 673f8a422ccda9b87bbb7a930956e76afeef8948
Author: Jan Engelhardt <jengelh@inai.de>
Date: Tue Jun 26 13:55:36 2012 +0200
build: better placement of variables
automake options are best set in configure.ac, so they apply
not just to the directory, but the whole project.
Also move fuse_CFLAGS into AM_CPPFLAGS, because it actually
consists of preprocessor directives. (pkgconfig misnamed CFLAGS.)
---
Makefile.am | 4 ----
configure.ac | 2 +-
src/Makefile.am | 4 ++--
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 623153e..527ba9d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,2 @@
-# not a GNU package. You can remove this line, if
-# have all needed files, that a GNU package needs
-AUTOMAKE_OPTIONS = foreign
-
SUBDIRS = src tests
diff --git a/configure.ac b/configure.ac
index b618654..14c5236 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_INIT([bindfs],[1.10.4],[martin.partel@gmail.com])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
diff --git a/src/Makefile.am b/src/Makefile.am
index 29661a7..412045c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,8 +5,8 @@ bin_PROGRAMS = bindfs
noinst_HEADERS = debug.h permchain.h userinfo.h misc.h usermap.h
bindfs_SOURCES = bindfs.c permchain.c userinfo.c misc.c usermap.c
-AM_CPPFLAGS = ${my_CPPFLAGS}
-AM_CFLAGS = ${my_CFLAGS} $(fuse_CFLAGS)
+AM_CPPFLAGS = ${my_CPPFLAGS} ${fuse_CFLAGS}
+AM_CFLAGS = ${my_CFLAGS}
bindfs_LDADD = $(fuse_LIBS)
man_MANS = bindfs.1
--
# Created with git-export-patch

View File

@ -1,34 +0,0 @@
parent 673f8a422ccda9b87bbb7a930956e76afeef8948 ()
commit 77ac30454957e478eb7939b3bc7a181eaa254c58
Author: Jan Engelhardt <jengelh@inai.de>
Date: Tue Jun 26 14:29:48 2012 +0200
bindfs: reduce memory holes in struct permchain
Reduce holes in struct permchain by appropriately sizing and
reordering members.
---
src/permchain.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/permchain.c b/src/permchain.c
index 6e99e7b..fe2dd48 100644
--- a/src/permchain.c
+++ b/src/permchain.c
@@ -31,12 +31,12 @@
struct permchain {
mode_t mask; /* which permissions to apply to */
- char op; /* one of '=', '+', '-', 'o' (octal) or '\0' */
union {
- char operands[16]; /* a subset of rwxXstugo */
+ char operands[11]; /* a subset of rwxXDstugo */
unsigned int octal;
};
int flags;
+ char op; /* one of '=', '+', '-', 'o' (octal) or '\0' */
struct permchain *next;
};
--
# Created with git-export-patch

View File

@ -1,44 +0,0 @@
parent cb9540a5b8dcc6640e39fe9cc948d385bfa82664 ()
commit 6feab338aed1ad390ba4b0042f0490c7e317c7e3
Author: Jan Engelhardt <jengelh@inai.de>
Date: Tue Jul 3 03:28:50 2012 +0200
bindfs: avoid crash due to too-short allocation
pathconf() can return negative values to indicate an error. Using the
result of pathconf naïvely in arithmetic is therefore inappropriate.
---
src/bindfs.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/bindfs.c b/src/bindfs.c
index ded13be..48b732c 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -54,6 +54,7 @@
#include <assert.h>
#include <pwd.h>
#include <grp.h>
+#include <limits.h>
#ifdef HAVE_SETXATTR
#include <sys/xattr.h>
#endif
@@ -399,9 +400,13 @@ static int bindfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
struct dirent *de;
struct stat st;
int result = 0;
-
- de_buf = malloc(offsetof(struct dirent, d_name) + pathconf(path, _PC_NAME_MAX) + 1);
-
+ long pc_ret;
+
+ pc_ret = pathconf(path, _PC_NAME_MAX);
+ if (pc_ret < 0)
+ pc_ret = NAME_MAX; /* or scream and abort()? */
+ de_buf = malloc(offsetof(struct dirent, d_name) + pc_ret + 1);
+
seekdir(dp, offset);
while (1) {
result = readdir_r(dp, de_buf, &de);
--
# Created with git-export-patch

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed2dc411c821cc1d52ddc83747e61929d39f2505c81529677fde210eafa5370b
size 259375

3
bindfs-1.10.6.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:578f015e4cb176c4032596b86c6e591e9c794ffacf9fcfec51db5cf44ea4b201
size 278737

View File

@ -1,11 +1,13 @@
-------------------------------------------------------------------
Mon Jul 2 23:30:30 UTC 2012 - jengelh@inai.de
Wed Jul 4 00:10:22 UTC 2012 - jengelh@inai.de
- Update to new upstream version 1.10.4
* A memory bug from 1.10.1, and --create-as-user and thread
safety regressions were resolved.
- Add patches for honoring CFLAGS, and to fix a short-allocation
induced crash in bindfs_readdir.
- Update to new upstream version 1.10.6
* a memory bug from 1.10.1, and --create-as-user and thread
safety regressions were resolved
* honor CFLAGS in ./configure call
* fix a short-allocation that led to a crash in bindfs_readdir
* implement a lookup cache to speed up repeated lookups
(helpful for networked user databases, e.g. on LDAP)
-------------------------------------------------------------------
Sat May 5 13:30:19 UTC 2012 - jengelh@medozas.de

View File

@ -17,7 +17,7 @@
Name: bindfs
Version: 1.10.4
Version: 1.10.6
Release: 0
Summary: Mount Directories to other Locations and alter Permission Bits
License: GPL-2.0+
@ -26,16 +26,8 @@ Group: System/Filesystems
#Git-Clone: git://github.com/mpartel/bindfs
#DL-URL: http://bindfs.googlecode.com/files/bindfs-1.10.4.tar.gz
Source: %name-%version.tar.bz2
# 1,2,3,6 sent upstream #2012-07-02
Patch1: bindfs-01-cflags.diff
Patch2: bindfs-02-automake.diff
Patch3: bindfs-03-permchain1.diff
Patch6: bindfs-06-fix-short-alloc.diff
Url: http://code.google.com/p/bindfs/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version}
BuildRequires: pkgconfig(fuse) >= 2.5.3
@ -52,10 +44,8 @@ using various rules.
%prep
%setup -q
%patch -P 1 -P 2 -P 3 -P 6 -p1
%build
autoreconf -fi;
export CFLAGS="%optflags -O0 -ggdb3 -pg --test-coverage"
export LDFLAGS="-pg --test-coverage"
%configure