summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-auth/pam_mktemp
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-auth/pam_mktemp')
-rw-r--r--sys-auth/pam_mktemp/Manifest1
-rw-r--r--sys-auth/pam_mktemp/files/pam_mktemp-1.1.1-e2fsprogs-libs.patch49
-rw-r--r--sys-auth/pam_mktemp/metadata.xml11
-rw-r--r--sys-auth/pam_mktemp/pam_mktemp-1.1.1.ebuild47
4 files changed, 108 insertions, 0 deletions
diff --git a/sys-auth/pam_mktemp/Manifest b/sys-auth/pam_mktemp/Manifest
new file mode 100644
index 000000000000..95cf3aaf4a6e
--- /dev/null
+++ b/sys-auth/pam_mktemp/Manifest
@@ -0,0 +1 @@
+DIST pam_mktemp-1.1.1.tar.gz 6754 SHA256 66cf80c18439ca3456db96402f2eeac14b1a0503cc1d1be7f2b16d5f079f3f3d SHA512 e2e42115a1fe70c128397d842dc69f96863d721dfa886ebc21b5e8249333adc671d74213ecf1222d65417cd4747eb6114f515271fd7eac4376a2b7e28925996d WHIRLPOOL 3d59873ffad85de82c385a3d5f6c221a2fac061463bc85c176e401ba2456995b21448ba9b6518a876763753a654d880c5a4e723e123c5a5e10ecdf005cd0c7e4
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..d7c694df6206
--- /dev/null
+++ b/sys-auth/pam_mktemp/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>pam</herd>
+<maintainer>
+<email>swegener@gentoo.org</email>
+</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..f394073b6e19
--- /dev/null
+++ b/sys-auth/pam_mktemp/pam_mktemp-1.1.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 hppa ia64 m68k ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-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!"
+}