summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2007-12-14 18:14:22 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2007-12-14 18:14:22 +0000
commit889a38e235bc00933d4b59e5088e4d0bac7a85c8 (patch)
treea3dc2b8b6b3cf76bacb7a799a6a91ca504d8d21d /sys-fs/ecryptfs-utils
parentNow installs zero-install native feed (Bug 202275) (diff)
downloadgentoo-2-889a38e235bc00933d4b59e5088e4d0bac7a85c8.tar.gz
gentoo-2-889a38e235bc00933d4b59e5088e4d0bac7a85c8.tar.bz2
gentoo-2-889a38e235bc00933d4b59e5088e4d0bac7a85c8.zip
Version bump
(Portage version: 2.1.4_rc10)
Diffstat (limited to 'sys-fs/ecryptfs-utils')
-rw-r--r--sys-fs/ecryptfs-utils/ChangeLog9
-rw-r--r--sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild (renamed from sys-fs/ecryptfs-utils/ecryptfs-utils-32.ebuild)10
-rw-r--r--sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-323
-rw-r--r--sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-333
-rw-r--r--sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-mkdir.patch122
5 files changed, 141 insertions, 6 deletions
diff --git a/sys-fs/ecryptfs-utils/ChangeLog b/sys-fs/ecryptfs-utils/ChangeLog
index ac357bc90063..2efc743a0d41 100644
--- a/sys-fs/ecryptfs-utils/ChangeLog
+++ b/sys-fs/ecryptfs-utils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/ecryptfs-utils
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ChangeLog,v 1.13 2007/12/13 18:45:03 alonbl Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ChangeLog,v 1.14 2007/12/14 18:14:21 alonbl Exp $
+
+*ecryptfs-utils-33 (14 Dec 2007)
+
+ 14 Dec 2007; Alon Bar-Lev <alonbl@gentoo.org>
+ +files/ecryptfs-utils-33-mkdir.patch, -ecryptfs-utils-32.ebuild,
+ +ecryptfs-utils-33.ebuild:
+ Version bump
*ecryptfs-utils-32 (13 Dec 2007)
diff --git a/sys-fs/ecryptfs-utils/ecryptfs-utils-32.ebuild b/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild
index 0892a31458b8..dad91491d2c5 100644
--- a/sys-fs/ecryptfs-utils/ecryptfs-utils-32.ebuild
+++ b/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ecryptfs-utils-32.ebuild,v 1.1 2007/12/13 18:45:03 alonbl Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild,v 1.1 2007/12/14 18:14:21 alonbl Exp $
-inherit autotools
+inherit eutils
DESCRIPTION="eCryptfs userspace utilities"
HOMEPAGE="http://www.ecryptfs.org"
@@ -28,6 +28,12 @@ DEPEND="${RDEPEND}
dev-util/pkgconfig
dev-lang/perl"
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-mkdir.patch"
+}
+
src_compile() {
econf \
--docdir="/usr/share/doc/${PF}" \
diff --git a/sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-32 b/sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-32
deleted file mode 100644
index e62979f4d669..000000000000
--- a/sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-32
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 a8c8f4bc699fb19fcacaef15e64a0f92 ecryptfs-utils-32.tar.bz2 962484
-RMD160 53447dc84de69407e702af54ddcb45ec3c0f5f2a ecryptfs-utils-32.tar.bz2 962484
-SHA256 6b9d3e8c76df4406a2940479dd3acf43d15b6171dbf1b68126360f05511eea37 ecryptfs-utils-32.tar.bz2 962484
diff --git a/sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-33 b/sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-33
new file mode 100644
index 000000000000..1686e7c59168
--- /dev/null
+++ b/sys-fs/ecryptfs-utils/files/digest-ecryptfs-utils-33
@@ -0,0 +1,3 @@
+MD5 21fbaf2f4401715ffc29dd1696c2d46e ecryptfs-utils-33.tar.bz2 963259
+RMD160 6756752a5a4ce397a9f4f418b8a45d978d464a91 ecryptfs-utils-33.tar.bz2 963259
+SHA256 2e16fb9f25cac32e720aa18386ab041325f20b46283afa3f46b25f33713d046a ecryptfs-utils-33.tar.bz2 963259
diff --git a/sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-mkdir.patch b/sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-mkdir.patch
new file mode 100644
index 000000000000..12070ea46b1b
--- /dev/null
+++ b/sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-mkdir.patch
@@ -0,0 +1,122 @@
+diff --git a/src/key_mod/ecryptfs_key_mod_openssl.c b/src/key_mod/ecryptfs_key_mod_openssl.c
+index e0cc4ed..941e6c0 100644
+--- a/src/key_mod/ecryptfs_key_mod_openssl.c
++++ b/src/key_mod/ecryptfs_key_mod_openssl.c
+@@ -27,6 +27,7 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <libgen.h>
+ #include <openssl/pem.h>
+ #include <openssl/rsa.h>
+ #include <openssl/err.h>
+@@ -182,56 +183,58 @@ out:
+ }
+
+ static int
++ecryptfs_openssl_mkdir_recursive(char *dir, mode_t mode)
++{
++ char *temp = NULL;
++ char *parent = NULL;
++ int rc;
++
++ if (!strcmp(dir, ".") || !strcmp(dir, "/"))
++ return 0;
++
++ temp = strdup(dir);
++ if (temp == NULL) {
++ rc = -ENOMEM;
++ goto out;
++ }
++
++ parent = dirname(temp);
++
++ rc = ecryptfs_openssl_mkdir_recursive(parent, mode);
++ if (rc)
++ goto out;
++
++ if (mkdir(dir, mode) == -1) {
++ if (errno != EEXIST) {
++ rc = -errno;
++ goto out;
++ }
++ }
++
++ rc = 0;
++
++out:
++ free(temp);
++ return rc;
++}
++
++static int
+ ecryptfs_openssl_write_key_to_file(RSA *rsa, char *filename, char *passphrase)
+ {
+- uid_t id;
+- struct passwd *pw;
+- char *ecryptfs_dir = NULL;
+- char *pki_dir = NULL;
+- char *openssl_dir = NULL;
++ char *dir = NULL;
+ BIO *out;
+ const EVP_CIPHER *enc = EVP_aes_256_cbc();
+ int rc = 0;
+
+- id = getuid();
+- pw = getpwuid(id);
+- if (!pw) {
+- syslog(LOG_ERR, "%s: Unable to get the current directory from "
+- "the passwd file on this system\n", __FUNCTION__);
+- rc = -EIO;
+- goto out_free_paths;
+- }
+- rc = asprintf(&ecryptfs_dir, "%s/.ecryptfs", pw->pw_dir);
+- if (rc == -1) {
++ dir = strdup(filename);
++ if (dir == NULL) {
+ rc = -ENOMEM;
+ goto out_free_paths;
+ }
+- rc = asprintf(&pki_dir, "%s/.ecryptfs/pki", pw->pw_dir);
+- if (rc == -1) {
+- rc = -ENOMEM;
+- goto out_free_paths;
+- }
+- rc = asprintf(&openssl_dir, "%s/.ecryptfs/pki/openssl", pw->pw_dir);
+- if (rc == -1) {
+- rc = -ENOMEM;
+- goto out_free_paths;
+- }
+- rc = mkdir(ecryptfs_dir, 0700);
+- if (rc && rc != EEXIST) {
+- syslog(LOG_ERR, "%s: Error attempting to mkdir [%s]; "
+- "rc = [%d]\n", __FUNCTION__, ecryptfs_dir, rc);
+- goto out_free_paths;
+- }
+- rc = mkdir(pki_dir, 0700);
+- if (rc && rc != EEXIST) {
+- syslog(LOG_ERR, "%s: Error attempting to mkdir [%s]; "
+- "rc = [%d]\n", __FUNCTION__, pki_dir, rc);
+- goto out_free_paths;
+- }
+- rc = mkdir(openssl_dir, 0700);
+- if (rc && rc != EEXIST) {
++ rc = ecryptfs_openssl_mkdir_recursive(dirname(dir), 0700);
++ if (rc) {
+ syslog(LOG_ERR, "%s: Error attempting to mkdir [%s]; "
+- "rc = [%d]\n", __FUNCTION__, openssl_dir, rc);
++ "rc = [%d]\n", __FUNCTION__, dir, rc);
+ goto out_free_paths;
+ }
+ if ((out = BIO_new(BIO_s_file())) == NULL) {
+@@ -253,9 +256,7 @@ ecryptfs_openssl_write_key_to_file(RSA *rsa, char *filename, char *passphrase)
+ out_free_bio:
+ BIO_free_all(out);
+ out_free_paths:
+- free(ecryptfs_dir);
+- free(pki_dir);
+- free(openssl_dir);
++ free(dir);
+ return rc;
+ }
+