summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/webfs/files')
-rw-r--r--www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch15
-rw-r--r--www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch12
-rw-r--r--www-servers/webfs/files/webfs.confd27
-rw-r--r--www-servers/webfs/files/webfs.initd-r130
4 files changed, 84 insertions, 0 deletions
diff --git a/www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch b/www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch
new file mode 100644
index 000000000000..26e225def360
--- /dev/null
+++ b/www-servers/webfs/files/webfs-1.21-CVE-2013-0347.patch
@@ -0,0 +1,15 @@
+--- ./webfsd.c
++++ ./webfsd.c
+@@ -918,8 +918,11 @@
+ } else {
+ if (NULL == (logfh = fopen(logfile,"a")))
+ xperror(LOG_WARNING,"open access log",NULL);
+- else
++ else {
+ close_on_exec(fileno(logfh));
++ if (0 != chmod(logfile,S_IRUSR|S_IWUSR))
++ xperror(LOG_WARNING,"chmod access log",NULL);
++ }
+ }
+ }
+
diff --git a/www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch b/www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch
new file mode 100644
index 000000000000..03f2f5c59816
--- /dev/null
+++ b/www-servers/webfs/files/webfs-1.21-Variables.mk-dont-strip-binaries-on-install.patch
@@ -0,0 +1,12 @@
+diff -Naur webfs-1.21.orig/mk/Variables.mk webfs-1.21/mk/Variables.mk
+--- webfs-1.21.orig/mk/Variables.mk 2009-02-03 01:14:18.000000000 +0100
++++ webfs-1.21/mk/Variables.mk 2009-02-03 01:16:01.000000000 +0100
+@@ -23,7 +23,7 @@
+ CXX ?= g++
+ MOC ?= $(if $(QTDIR),$(QTDIR)/bin/moc,moc)
+ INSTALL ?= install
+-INSTALL_BINARY := $(INSTALL) -s
++INSTALL_BINARY := $(INSTALL)
+ INSTALL_SCRIPT := $(INSTALL)
+ INSTALL_DATA := $(INSTALL) -m 644
+ INSTALL_DIR := $(INSTALL) -d
diff --git a/www-servers/webfs/files/webfs.confd b/www-servers/webfs/files/webfs.confd
new file mode 100644
index 000000000000..5c4de3ad9b74
--- /dev/null
+++ b/www-servers/webfs/files/webfs.confd
@@ -0,0 +1,27 @@
+# Configuration for webfsd init script
+
+WEBFS_PORT=80
+WEBFS_DOCROOT=/var/www/localhost/htdocs
+WEBFS_INDEX=index.html
+WEBFS_LOG=/var/log/webfsd.log
+
+# set server name
+#WEBFS_SERVNAME=
+
+# uncomment to chroot to specified dir
+#WEBFS_CHROOT="/var/www/localhost"
+
+# max allowed connections (defaults to 32)
+#WEBFS_MAXCONN=50
+
+# uncomment to enable directory listings
+#WEBFS_DIR_LIST=true
+
+# uncomment to enable SSL (you'll need to add -C <cert> -P <pass> to WEBFS_OPTS)
+#WEBFS_SSL=true
+
+# uncomment to enable ipv6
+#WEBFS_IPV6=true
+
+# Add any extra options here. See webfsd for more information.
+#WEBFS_OPTS=""
diff --git a/www-servers/webfs/files/webfs.initd-r1 b/www-servers/webfs/files/webfs.initd-r1
new file mode 100644
index 000000000000..1327756145aa
--- /dev/null
+++ b/www-servers/webfs/files/webfs.initd-r1
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ WEBFS_OPTS="-p ${WEBFS_PORT:-80} -f ${WEBFS_INDEX:-index.html} ${WEBFS_OPTS}"
+ [ -n "${WEBFS_DOCROOT}" ] && WEBFS_OPTS="${WEBFS_OPTS} -r ${WEBFS_DOCROOT}"
+ [ -n "${WEBFS_CHROOT}" ] && WEBFS_OPTS="${WEBFS_OPTS} -R ${WEBFS_CHROOT}"
+ [ -n "${WEBFS_LOG}" ] && WEBFS_OPTS="${WEBFS_OPTS} -L ${WEBFS_LOG}"
+ [ -n "${WEBFS_MAXCONN}" ] && WEBFS_OPTS="${WEBFS_OPTS} -c ${WEBFS_MAXCONN}"
+ [ -n "${WEBFS_IPV6}" ] && WEBFS_OPTS="${WEBFS_OPTS} -6"
+ [ -n "${WEBFS_SSL}" ] && WEBFS_OPTS="${WEBFS_OPTS} -S"
+ [ -n "${WEBFS_SERVNAME}" ] && WEBFS_OPTS="${WEBFS_OPTS} -n ${WEBFS_SERVNAME}"
+ [ -n "${WEBFS_DIR_LIST}" ] || WEBFS_OPTS="${WEBFS_OPTS} -j"
+
+ ebegin "Starting webfsd"
+ start-stop-daemon --start --quiet --exec /usr/bin/webfsd -- ${WEBFS_OPTS}
+ eend $? "Failed to start webfsd"
+}
+
+stop() {
+ ebegin "Stopping webfsd"
+ start-stop-daemon --stop --quiet --exec /usr/bin/webfsd
+ eend $? "Failed to stop webfsd"
+}