diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2007-12-14 19:12:36 +0000 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2007-12-14 19:12:36 +0000 |
commit | 43b8f6d0e29a806af52c3d52f9306512d7dbfe5e (patch) | |
tree | d2f61d9a2db39b1f6700caa70aeed78f11467c9c /sys-fs/ecryptfs-utils | |
parent | Stable on ppc wrt bug 202168 (diff) | |
download | gentoo-2-43b8f6d0e29a806af52c3d52f9306512d7dbfe5e.tar.gz gentoo-2-43b8f6d0e29a806af52c3d52f9306512d7dbfe5e.tar.bz2 gentoo-2-43b8f6d0e29a806af52c3d52f9306512d7dbfe5e.zip |
Fix file creation mode running as suid
(Portage version: 2.1.4_rc10)
Diffstat (limited to 'sys-fs/ecryptfs-utils')
-rw-r--r-- | sys-fs/ecryptfs-utils/ChangeLog | 6 | ||||
-rw-r--r-- | sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild | 3 | ||||
-rw-r--r-- | sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-suid.patch | 24 |
3 files changed, 31 insertions, 2 deletions
diff --git a/sys-fs/ecryptfs-utils/ChangeLog b/sys-fs/ecryptfs-utils/ChangeLog index 2efc743a0d41..b8244f86e345 100644 --- a/sys-fs/ecryptfs-utils/ChangeLog +++ b/sys-fs/ecryptfs-utils/ChangeLog @@ -1,6 +1,10 @@ # 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.14 2007/12/14 18:14:21 alonbl Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ChangeLog,v 1.15 2007/12/14 19:12:36 alonbl Exp $ + + 14 Dec 2007; Alon Bar-Lev <alonbl@gentoo.org> + +files/ecryptfs-utils-33-suid.patch, ecryptfs-utils-33.ebuild: + Fix file creation mode running as suid *ecryptfs-utils-33 (14 Dec 2007) diff --git a/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild b/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild index dad91491d2c5..4a5275412ee5 100644 --- a/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild +++ b/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild @@ -1,6 +1,6 @@ # 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-33.ebuild,v 1.1 2007/12/14 18:14:21 alonbl Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/ecryptfs-utils/ecryptfs-utils-33.ebuild,v 1.2 2007/12/14 19:12:36 alonbl Exp $ inherit eutils @@ -32,6 +32,7 @@ src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${P}-mkdir.patch" + epatch "${FILESDIR}/${P}-suid.patch" } src_compile() { diff --git a/sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-suid.patch b/sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-suid.patch new file mode 100644 index 000000000000..979d5d04b240 --- /dev/null +++ b/sys-fs/ecryptfs-utils/files/ecryptfs-utils-33-suid.patch @@ -0,0 +1,24 @@ +diff --git a/src/libecryptfs/key_management.c b/src/libecryptfs/key_management.c +index acedc26..2c88357 100644 +--- a/src/libecryptfs/key_management.c ++++ b/src/libecryptfs/key_management.c +@@ -486,6 +486,7 @@ int ecryptfs_append_sig(char *auth_tok_sig, char *sig_cache_filename) + rc = -EIO; + goto out; + } ++ fchown(fd, getuid(), getgid()); + lseek(fd, 0, SEEK_END); + memcpy(tmp, auth_tok_sig, ECRYPTFS_SIG_SIZE_HEX); + tmp[ECRYPTFS_SIG_SIZE_HEX] = '\n'; +diff --git a/src/utils/mount.ecryptfs.c b/src/utils/mount.ecryptfs.c +index 4e14795..86d15ac 100644 +--- a/src/utils/mount.ecryptfs.c ++++ b/src/utils/mount.ecryptfs.c +@@ -310,6 +310,7 @@ static int process_sig(char *auth_tok_sig) + goto out; + } + mkdir(dot_ecryptfs_dir, S_IRWXU); ++ chown(dot_ecryptfs_dir, getuid(), getgid()); + free(dot_ecryptfs_dir); + rc = asprintf(&sig_cache_filename, "%s/.ecryptfs/sig-cache.txt", + home); |