summaryrefslogtreecommitdiff
path: root/libraries/libcap
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libcap')
-rw-r--r--libraries/libcap/README33
-rw-r--r--libraries/libcap/doinst.sh15
-rw-r--r--libraries/libcap/libcap-1.97-i486.diff12
-rw-r--r--libraries/libcap/libcap-1.97-i686.diff12
-rw-r--r--libraries/libcap/libcap.SlackBuild65
-rw-r--r--libraries/libcap/libcap.info8
-rw-r--r--libraries/libcap/slack-desc6
7 files changed, 69 insertions, 82 deletions
diff --git a/libraries/libcap/README b/libraries/libcap/README
index 5922aa31f1..7d77ca7fc6 100644
--- a/libraries/libcap/README
+++ b/libraries/libcap/README
@@ -1,18 +1,31 @@
libcap is a library for getting and setting POSIX.1e
(formerly POSIX 6) draft 15 capabilities.
-More information (POSIX 1e and 2c drafts):
-http://wt.xpilot.org/publications/posix.1e/download.html
+libcap v2 implements support for filesystem capabilities; however,
+the kernel shipped with Slackware 12.1 does not support this.
+
+ # grep CAPABILITIES /boot/config
+ CONFIG_SECURITY_CAPABILITIES=y
+ # CONFIG_SECURITY_FILE_CAPABILITIES is not set
+
+To enable this support, recompile the kernel with this option set:
-Usage tutorial (Olaf Kirch: Using Capabilities - 2002):
-http://www.lst.de/~okir/blackhats/node125.html
+ Security options --->
+ Enable different security models
+ Default Linux Capabilities
+ File POSIX Capabilities (EXPERIMENTAL)
-Active development of libcap v2 is in filesystem capabilities, see:
-http://www.kernel.org/pub/linux/libs/security/linux-privs/README
+Even if you don't use this, the actual lib should still be compatible
+with libcap v1 in the 12.0 repo. If, however, this happens to not actually
+be the case, the SlackBuild there should still work fine on 12.1.
-And maybe read Serge E. Hallyn' article
-POSIX file capabilities: Parceling the power of root
+Additional URL pointers (besides the project homepage):
+
+POSIX file capabilities: Parceling the power of root by Serge E. Hallyn
http://www.ibm.com/developerworks/linux/library/l-posixcap.html?ca=dgr-lnxw06LinuxPOSIX
-If you uninstall this package, you will need to manually remove the
-/usr/include/sys/capability.h header.
+Using Capabilities by Olaf Kirch
+http://www.lst.de/~okir/blackhats/node125.html
+
+POSIX 1e and 2c drafts:
+http://wt.xpilot.org/publications/posix.1e/download.html
diff --git a/libraries/libcap/doinst.sh b/libraries/libcap/doinst.sh
deleted file mode 100644
index 107c5225b2..0000000000
--- a/libraries/libcap/doinst.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-config() {
- NEW="$1"
- OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
- if [ ! -r $OLD ]; then
- mv $NEW $OLD
- elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
- # toss the redundant copy
- rm $NEW
- fi
- # Otherwise, we leave the .new copy for the admin to consider...
-}
-
-config usr/include/sys/capability.h.new
-
diff --git a/libraries/libcap/libcap-1.97-i486.diff b/libraries/libcap/libcap-1.97-i486.diff
deleted file mode 100644
index 4995caaa2f..0000000000
--- a/libraries/libcap/libcap-1.97-i486.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libcap-1.97/Make.Rules libcap-1.97.new/Make.Rules
---- libcap-1.97/Make.Rules 2007-08-14 08:21:26.000000000 +0200
-+++ libcap-1.97.new/Make.Rules 2007-10-29 12:35:31.000000000 +0100
-@@ -48,7 +48,7 @@
-
- CC=gcc
- COPTFLAGS=-O2
--DEBUG=-O2 -g #-DDEBUG
-+DEBUG=-O2 -march=i486 -mtune=i686 #-g #-DDEBUG
- WARNINGS=-fPIC -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes \
diff --git a/libraries/libcap/libcap-1.97-i686.diff b/libraries/libcap/libcap-1.97-i686.diff
deleted file mode 100644
index e31239b9a9..0000000000
--- a/libraries/libcap/libcap-1.97-i686.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libcap-1.97/Make.Rules libcap-1.97.new/Make.Rules
---- libcap-1.97/Make.Rules 2007-08-14 08:21:26.000000000 +0200
-+++ libcap-1.97.new/Make.Rules 2007-10-29 12:35:31.000000000 +0100
-@@ -48,7 +48,7 @@
-
- CC=gcc
- COPTFLAGS=-O2
--DEBUG=-O2 -g #-DDEBUG
-+DEBUG=-O2 -march=i686 -mtune=i686 #-g #-DDEBUG
- WARNINGS=-fPIC -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes \
diff --git a/libraries/libcap/libcap.SlackBuild b/libraries/libcap/libcap.SlackBuild
index dcf928bda6..d406089837 100644
--- a/libraries/libcap/libcap.SlackBuild
+++ b/libraries/libcap/libcap.SlackBuild
@@ -1,21 +1,33 @@
#!/bin/sh
# Slackware build script for libcap
+
# Written by Menno Duursma
-# Modified by the SlackBuilds.org project
+
+# This program is free software. It comes without any warranty.
+# Granted WTFPL, version 2, as published by Sam Hocevar dec 2004.
+# See http://sam.zoy.org/wtfpl/COPYING for more details.
PRGNAM=libcap
-VERSION=1.97
+VERSION=2.14
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Bail out if we have a problem
-set -e
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e # Bail out if we have a problem
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -23,46 +35,47 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-
chown -R root:root .
find . -type d | xargs chmod 0755
find . -type f | xargs chmod go-w
-# Apply a patch to set the CFLAGS
-if [ "$ARCH" = "i686" ]; then
- patch -p1 < $CWD/$PRGNAM-$VERSION-$ARCH.diff
-elif [ "$ARCH" = "i486" ]; then
- patch -p1 < $CWD/$PRGNAM-$VERSION-$ARCH.diff
-fi
+# We use DEBUG for the CFLAGS setting as that works in one take
+sed -i.orig "s/^\(DEBUG =\).*/\1$SLKCFLAGS/" Make.Rules
-make
+make DYNAMIC=yes
make install FAKEROOT=$PKG man_prefix=/usr
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Add included scripts
+( cd contrib || exit 1
+ for file in pcaps4convenience pcaps4server pcaps4suid0 ; do
+ install -m 0755 -D $file $PKG/usr/sbin/$file ; done
)
-if [ -d $PKG/usr/man ]; then
- gzip -9 $PKG/usr/man/man?/*
-fi
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+( cd $PKG/usr/man || exit 1
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do
+ ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
-# Glibc already has the capget/capset manpage
+# glibc already has the capget/capset manpage
rm -rf $PKG/usr/man/man2
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README CHANGELOG License pgp.keys.asc \
- doc/capability.notes $CWD/capfaq-0.2.txt \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGELOG README License $CWD/capfaq-0.2.txt \
+ pgp.keys.asc doc/capability.notes progs/quicktest.sh \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.$TAG
-# Dont overwrite the header, as it may have been edited by the user; instead,
-# leave the new copy for the admin to consider
-mv $PKG/usr/include/sys/capability.h $PKG/usr/include/sys/capability.h.new
+# Fix privs, just to make sure
+chown -R root:root $PKG/usr/doc
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/libraries/libcap/libcap.info b/libraries/libcap/libcap.info
index b22b834594..6a8492a942 100644
--- a/libraries/libcap/libcap.info
+++ b/libraries/libcap/libcap.info
@@ -1,8 +1,8 @@
PRGNAM="libcap"
-VERSION="1.97"
-HOMEPAGE="http://sourceforge.net/projects/linux-privs/"
-DOWNLOAD="ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libcap-1.97.tar.gz"
-MD5SUM="0021ac30148844537e134512587691fb"
+VERSION="2.14"
+HOMEPAGE="http://sites.google.com/site/fullycapable/"
+DOWNLOAD="http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.14.tar.gz"
+MD5SUM="bdebad7e0b904bd4e20c321bd48100cc"
MAINTAINER="Menno E. Duursma"
EMAIL="druiloor@zonnet.nl"
APPROVED="rworkman"
diff --git a/libraries/libcap/slack-desc b/libraries/libcap/slack-desc
index 0186863558..50bacc3024 100644
--- a/libraries/libcap/slack-desc
+++ b/libraries/libcap/slack-desc
@@ -11,9 +11,9 @@ libcap:
libcap: This is a library for getting and setting POSIX.1e (formerly POSIX 6)
libcap: draft 15 capabilities.
libcap:
-libcap: Libcap was written by Andrew G. Morgan; however, it would not
-libcap: have been possible without the help of Aleph1, Roland Buresund,
-libcap: Andrew Main, and Alexander Kjeldaas.
+libcap: Libcap was written by Andrew G. Morgan
+libcap:
+libcap:
libcap:
libcap:
libcap: