diff options
Diffstat (limited to 'sys-auth/pam_mktemp')
-rw-r--r-- | sys-auth/pam_mktemp/Manifest | 6 | ||||
-rw-r--r-- | sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch | 49 | ||||
-rw-r--r-- | sys-auth/pam_mktemp/metadata.xml | 14 | ||||
-rw-r--r-- | sys-auth/pam_mktemp/pam_mktemp-1.1.1.ebuild | 46 |
4 files changed, 115 insertions, 0 deletions
diff --git a/sys-auth/pam_mktemp/Manifest b/sys-auth/pam_mktemp/Manifest new file mode 100644 index 000000000000..3d443770be71 --- /dev/null +++ b/sys-auth/pam_mktemp/Manifest @@ -0,0 +1,6 @@ +AUX pam_mktemp-1.1.1-e2fsprogs-libs.patch 1613 SHA256 a271e66a96c758d752eb185dfc03d6367ca5dfaf8735b0bbb6dd178beeaafaac SHA512 8ba4836d9fcf4fd44f8f210c81c9bb3152051dff291b5e9b94f569b94bc1602990fd27defe80a3c971061a94a076aedb1289a06599d16749ebaacac923d4e488 WHIRLPOOL dc70da019d6767529ebe217cd80dd01bf61a60bdce28c6213a75d902e54273dba02351682bd238a1b2429409ebeaac6957c08ed7d0f9d6fd0424f69a4ba038d6 +DIST pam_mktemp-1.1.1.tar.gz 6754 SHA256 66cf80c18439ca3456db96402f2eeac14b1a0503cc1d1be7f2b16d5f079f3f3d SHA512 e2e42115a1fe70c128397d842dc69f96863d721dfa886ebc21b5e8249333adc671d74213ecf1222d65417cd4747eb6114f515271fd7eac4376a2b7e28925996d WHIRLPOOL 3d59873ffad85de82c385a3d5f6c221a2fac061463bc85c176e401ba2456995b21448ba9b6518a876763753a654d880c5a4e723e123c5a5e10ecdf005cd0c7e4 +EBUILD pam_mktemp-1.1.1.ebuild 1241 SHA256 1622042504c5a5fff8b056f7c1d4ded00fb89206509efabcf0811621dbc8f51a SHA512 de42baf1b53ded97a39a36cbd381a8a6a28fc14c0df7789aaa83802ef6cb1a92533e36d1ea02a5a06d1671aafbbbeb68a1525b20ecdb387e5e2a32fb54d66cd7 WHIRLPOOL 39daaeb122d0db0c8fd98349ab6ea4f43019cca715682a359db46dcaaf4d522af070eb513854d03f4555f0ff968c012c8a269edfb9e4bf930e0e0983e8f885c8 +MISC ChangeLog 3012 SHA256 b925b05a9d7b850382fe2730e88262ced02fa1e29572a83d058674d1970ee98e SHA512 93857039b442d015a7d9101d3085d7155c5b8db16d41d0d88c1f50896a7072ab6531228add4048eb539a5a8dd23e81f6a04e147ffe5c89cd24915bc57ebff9af WHIRLPOOL 824a84cf07bef45b02be837b874082ddfde7c0c1221262f3fb5da01f42e627fcd695e76180f768de61602adfc5125917d34f8db95a801c3d398b7cb2a817a705 +MISC ChangeLog-2015 3561 SHA256 9b8e13bf1ad774aa471ca45e1c7b3739bae093ac4eae0651ceb3d836aa552af8 SHA512 03324dea8dc11a2a8ff2bdb388f8765044aaeeb4f79db85f2a3793ba16366dcfe48586d116ca9b239f0ea610aba42122672215578b0ffe37aadb6689d22bd7c3 WHIRLPOOL 2ba18cc1778b97ce891944a8d276b90156cb35f0ebb56df612b831820631a44836a1a49a1621b79f3063086e91fc9be313fd8dd5edc9d51ea3bd85e28eb617c3 +MISC metadata.xml 500 SHA256 47a8717ee0e9a5a22be7a251d380049f247ee54c487d545d1c17e0cebb0372dc SHA512 3754bf9bdd145d97ed13da18f21de463a4f8a58f89cb42e4a820a5ac8813ffa0d0dd0df986b6a1e278f7ad58974920e49dd7769e0dfce136106ff3a164a6cdcc WHIRLPOOL a5ff8ab5a89b92b325c226aa453698bb14d81bb0b7c0f56510473b94f01ce40b17b914684f4dba32beaf032445b540e96711e1c25ce1ed0e25d07b4c2e4e946e diff --git a/sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch b/sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch new file mode 100644 index 000000000000..34e1a8591f77 --- /dev/null +++ b/sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch @@ -0,0 +1,49 @@ +Index: pam_mktemp-1.1.1/pam_mktemp.c +=================================================================== +--- pam_mktemp-1.1.1.orig/pam_mktemp.c ++++ pam_mktemp-1.1.1/pam_mktemp.c +@@ -55,7 +55,7 @@ + */ + # include <fcntl.h> + # include <sys/ioctl.h> +-# include <ext2fs/ext2_fs.h> ++# include <linux/fs.h> + #else + # undef USE_APPEND_FL + #endif /* HAVE_APPEND_FL */ +@@ -88,7 +88,7 @@ static int ext2fs_chflags(const char *na + if ((fd = open(name, O_RDONLY)) < 0) + return -1; + +- if (ioctl(fd, EXT2_IOC_GETFLAGS, &old_flags)) { ++ if (ioctl(fd, FS_IOC_GETFLAGS, &old_flags)) { + if ((errno == ENOTTY) /* Inappropriate ioctl for device */ + || (errno == ENOSYS)) /* Function not implemented */ + errno = EOPNOTSUPP; +@@ -98,7 +98,7 @@ static int ext2fs_chflags(const char *na + + new_flags = (old_flags | set) & ~clear; + if (new_flags != old_flags) +- retval = ioctl(fd, EXT2_IOC_SETFLAGS, &new_flags); ++ retval = ioctl(fd, FS_IOC_SETFLAGS, &new_flags); + + if (close(fd)) + retval = -1; +@@ -233,7 +233,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h + */ + + #ifdef USE_APPEND_FL +- ext2fs_chflags(PRIVATE_PREFIX, EXT2_APPEND_FL, 0); ++ ext2fs_chflags(PRIVATE_PREFIX, FS_APPEND_FL, 0); + #endif /* USE_APPEND_FL */ + + userdir = malloc(strlen(PRIVATE_PREFIX) + strlen(user) + 2); +@@ -260,7 +260,7 @@ PAM_EXTERN int pam_sm_open_session(pam_h + } else { + /* Don't let the append-only flag get inherited + * from the parent directory. */ +- if (ext2fs_chflags(userdir, 0, EXT2_APPEND_FL) && ++ if (ext2fs_chflags(userdir, 0, FS_APPEND_FL) && + errno != EOPNOTSUPP) + goto out; + #endif /* HAVE_APPEND_FL */ diff --git a/sys-auth/pam_mktemp/metadata.xml b/sys-auth/pam_mktemp/metadata.xml new file mode 100644 index 000000000000..e3e873af7723 --- /dev/null +++ b/sys-auth/pam_mktemp/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> +<email>swegener@gentoo.org</email> +</maintainer> +<maintainer type="project"> +<email>pam-bugs@gentoo.org</email> +<name>Pluggable Authentication Method maintenance</name> +</maintainer> +<use> +<flag name="prevent-removal">If supported, set EXT2_APPEND_FL on /tmp/.private to prevent temporary directories from being removed</flag> +</use> +</pkgmetadata> diff --git a/sys-auth/pam_mktemp/pam_mktemp-1.1.1.ebuild b/sys-auth/pam_mktemp/pam_mktemp-1.1.1.ebuild new file mode 100644 index 000000000000..e79e64aea6ca --- /dev/null +++ b/sys-auth/pam_mktemp/pam_mktemp-1.1.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit toolchain-funcs pam eutils + +DESCRIPTION="Create per-user private temporary directories during login" +HOMEPAGE="http://www.openwall.com/pam/" +SRC_URI="http://www.openwall.com/pam/modules/${PN}/${P}.tar.gz" + +LICENSE="BSD-2" # LICENSE file says "heavily cut-down 'BSD license'" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="selinux +prevent-removal" + +RDEPEND="virtual/pam + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + prevent-removal? ( sys-kernel/linux-headers )" + +src_prepare() { + epatch "${FILESDIR}"/${P}-e2fsprogs-libs.patch +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -fPIC" \ + LDFLAGS="${LDFLAGS} --shared -Wl,--version-script,\$(MAP)" \ + USE_SELINUX="$(use selinux && echo 1 || echo 0)" \ + USE_APPEND_FL="$(use prevent-removal && echo 1 || echo 0)" +} + +src_install() { + dopammod pam_mktemp.so + dodoc README +} + +pkg_postinst() { + elog "To enable pam_mktemp put something like" + elog + elog "session optional pam_mktemp.so" + elog + elog "into /etc/pam.d/system-auth!" +} |