Debianize

This commit is contained in:
Stefan Bühler 2009-10-23 10:35:28 +02:00
parent 2daef420a2
commit 306bb5fcfc
10 changed files with 160 additions and 4 deletions

39
Makefile Normal file
View File

@ -0,0 +1,39 @@
path = $(subst :, ,$(PATH))
diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
ifeq ($(strip $(diet_path)),)
ifneq ($(wildcard /opt/diet/bin/diet),)
DIET=/opt/diet/bin/diet
else
DIET=
endif
else
DIET:=$(strip $(diet_path))
endif
# to build without diet libc support, use $ make DIET=
# see http://www.fefe.de/dietlibc/ for details about the diet libc
ifneq ($(DEBUG),)
CFLAGS+=-g
LDFLAGS+=-g
else
CFLAGS+=-O2 -fomit-frame-pointer
LDFLAGS+=-s
ifneq ($(DIET),)
DIET+=-Os
endif
endif
CC:=$(DIET) $(CC)
.PHONY: all install clean
all: execwrap
install: execwrap
install -d $(DESTDIR)/usr/sbin/ $(DESTDIR)/usr/share/man/man8/
install -s -m 755 execwrap $(DESTDIR)/usr/sbin/
install execwrap.8 $(DESTDIR)/usr/share/man/man8/
clean:
rm -f execwrap

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
execwrap (0.5-1) unstable; urgency=low
* Initial release
-- Stefan Bühler <stbuehler@web.de> Thu, 03 Jan 2008 14:42:27 +0100

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
6

18
debian/control vendored Normal file
View File

@ -0,0 +1,18 @@
Source: execwrap
Section: net
Priority: extra
Maintainer: Stefan Bühler <stbuehler@web.de>
Build-Depends: cdbs, debhelper (>= 5)
Standards-Version: 3.8.0
Homepage: http://cyanite.org/projects/execwrap/
Vcs-Git: git://cyanite.org/execwrap
Package: execwrap
Architecture: any
Depends: ${shlibs:Depends}
Description: super-user exec wrapper for the lighttpd web-server
ExecWrap is a super-user exec wrapper for the lighttpd web-server, but it can
be used in any environment as long as arguments can be passed from the server
to its children via the environment.
.
ExecWrap is released under the BSD license.

36
debian/copyright vendored Normal file
View File

@ -0,0 +1,36 @@
This package was debianized by Stefan Bühler <stbuehler@web.de> on
Thu, 03 Jan 2008 14:42:27 +0100.
It was downloaded from http://cyanite.org/projects/execwrap/
Upstream Author:
Sune Foldager
Copyright:
<Copyright (C) 2008 Sune Foldager>
License:
Redistribution and use in source and binary forms, with or without
modification, are permitted under the terms of the BSD License.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
On Debian systems, the complete text of the BSD License can be
found in `/usr/share/common-licenses/BSD'.
The Debian packaging is (C) 2008, Stefan Bühler <stbuehler@web.de> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
README

5
debian/execwrap.pam vendored Normal file
View File

@ -0,0 +1,5 @@
#%PAM-1.0
session required pam_limits.so
@include common-session

43
debian/postinst vendored Normal file
View File

@ -0,0 +1,43 @@
#!/bin/sh
# postinst script for execwrap
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
chown root:www-data /usr/sbin/execwrap
chmod 4750 /usr/sbin/execwrap
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

8
debian/rules vendored Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
DEB_MAKE_INSTALL_TARGET := install DESTDIR=$(CURDIR)/debian/execwrap/
DEB_MAKE_CHECK_TARGET :=
DEB_INSTALL_MANPAGES_execwrap-static := execwrap.8

View File

@ -9,16 +9,16 @@ See the README for documentation.
/* Our parent must have this UID, or we will abort. */
#define PARENT_UID 106
#define PARENT_UID 33
/* Minimum UID we can switch to. */
#define TARGET_MIN_UID 1000
#define TARGET_MIN_UID 10000
/* Minimum GID we can switch to. */
#define TARGET_MIN_GID 100
#define TARGET_MIN_GID 10000
/* Path prefix all targets must start with. */
#define TARGET_PATH_PREFIX "/var/www/light/"
#define TARGET_PATH_PREFIX "/srv/www/"
/* Default UID to switch to, if none given. */
#define DEFAULT_UID 65534