summaryrefslogtreecommitdiff
path: root/community/ecryptfs-utils
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-31 00:03:48 +0000
committerroot <root@rshg054.dnsready.net>2012-05-31 00:03:48 +0000
commitf1ae949e08a764ac063703dc9bb7f0afd7c16e96 (patch)
treeb542ace0cdaf945c5e495f31e3c87537017c614d /community/ecryptfs-utils
parentf676c2f568b9c75daa3e2b688978b877f950953d (diff)
Thu May 31 00:03:48 UTC 2012
Diffstat (limited to 'community/ecryptfs-utils')
-rw-r--r--community/ecryptfs-utils/PKGBUILD12
-rw-r--r--community/ecryptfs-utils/symlinked_mtab.patch25
2 files changed, 33 insertions, 4 deletions
diff --git a/community/ecryptfs-utils/PKGBUILD b/community/ecryptfs-utils/PKGBUILD
index 8cd135b78..f6fbf591c 100644
--- a/community/ecryptfs-utils/PKGBUILD
+++ b/community/ecryptfs-utils/PKGBUILD
@@ -1,24 +1,28 @@
-# $Id: PKGBUILD 70347 2012-05-04 23:54:39Z allan $
+# $Id: PKGBUILD 71565 2012-05-29 11:01:34Z tredaelli $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Richard Murri <admin@richardmurri.com>
# Contributor: Michal Krenek <mikos@sg1.cz>
pkgname=ecryptfs-utils
pkgver=96
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
pkgdesc="Enterprise-class stacked cryptographic filesystem for Linux"
url="https://launchpad.net/ecryptfs"
license=('GPL')
makedepends=('swig' 'intltool' 'gettext')
depends=('keyutils' 'nss' 'python2')
-source=("http://launchpad.net/ecryptfs/trunk/${pkgver}/+download/${pkgname}_${pkgver}.orig.tar.gz")
+source=("http://launchpad.net/ecryptfs/trunk/${pkgver}/+download/${pkgname}_${pkgver}.orig.tar.gz"
+ symlinked_mtab.patch)
options=(!libtool)
-md5sums=('4f92c9f6e8f62ac00ca7e2c4e480f1d7')
+md5sums=('4f92c9f6e8f62ac00ca7e2c4e480f1d7'
+ '7740ed69601cfc75bb96c9ad072dfdb4')
build() {
cd "$srcdir/${pkgname}-${pkgver}"
./configure --prefix=/usr --with-pamdir=/usr/lib/security PYTHON=python2
+ # Apply patch to detect if /etc/mtab is a symlink.
+ patch src/libecryptfs/main.c < "$srcdir/symlinked_mtab.patch"
make
}
diff --git a/community/ecryptfs-utils/symlinked_mtab.patch b/community/ecryptfs-utils/symlinked_mtab.patch
new file mode 100644
index 000000000..2ba0aa8bf
--- /dev/null
+++ b/community/ecryptfs-utils/symlinked_mtab.patch
@@ -0,0 +1,25 @@
+--- ecryptfs-utils/src/ecryptfs-utils-96/src/libecryptfs/main.c.orig
++++ ecryptfs-utils/src/ecryptfs-utils-96/src/libecryptfs/main.c
+@@ -387,6 +387,8 @@
+ char *fullpath_source = NULL;
+ char *fullpath_target = NULL;
+ int rc;
++ char dummy;
++ int useMtab;
+
+ mountent.mnt_opts = NULL;
+ if (!source) {
+@@ -425,6 +427,13 @@
+ syslog(LOG_ERR, "Failed to perform eCryptfs mount: [%m]\n");
+ goto out;
+ }
++ /* Check if mtab is a symlink */
++ useMtab = (readlink("/etc/mtab", &dummy, 1) < 0);
++ if (!useMtab) {
++ /* No need updating mtab */
++ rc = 0;
++ goto out;
++ }
+ mtab_fd = setmntent("/etc/mtab", "a");
+ if (!mtab_fd) {
+ rc = -EACCES;