mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
network/suhosin: Added to 12.1 repository
This commit is contained in:
parent
5353c184c8
commit
4cbc8b3b80
4 changed files with 124 additions and 0 deletions
25
network/suhosin/README
Normal file
25
network/suhosin/README
Normal file
|
@ -0,0 +1,25 @@
|
|||
Suhosin is an advanced protection system for PHP installations.
|
||||
|
||||
It was designed to protect servers and users from known and unknown flaws
|
||||
in PHP applications and the PHP core.
|
||||
|
||||
Suhosin comes in two independent parts, that can be used separately or
|
||||
in combination. The first part is a small patch against the PHP core,
|
||||
that implements a few low-level protections against bufferoverflows or
|
||||
format string vulnerabilities.
|
||||
|
||||
The second part is a powerful PHP extension that implements all the other
|
||||
protections. Suhosin is binary compatible with normal PHP installations,
|
||||
which means it is compatible to 3rd party binary extensions like
|
||||
ZendOptimizer.
|
||||
|
||||
This package includes only the extention. To enable it after installation,
|
||||
edit /etc/httpd/php.ini and add a line to 'Dynamic Extensions', like this:
|
||||
|
||||
extension=suhosin.so
|
||||
|
||||
After which the 'php -v' command should list it as loaded.
|
||||
For more info try:
|
||||
|
||||
php -i | grep suhosin
|
||||
|
19
network/suhosin/slack-desc
Normal file
19
network/suhosin/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
suhosin: Suhosin (PHP security extension)
|
||||
suhosin:
|
||||
suhosin: Suhosin is an advanced protection system for PHP installations. It
|
||||
suhosin: was designed to protect servers and users from known and unknown
|
||||
suhosin: flaws in PHP applications and the PHP core.
|
||||
suhosin:
|
||||
suhosin: Suhosin is developed and maintained by the hardened-php project.
|
||||
suhosin:
|
||||
suhosin:
|
||||
suhosin:
|
||||
suhosin:
|
72
network/suhosin/suhosin.SlackBuild
Normal file
72
network/suhosin/suhosin.SlackBuild
Normal file
|
@ -0,0 +1,72 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for Suhosin
|
||||
|
||||
# Written by Menno E. Duursma <druiloor@zonnet.nl>
|
||||
|
||||
# This program is free software. It comes without any warranty.
|
||||
# Granted WTFPL, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
# Modified by SlackBuilds.org
|
||||
|
||||
PRGNAM=suhosin
|
||||
VERSION=${VERSION:-0.9.27}
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
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 # Exit on most errors
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tgz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find . -type d | xargs chmod 0755
|
||||
find . -type f | xargs chmod a-s,go-w
|
||||
|
||||
# With PHP extentions apparently this is needed
|
||||
phpize
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
EXTENSION_DIR="$PKG/usr/lib/php/extensions" \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var
|
||||
|
||||
make
|
||||
|
||||
install -D -m755 modules/suhosin.so $PKG/usr/lib/php/extensions/suhosin.so
|
||||
|
||||
( cd $PKG || exit 1
|
||||
find . -type f | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a [A-Z][A-Z]* Changelog $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
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|
8
network/suhosin/suhosin.info
Normal file
8
network/suhosin/suhosin.info
Normal file
|
@ -0,0 +1,8 @@
|
|||
PRGNAM="suhosin"
|
||||
VERSION="0.9.27"
|
||||
HOMEPAGE="http://www.hardened-php.net/suhosin/index.html"
|
||||
DOWNLOAD="http://download.suhosin.org/suhosin-0.9.27.tgz"
|
||||
MD5SUM="9aae02bc2d2bcf9b8bd97cd22f56a8b8"
|
||||
MAINTAINER="Menno E. Duursma"
|
||||
EMAIL="druiloor@zonnet.nl"
|
||||
APPROVED="David Somero"
|
Loading…
Reference in a new issue