Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

17
sysutils/webmin/DEINSTALL Normal file
View File

@@ -0,0 +1,17 @@
# $NetBSD: DEINSTALL,v 1.6 2012/11/02 19:02:50 shattered Exp $
case ${STAGE} in
DEINSTALL)
WEBMIN_DIR="@WEBMIN_DIR@"
WEBMIN_CONFIG="${PKG_SYSCONFDIR}"
WEBMIN_VAR="@WEBMIN_VARDIR@"
${TEST} ! -f "${WEBMIN_CONFIG}/var-path" ||
WEBMIN_VAR=`${CAT} ${WEBMIN_CONFIG}/var-path`
export WEBMIN_CONFIG WEBMIN_VAR
if ${TEST} -x "${WEBMIN_DIR}/run-uninstalls.pl"; then
( cd ${WEBMIN_DIR} &&
${WEBMIN_DIR}/run-uninstalls.pl @WEBMIN_MINIMAL_MODULES@ )
fi
${RM} -f @PKG_SYSCONFDIR@/module.infos.cache
;;
esac

5
sysutils/webmin/DESCR Normal file
View File

@@ -0,0 +1,5 @@
Webmin is a web-based interface for system administration for Unix.
Using any browser that supports tables and forms, you can setup user
accounts, Apache, DNS, file sharing and so on. Webmin consists of a
simple web server, and a number of CGI programs which directly update
system files.

16
sysutils/webmin/INSTALL Normal file
View File

@@ -0,0 +1,16 @@
# $NetBSD: INSTALL,v 1.2 2012/11/02 19:02:50 shattered Exp $
case ${STAGE} in
POST-INSTALL)
WEBMIN_DIR="@WEBMIN_DIR@"
WEBMIN_CONFIG="${PKG_SYSCONFDIR}"
WEBMIN_VAR="@WEBMIN_VARDIR@"
${TEST} ! -f "${WEBMIN_CONFIG}/var-path" ||
WEBMIN_VAR=`${CAT} ${WEBMIN_CONFIG}/var-path`
export WEBMIN_CONFIG WEBMIN_VAR
if ${TEST} -x "${WEBMIN_DIR}/run-postinstalls.pl"; then
( cd ${WEBMIN_DIR} &&
${WEBMIN_DIR}/run-postinstalls.pl @WEBMIN_MINIMAL_MODULES@ )
fi
;;
esac

21
sysutils/webmin/MESSAGE Normal file
View File

@@ -0,0 +1,21 @@
===========================================================================
$NetBSD: MESSAGE,v 1.5 2012/11/02 19:02:50 shattered Exp $
By default, the Webmin server listens on port 10000, e.g. it may be
accessed at:
https://localhost:10000/
The default username and password for this Webmin installation is:
Username: admin
Password: password
It is highly recommended that this be changed as soon as possible,
either by logging into the Webmin server and changing it within the
"Webmin Users" module, or by using the changepass.pl script, e.g.,
${WEBMIN_DIR}/changepass.pl \
${PKG_SYSCONFDIR} admin new-password
===========================================================================

145
sysutils/webmin/Makefile Normal file
View File

@@ -0,0 +1,145 @@
# $NetBSD: Makefile,v 1.36 2013/05/31 12:42:05 wiz Exp $
.include "version.mk"
DISTNAME= webmin-${WBM_VERSION}
#KGREVISION= 5
PKGREVISION= 2
CATEGORIES= sysutils www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=webadmin/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.webmin.com/
COMMENT= Perl web server and CGI for Unix system administration
LICENSE= modified-bsd
DEPENDS+= p5-Net-SSLeay-[0-9]*:../../security/p5-Net-SSLeay
NOT_FOR_BULK_PLATFORM= HPUX-*-*
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_LANGUAGES= # empty
NO_BUILD= yes
USE_TOOLS+= perl:run
WEBMIN_DIR= ${PREFIX}/share/webmin
WEBMIN_EGDIR= ${PREFIX}/share/examples/webmin
WEBMIN_ETCDIR= ${PKG_SYSCONFDIR}
WEBMIN_VARDIR= ${VARBASE}/webmin
FILES_SUBST+= WEBMIN_DIR=${WEBMIN_DIR:Q}
FILES_SUBST+= WEBMIN_EGDIR=${WEBMIN_EGDIR:Q}
FILES_SUBST+= WEBMIN_ETCDIR=${WEBMIN_ETCDIR:Q}
FILES_SUBST+= WEBMIN_MINIMAL_MODULES=${WEBMIN_MINIMAL_MODULES:Q}
FILES_SUBST+= WEBMIN_VARDIR=${WEBMIN_VARDIR:Q}
MESSAGE_SUBST+= WEBMIN_DIR=${WEBMIN_DIR:Q}
BUILD_DEFS+= VARBASE
WEBMIN_MINIMAL_MODULES= acl cron init inittab man proc servers webmin webminlog
PKG_SYSCONFSUBDIR= webmin
OWN_DIRS_PERMS+= ${WEBMIN_VARDIR} ${ROOT_USER} ${ROOT_GROUP} 0700
.for f in config install-dir perl-path var-path version
CONF_FILES+= ${WEBMIN_EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
.endfor
.for m in ${WEBMIN_MINIMAL_MODULES}
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${m} \
${ROOT_USER} ${ROOT_GROUP} 0700
CONF_FILES_PERMS+= ${WEBMIN_EGDIR}/${m}/config \
${PKG_SYSCONFDIR}/${m}/config \
${ROOT_USER} ${ROOT_GROUP} 0600
.endfor
.for f in miniserv.pem
CONF_FILES_PERMS+= ${WEBMIN_DIR}/${f} ${PKG_SYSCONFDIR}/${f} \
${ROOT_USER} ${ROOT_GROUP} 0600
.endfor
.for f in miniserv.conf miniserv.users webmin.acl
CONF_FILES_PERMS+= ${WEBMIN_EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} \
${ROOT_USER} ${ROOT_GROUP} 0600
.endfor
.for f in reload restart start stop
CONF_FILES_PERMS+= ${WEBMIN_EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} \
${ROOT_USER} ${ROOT_GROUP} 0755
.endfor
RCD_SCRIPTS= webmin
CHECK_INTERPRETER_SKIP+= share/webmin/webmin-gentoo-init
ALL_ENV+= tempdir=${WRKDIR}/.tmp
.include "../../security/openssl/buildlink3.mk"
post-extract:
${CP} ${FILESDIR}/acl_config-dragonfly ${WRKSRC}/acl/config-dragonfly
${CP} ${FILESDIR}/init_config-dragonfly ${WRKSRC}/init/config-dragonfly
${CP} ${FILESDIR}/man_config-dragonfly ${WRKSRC}/man/config-dragonfly
${CP} ${FILESDIR}/proc_config-dragonfly ${WRKSRC}/proc/config-dragonfly
${RM} -r ${WRKSRC}/acl/Authen-SolarisRBAC-0.1*
pre-configure:
cd ${WRKSRC} && \
ptn="@"`${ECHO} ${WEBMIN_MINIMAL_MODULES}|sed -e 's/ /@/g'`"@" && \
for m in `${ECHO} */module.info | sed -e 's/\/module.info//g'`; do \
case $${ptn} in \
*@$${m}@*) ;; \
*) rm -rf $${m} ;; \
esac; \
done && \
for t in `${ECHO} */theme.info | sed -e 's/\/theme.info//g'`; do\
rm -rf $${t}; \
done && \
touch ${WRKSRC}/minimal-install
do-configure:
sed -e "s,@WEBMIN_EGDIR@,${DESTDIR}${WEBMIN_EGDIR},g" \
-e "s,@WEBMIN_VARDIR@,${DESTDIR}${WEBMIN_VARDIR},g" \
-e "s,@PERL5@,"${PERL5:Q}",g" \
${FILESDIR}/setup-pre.sh > ${WRKSRC}/setup-pre.sh
cd ${WRKSRC}; for file in acl/config acl/config-*; do \
sed -e "s,^ssleay=.*,ssleay=${SSLBASE}/bin/openssl," \
"$$file" > "$$file.new"; \
${MV} -f "$$file.new" "$$file"; \
done
${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f
# Fix up the path to the config directory in the installed example config
# files.
#
do-install:
${PKGSRC_SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
${SH} ${WRKSRC}/setup.sh ${DESTDIR}${WEBMIN_DIR}
sed -e "/^env_WEBMIN_CONFIG=/s,${DESTDIR}${WEBMIN_EGDIR},${WEBMIN_ETCDIR}," \
-e "/^logout=/s,${DESTDIR}${WEBMIN_EGDIR},${WEBMIN_ETCDIR}," \
-e "/^userfile=/s,${DESTDIR}${WEBMIN_EGDIR},${WEBMIN_ETCDIR}," \
-e "/^keyfile=/s,${DESTDIR}${WEBMIN_EGDIR},${WEBMIN_ETCDIR}," \
-e "s,${DESTDIR},,g" \
${DESTDIR}${WEBMIN_EGDIR}/miniserv.conf > ${WRKDIR}/miniserv.conf
sed -e "s,${DESTDIR},,g" \
${DESTDIR}${WEBMIN_DIR}/setup-pre.sh > ${WRKDIR}/setup-pre.sh
for file in install-dir reload restart start stop var-path; do \
sed -e "s,${DESTDIR}${WEBMIN_EGDIR}/miniserv.conf,${WEBMIN_ETCDIR}/miniserv.conf," \
-e "s,${DESTDIR},,g" \
${DESTDIR}${WEBMIN_EGDIR}/$$file > ${WRKDIR}/$$file; \
done
cd ${DESTDIR}${WEBMIN_EGDIR} && ${RM} -f miniserv.conf install-dir reload restart start stop var-path
for file in miniserv.conf; do \
${INSTALL_DATA} ${WRKDIR}/$$file \
${DESTDIR}${WEBMIN_EGDIR}/$$file; \
${RM} -f ${WRKDIR}/$$file; \
done
for file in setup-pre.sh; do \
${INSTALL_SCRIPT} ${WRKDIR}/$$file \
${DESTDIR}${WEBMIN_DIR}/$$file; \
${RM} -f ${WRKDIR}/$$file; \
done
for file in install-dir reload restart start stop var-path; do \
${INSTALL_SCRIPT} ${WRKDIR}/$$file \
${DESTDIR}${WEBMIN_EGDIR}/$$file; \
${RM} -f ${WRKDIR}/$$file; \
done
${RM} -f ${DESTDIR}${WEBMIN_EGDIR}/miniserv.pem \
${DESTDIR}${WEBMIN_EGDIR}/module.infos.cache
cd ${DESTDIR}${WEBMIN_DIR} && \
${CHMOD} 0400 setup.pl setup.sh setup-pre.sh
.include "../../mk/bsd.pkg.mk"

2146
sysutils/webmin/PLIST Normal file

File diff suppressed because it is too large Load Diff

29
sysutils/webmin/distinfo Normal file
View File

@@ -0,0 +1,29 @@
$NetBSD: distinfo,v 1.19 2012/11/02 19:02:50 shattered Exp $
SHA1 (webmin-1.600.tar.gz) = b915b7127a9579cac8993c4ef54462dfa404bf64
RMD160 (webmin-1.600.tar.gz) = 33f0c67b47bc7db625fc66b85ee1872e77f32ad5
Size (webmin-1.600.tar.gz) = 21397348 bytes
SHA1 (patch-aa) = e1196764fefed872e84a76dc32b428c504920468
SHA1 (patch-ab) = fa07200462df76af23b9952739388053940c6743
SHA1 (patch-ac) = 8803482bd0ab02e3d70683a520a76c3dc680df6b
SHA1 (patch-ad) = 279ed8684448f1bae252bbe3ba7f9179fdd17737
SHA1 (patch-ae) = b2b70ab748f6bb94e9a567097c874dbd67a8bc1d
SHA1 (patch-af) = 24f130a985ab7d3bdfc7db8d82114e8b107f1574
SHA1 (patch-ag) = 1ae36686d02410634291abb33b67fddd17a3993f
SHA1 (patch-ah) = 4a6f1d9ee4a8d1a74037ffd86abad6c168a0fbfa
SHA1 (patch-ai) = b06b0fe269739cc1121da7588ace6903fcccf9ff
SHA1 (patch-ak) = 201c124d8c407e0439b8531dfb4dacba37ce37bb
SHA1 (patch-al) = b1382143d42af3ce5057368dc442ba9c2e6de259
SHA1 (patch-am) = d61fed9c53870aad36651389a5d655f5b2d5c21f
SHA1 (patch-an) = 87dadbc3c935f793dae32d87e57969aaaa6f61fa
SHA1 (patch-ao) = 007eba7b551fd3d154e470f82c1c15552481e9fa
SHA1 (patch-ap) = 2cf02d0f1d1c725ecce0aba072d9f149bdf24e20
SHA1 (patch-aq) = 52751d7ec0ce1ebb89aee977a752486372b80e36
SHA1 (patch-ar) = 647703ab0281991cec015f2f6a6d191c70c0301e
SHA1 (patch-as) = 65f246bfca5b077d15bf0e874d56792f08c93c03
SHA1 (patch-au) = f0d0aaf6819f92fd96543246e7600054fb150d08
SHA1 (patch-av) = c1b0b6a8dd4ee6c7fa226a77c4f3f081211cc619
SHA1 (patch-aw) = a6f8b4c80222b4f659ebe11754d5e5cf981abf5a
SHA1 (patch-ax) = e7debde036d736f641229b2b604b2d77b03c7366
SHA1 (patch-ay) = 8f21939c04e71c0aa74660b93e03e0ff2b9e69d5
SHA1 (patch-az) = 770d55c85ca9de3f038cfbcf2a1134848ad000d0

View File

@@ -0,0 +1,4 @@
ssleay=/usr/bin/openssl
select=0
order=0
display=0

View File

@@ -0,0 +1,10 @@
reboot_command=shutdown -r now
shutdown_command=shutdown -p now
local_script=/etc/rc.local
local_down=/etc/rc.shutdown
status_check=0
order=0
sort_mode=0
no_chkconfig=0
rc_dir=/etc/rc.d
rc_conf=/etc/rc.conf

View File

@@ -0,0 +1,4 @@
search_cmd=man -k PAGE
man_dir=/usr/share/man
man_cmd_sect=man SECTION PAGE
man_cmd=man PAGE

View File

@@ -0,0 +1,5 @@
default_mode=last
ps_style=freebsd
base_ppid=0
cut_length=80
trace_java=1

View File

@@ -0,0 +1,28 @@
# $NetBSD: setup-pre.sh,v 1.3 2012/11/02 19:02:51 shattered Exp $
#
# This shell script is sourced by webmin's setup.sh to provide local
# overrides and defaults for configuration settings.
#
# This directory holds the example config files. The strategy is to
# initially install all (example) config files into a separate examples
# directory and use INSTALL/DEINSTALL scripts to manage them.
#
config_dir="@WEBMIN_EGDIR@"
# Webmin run-time files directory
var_dir="@WEBMIN_VARDIR@"
# Path the the Perl interpreter
perl="@PERL5@"
port="10000" # default webmin server port
login="admin" # default admin user
password="password" # default admin password
ssl=1 # always use SSL
atboot=0 # don't auto-configure to run at boot-time
noperlpath= # fix up path to perl in scripts
nouninstall=1 # don't auto-create the uninstall script
nopostinstall=1 # don't auto-run the postinstall actions during setup
nostart=1 # don't auto-start the webmin server after setup

View File

@@ -0,0 +1,16 @@
# $NetBSD: wbm-deinstall.tmpl,v 1.2 2012/11/02 19:02:51 shattered Exp $
case "${STAGE}" in
DEINSTALL)
WBMNAME="@WBMNAME@"
WEBMIN_DIR="@WEBMIN_DIR@"
WEBMIN_CONFIG="${PKG_SYSCONFDIR}"
WEBMIN_VAR="@WEBMIN_VARDIR@"
${TEST} ! -f "${WEBMIN_CONFIG}/var-path" ||
WEBMIN_VAR=`${CAT} ${WEBMIN_CONFIG}/var-path`
export WEBMIN_CONFIG WEBMIN_VAR
if ${TEST} -x "${WEBMIN_DIR}/run-uninstalls.pl"; then
( cd ${WEBMIN_DIR} &&
${WEBMIN_DIR}/run-uninstalls.pl ${WBMNAME} )
fi
esac

View File

@@ -0,0 +1,16 @@
# $NetBSD: wbm-install.tmpl,v 1.2 2012/11/02 19:02:51 shattered Exp $
case "${STAGE}" in
POST-INSTALL)
WBMNAME="@WBMNAME@"
WEBMIN_DIR="@WEBMIN_DIR@"
WEBMIN_CONFIG="${PKG_SYSCONFDIR}"
WEBMIN_VAR="@WEBMIN_VARDIR@"
${TEST} ! -f "${WEBMIN_CONFIG}/var-path" ||
WEBMIN_VAR=`${CAT} ${WEBMIN_CONFIG}/var-path`
export WEBMIN_CONFIG WEBMIN_VAR
if ${TEST} -x "${WEBMIN_DIR}/run-postinstalls.pl"; then
( cd ${WEBMIN_DIR} &&
${WEBMIN_DIR}/run-postinstalls.pl ${WBMNAME} )
fi
esac

View File

@@ -0,0 +1,44 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: webmin.sh,v 1.4 2012/11/02 19:02:51 shattered Exp $
#
# PROVIDE: webmin
# REQUIRE: LOGIN
. /etc/rc.subr
name="webmin"
rcvar=${name}
command="@WEBMIN_DIR@/miniserv.pl"
command_interpreter="@PERL5@"
webmin_etcdir="@PKG_SYSCONFDIR@"
required_files="@PKG_SYSCONFDIR@/miniserv.conf"
extra_commands="reload"
reload_cmd="webmin_doit reload"
restart_cmd="webmin_doit restart"
start_cmd="webmin_doit start"
stop_cmd="webmin_doit stop"
webmin_doit()
{
case "$1" in
reload|restart|start|stop) ;;
*) return 1 ;;
esac
script="${webmin_etcdir}/$1"
required_files="$required_files $script"
for f in $required_files; do
if [ ! -r "$f" ]; then
echo 1>&2 "$0: WARNING: $f is not readable"
if [ -z $rc_force ]; then
return 1
fi
fi
done
$script
}
load_rc_config $name
run_rc_command "$1"

View File

@@ -0,0 +1,136 @@
$NetBSD: patch-aa,v 1.8 2012/11/02 19:02:51 shattered Exp $
--- setup.sh.orig 2009-03-18 07:30:26.000000000 +0200
+++ setup.sh 2009-04-09 12:24:40.000000000 +0300
@@ -35,6 +35,11 @@
# Only root can run this
id | grep "uid=0(" >/dev/null
+#
+# For pkgsrc, we allow anyone to run this script, including unprivileged
+# users.
+#
+true
if [ $? != "0" ]; then
uname -a | grep -i CYGWIN >/dev/null
if [ $? != "0" ]; then
@@ -122,6 +127,9 @@
upgrading=1
fi
+# For pkgsrc, we are never upgrading, only installing.
+upgrading=0
+
# Check if upgrading from an old version
if [ "$upgrading" = 1 ]; then
echo ""
@@ -199,6 +207,10 @@
else
# Config directory exists .. make sure it is not in use
ls $config_dir | grep -v rpmsave >/dev/null 2>&1
+ #
+ # For pkgsrc, we don't care if the config directory already exists.
+ #
+ false
if [ "$?" = "0" -a "$config_dir" != "/etc/webmin" ]; then
echo "ERROR: Config directory $config_dir is not empty"
echo ""
@@ -528,6 +540,12 @@
kfile=$config_dir/miniserv.pem
openssl version >/dev/null 2>&1
+ #
+ # For pkgsrc, we always want to use the default miniserv.pem, though
+ # we'll recommend to the user at post-install time to generate a
+ # new certificate.
+ #
+ false
if [ "$?" = "0" ]; then
# We can generate a new SSL key for this host
host=`hostname`
@@ -742,44 +760,47 @@
echo ""
fi
-echo "Changing ownership and permissions .."
-# Make all config dirs non-world-readable
-for m in $newmods; do
- chown -R root $config_dir/$m
- chgrp -R bin $config_dir/$m
- chmod -R og-rw $config_dir/$m
-done
-# Make miniserv config files non-world-readable
-for f in miniserv.conf miniserv.pem miniserv.users; do
- chown -R root $config_dir/$f
- chgrp -R bin $config_dir/$f
- chmod -R og-rw $config_dir/$f
-done
-chmod +r $config_dir/version
-if [ "$nochown" = "" ]; then
- # Make program directory non-world-writable, but executable
- chown -R root "$wadir"
- chgrp -R bin "$wadir"
- chmod -R og-w "$wadir"
- chmod -R a+rx "$wadir"
-fi
-if [ $var_dir != "/var" ]; then
- # Make log directory non-world-readable or writable
- chown -R root $var_dir
- chgrp -R bin $var_dir
- chmod -R og-rwx $var_dir
-fi
-# Fix up bad permissions from some older installs
-for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
- if [ -d "$config_dir/$m" ]; then
- chown root $config_dir/$m
- chgrp bin $config_dir/$m
- chmod og-rw $config_dir/$m
- chmod og-rw $config_dir/$m/config 2>/dev/null
- fi
-done
-echo "..done"
-echo ""
+# For pkgsrc, we skip changing ownership and permissions as we allow the
+# INSTALL/DEINSTALL to manage this for us.
+#
+#echo "Changing ownership and permissions .."
+## Make all config dirs non-world-readable
+#for m in $newmods; do
+# chown -R root $config_dir/$m
+# chgrp -R bin $config_dir/$m
+# chmod -R og-rw $config_dir/$m
+#done
+## Make miniserv config files non-world-readable
+#for f in miniserv.conf miniserv.pem miniserv.users; do
+# chown -R root $config_dir/$f
+# chgrp -R bin $config_dir/$f
+# chmod -R og-rw $config_dir/$f
+#done
+#chmod +r $config_dir/version
+#if [ "$nochown" = "" ]; then
+# # Make program directory non-world-writable, but executable
+# chown -R root "$wadir"
+# chgrp -R bin "$wadir"
+# chmod -R og-w "$wadir"
+# chmod -R a+rx "$wadir"
+#fi
+#if [ $var_dir != "/var" ]; then
+# # Make log directory non-world-readable or writable
+# chown -R root $var_dir
+# chgrp -R bin $var_dir
+# chmod -R og-rwx $var_dir
+#fi
+## Fix up bad permissions from some older installs
+#for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
+# if [ -d "$config_dir/$m" ]; then
+# chown root $config_dir/$m
+# chgrp bin $config_dir/$m
+# chmod og-rw $config_dir/$m
+# chmod og-rw $config_dir/$m/config 2>/dev/null
+# fi
+#done
+#echo "..done"
+#echo ""
# Save target directory if one was specified
if [ "$wadir" != "$srcdir" ]; then

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.4 2007/04/21 05:22:57 obache Exp $
--- oschooser.pl.orig 2007-04-09 05:00:00.000000000 +0000
+++ oschooser.pl
@@ -107,6 +107,8 @@ if (!$auto) {
}
else {
# ask for the operating system name ourselves
+ print "Automatic OS detection failed";
+ exit 9; # Be non-interactive under all circumstances.
$dashes = "-" x 75;
print <<EOF;
For Webmin to work properly, it needs to know which operating system

View File

@@ -0,0 +1,32 @@
$NetBSD: patch-ac,v 1.5 2012/11/02 19:02:51 shattered Exp $
--- software/search.cgi.orig 2011-04-27 00:18:43.000000000 +0200
+++ software/search.cgi 2011-06-15 23:15:13.000000000 +0200
@@ -34,7 +34,7 @@ if (@match == 1 && $in{'goto'}) {
if (@match) {
@match = sort { lc($packages{$a,'name'}) cmp lc($packages{$b,'name'}) }
@match;
- print "<b>",&text('search_match', "<tt>$s</tt>"),"</b><p>\n";
+ print "<b>",&text('search_match', "<tt>" . &html_escape($s) . "</tt>"),"</b><p>\n";
print &ui_form_start("delete_packs.cgi", "post");
print &ui_hidden("search", $in{'search'});
@tds = ( "width=5" );
@@ -49,7 +49,8 @@ if (@match) {
local @cols;
local $v = $packages{$i,'shortversion'} ||
$packages{$i,'version'};
- push(@cols, "<a href=\"edit_pack.cgi?search=$s&package=".
+ push(@cols, "<a href=\"edit_pack.cgi?search=" .
+ &urlize($s) . "&package=".
&urlize($packages{$i,'name'})."&version=".
&urlize($packages{$i,'version'})."\">".&html_escape(
$packages{$i,'name'}.($v ? " $v" : ""))."</a>");
@@ -70,7 +71,7 @@ if (@match) {
print &ui_form_end([ [ undef, $text{'search_delete'} ] ]);
}
else {
- print "<b>",&text('search_nomatch', "<tt>$s</tt>"),"</b><p>\n";
+ print "<b>",&text('search_nomatch', "<tt>" . &html_escape($s) . "</tt>"),"</b><p>\n";
}
&ui_print_footer("", $text{'index_return'});

View File

@@ -0,0 +1,28 @@
$NetBSD: patch-ad,v 1.8 2012/11/02 19:02:51 shattered Exp $
--- os_list.txt.orig 2009-03-18 07:30:26.000000000 +0200
+++ os_list.txt 2009-04-09 12:31:24.000000000 +0300
--- os_list.txt.orig 2009-03-18 05:30:26.000000000 +0000
+++ os_list.txt
@@ -255,19 +255,13 @@ openmamba Linux $1 openmamba-linux $1
FreeBSD $1 freebsd $1 $uname =~ /FreeBSD.*?\s([0-9]+\.[0-9\.]+)/i
# FreeBSD clones
-DragonFly BSD 1.0 freebsd 4.8 $uname =~ /DragonFly.*?\s1\.0A/i
-DragonFly BSD 1.2 freebsd 4.10 $uname =~ /DragonFly.*?\s1\.2A/i
+DragonFly $1 dragonfly $1 $uname =~ /DragonFly.*?\s([0-9\.]+)/i
# All OpenBSD versions
OpenBSD $1 openbsd $1 $uname =~ /OpenBSD.*?\s([0-9\.]+)/i
# All NetBSD versions
-NetBSD 1.5 netbsd 1.5 $uname =~ /NetBSD.*1\.5/i
-NetBSD 1.6 netbsd 1.6 $uname =~ /NetBSD.*1\.6/i
-NetBSD 2.0 netbsd 2.0 $uname =~ /NetBSD.*2\.0/i
-NetBSD 3.0 netbsd 3.0 $uname =~ /NetBSD.*3\.0/i
-NetBSD 4.0 netbsd 4.0 $uname =~ /NetBSD.*4\.0/i
-NetBSD $1 netbsd $1 `uname` =~ /NetBSD/ && `uname -r` =~ /([\d.]+)/
+NetBSD $1 netbsd $1 $uname =~ /NetBSD.*?\s([0-9\.]+)/i
# BSDI (may not be detected properly)
BSDI $1 freebsd $1 $uname =~ /BSDI.*\s([0-9\.]+)/i

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ae,v 1.5 2012/11/02 19:02:51 shattered Exp $
--- man/module.info.orig 2011-04-27 00:19:08.000000000 +0200
+++ man/module.info 2011-06-15 23:17:56.000000000 +0200
@@ -9,7 +9,7 @@
name=Man
desc_tr=Kýlavuz Sayfalar
desc_de=Systemdokumentation
-os_support=solaris corel-linux debian-linux open-linux redhat-linux mandrake-linux slackware-linux solaris suse-linux united-linux turbo-linux freebsd openbsd cobalt-linux lfs-linux irix aix hpux macos netbsd msc-linux osf1 generic-linux openserver gentoo-linux trustix-linux sol-linux coherent-linux openmamba-linux pardus-linux
+os_support=solaris corel-linux debian-linux open-linux redhat-linux mandrake-linux slackware-linux solaris suse-linux united-linux turbo-linux freebsd openbsd cobalt-linux lfs-linux irix aix hpux macos netbsd msc-linux osf1 generic-linux openserver gentoo-linux trustix-linux sol-linux coherent-linux openmamba-linux pardus-linux dragonfly
desc_sk=Systémová dokumentácia
desc_zh_CN=ʹÓÃÊÖ²á
risk=low medium high

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-af,v 1.3 2007/06/07 15:13:47 obache Exp $
--- servers/servers-lib.pl.orig 2007-06-01 01:21:09.000000000 +0000
+++ servers/servers-lib.pl
@@ -188,6 +188,7 @@ else {
# Other operating systems
[ 'freebsd', 'FreeBSD', 'freebsd' ],
+ [ 'dragonfly', 'DragonFly', 'dragonfly' ],
[ 'solaris', 'Solaris', 'solaris' ],
[ 'hpux', 'HP/UX', 'hpux' ],
[ 'sco', 'SCO', '(openserver|unixware)' ],

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ag,v 1.4 2012/11/02 19:02:51 shattered Exp $
--- proc/module.info.orig 2012-01-22 00:47:19.000000000 +0000
+++ proc/module.info
@@ -12,7 +12,7 @@ desc_ko_KR.UTF-8=鞁ろ枆欷戩澑 頂勲<E9A082>靹胳
name=Process Manager
desc_tr=莂l<E88E82>an S黵e鏻er
desc_de=Laufende Prozesse
-os_support=solaris *-linux hpux freebsd osf1 irix unixware openserver macos aix netbsd openbsd windows
+os_support=solaris *-linux hpux freebsd osf1 irix unixware openserver macos aix netbsd openbsd windows dragonfly
desc_zh_CN=进程管理器
risk=medium high
desc_pl.UTF-8=Dzia艂aj膮ce procesy

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ah,v 1.5 2012/11/02 19:02:51 shattered Exp $
--- cron/module.info.orig 2011-04-27 00:19:08.000000000 +0200
+++ cron/module.info 2011-06-15 23:19:12.000000000 +0200
@@ -10,7 +10,7 @@
name=Cron Manager
desc_tr=Zamanlandýrýlmýþ Görevler
desc_de=Geplante Auftr&#228;ge (Cron)
-os_support=solaris slackware-linux redhat-linux mandrake-linux debian-linux suse-linux united-linux hpux freebsd osf1 irix unixware openserver macos open-linux turbo-linux openbsd corel-linux cobalt-linux aix netbsd msc-linux generic-linux gentoo-linux trustix-linux sol-linux coherent-linux openmamba-linux windows pardus-linux
+os_support=solaris slackware-linux redhat-linux mandrake-linux debian-linux suse-linux united-linux hpux freebsd osf1 irix unixware openserver macos open-linux turbo-linux openbsd corel-linux cobalt-linux aix netbsd msc-linux generic-linux gentoo-linux trustix-linux sol-linux coherent-linux openmamba-linux windows pardus-linux dragonfly
desc_sk=Cron Plánovaè úloh
desc_zh_CN=Cron ÈÎÎñµ÷¶È
risk=low medium high

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-ai,v 1.5 2012/11/02 19:02:51 shattered Exp $
--- init/module.info.orig 2011-04-27 00:19:08.000000000 +0200
+++ init/module.info 2011-06-15 23:20:14.000000000 +0200
@@ -10,7 +10,7 @@
name=Boot Manager
desc_tr=Açýlýþ ve Kapanýþ
desc_de=System-Start und -Stop
-os_support=solaris coherent-linux redhat-linux mandrake-linux debian-linux suse-linux united-linux hpux slackware-linux freebsd unixware openserver open-linux turbo-linux openbsd corel-linux cobalt-linux cobalt-linux osf1 irix aix macos netbsd msc-linux generic-linux trustix-linux gentoo-linux openmamba-linux windows pardus-linux
+os_support=solaris coherent-linux redhat-linux mandrake-linux debian-linux suse-linux united-linux hpux slackware-linux freebsd unixware openserver open-linux turbo-linux openbsd corel-linux cobalt-linux cobalt-linux osf1 irix aix macos netbsd msc-linux generic-linux trustix-linux gentoo-linux openmamba-linux windows pardus-linux dragonfly
desc_sk=©tart a vypnutie
desc_zh_CN=Òýµ¼ºÍ¹Ø»ú
risk=low medium high

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ak,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- sendmail/mailq_search.cgi.orig 2007-09-21 23:26:27.000000000 +0200
+++ sendmail/mailq_search.cgi
@@ -18,7 +18,8 @@ $conf = &get_sendmailcf();
$fields = [ [ $in{'field'}, $in{'match'} ] ];
@qmails = grep { &mail_matches($fields, 1, $_) } @qmails;
print "<p><b>",&text($in{'field'} =~ /^\!/ ? 'search_results3' :
- 'search_results2', scalar(@qmails), "<tt>$in{'match'}</tt>"),"</b><p>\n";
+ 'search_results2', scalar(@qmails), "<tt>" .
+ &html_escape($in{'match'}) . "</tt>"),"</b><p>\n";
if (@qmails) {
%qmails = map { $_->{'file'}, $_ } @qmails;

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-al,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- file/search.cgi.orig 2007-09-21 23:26:33.000000000 +0200
+++ file/search.cgi
@@ -17,16 +17,16 @@ if ($in{'dir'} ne '/') {
}
$cmd = "find ".quotemeta(&unmake_chroot($in{'dir'}))." -name ".quotemeta($in{'match'});
if ($in{'type'}) {
- $cmd .= " -type $in{'type'}";
+ $cmd .= " -type " . quotemeta($in{'type'});
}
if ($in{'user'}) {
- $cmd .= " -user $in{'user'}";
+ $cmd .= " -user " . quotemeta($in{'user'});
}
if ($in{'group'}) {
- $cmd .= " -group $in{'group'}";
+ $cmd .= " -group " . quotemeta($in{'group'});
}
if ($in{'size'}) {
- $cmd .= " -size $in{'size'}";
+ $cmd .= " -size " . quotemeta($in{'size'});
}
if ($in{'xdev'}) {
$cmd .= " -mount";

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-am,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- mysql/search_form.cgi.orig 2007-09-21 23:26:42.000000000 +0200
+++ mysql/search_form.cgi
@@ -12,7 +12,8 @@ require './view-lib.pl';
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
@str = &table_structure($in{'db'}, $in{'table'});
-$desc = &text('table_header', "<tt>$in{'table'}</tt>", "<tt>$in{'db'}</tt>");
+$desc = &text('table_header', "<tt>" . &html_escape($in{'table'}) .
+ "</tt>", "<tt>" . &html_escape($in{'db'}) . "</tt>");
&ui_print_header($desc, $text{'adv_title'}, "");
print &ui_form_start("view_table.cgi", "post");
@@ -36,13 +37,13 @@ print "</table>\n";
print &ui_form_end([ [ "advanced", $text{'adv_ok'} ] ]);
if ($access{'edonly'}) {
- &ui_print_footer("edit_dbase.cgi?db=$in{'db'}",$text{'dbase_return'},
- "", $text{'index_return'});
+ &ui_print_footer("edit_dbase.cgi?db=" . &urlize($in{'db'}),
+ $text{'dbase_return'}, "", $text{'index_return'});
}
else {
- &ui_print_footer("edit_table.cgi?db=$in{'db'}&table=$in{'table'}",
- $text{'table_return'},
- "edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'},
- "", $text{'index_return'});
+ &ui_print_footer("edit_table.cgi?db=" . &urlize($in{'db'}) .
+ "&table=" . &urlize($in{'table'}), $text{'table_return'},
+ "edit_dbase.cgi?db=" . &urlize($in{'db'}),
+ $text{'dbase_return'}, "", $text{'index_return'});
}

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-an,v 1.2 2012/11/02 19:02:51 shattered Exp $
--- man/search.cgi.orig 2007-09-21 23:26:43.000000000 +0200
+++ man/search.cgi
@@ -255,7 +255,8 @@ if (@rv == 1 && !$in{'check'}) {
}
# Display search results
-$for = join($in{'and'} ? " and " : " or ", map { "<tt>$_</tt>" } @for);
+$for = join($in{'and'} ? " and " : " or ", map { "<tt>" . &html_escape($_) .
+ "</tt>" } @for);
&ui_print_header(&text('search_for', $for), $text{'search_title'}, "");
if (@rv) {
#@rv = sort { $b->[4] <=> $a->[4] } @rv;

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ao,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- postfix/mailq_search.cgi.orig 2007-09-21 23:26:52.000000000 +0200
+++ postfix/mailq_search.cgi
@@ -17,7 +17,8 @@ $neg = ($in{'field'} =~ s/^!//);
$neg ? !$r : $r } @qfiles;
print "<p><b>",&text($in{'field'} =~ /^\!/ ? 'search_results3' :
- 'search_results2', scalar(@qfiles), "<tt>$in{'match'}</tt>"),"</b><p>\n";
+ 'search_results2', scalar(@qfiles), "<tt>" .
+ &html_escape($in{'match'}) . "</tt>"),"</b><p>\n";
if (@qfiles) {
# Show matching messages
&mailq_table(\@qfiles);

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-ap,v 1.2 2012/11/02 19:02:51 shattered Exp $
--- webminlog/search.cgi.orig 2011-04-27 00:18:53.000000000 +0200
+++ webminlog/search.cgi 2011-06-15 23:34:38.000000000 +0200
@@ -147,7 +147,8 @@ elsif (@match) {
# Show search results in table
if ($in{'sid'}) {
print "<b>",&text('search_sid', "<tt>$match[0]->{'user'}</tt>",
- "<tt>$in{'sid'}</tt>")," ..</b><p>\n";
+ "<tt>" . &html_escape($in{'sid'}) . "</tt>"),
+ " ..</b><p>\n";
}
elsif ($in{'uall'} == 1 && $in{'mall'} && $in{'tall'}) {
print "<b>$text{'search_critall'} ..</b><p>\n";

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-aq,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- postgresql/old/search_form.cgi.orig 2007-09-21 23:26:53.000000000 +0200
+++ postgresql/old/search_form.cgi
@@ -6,7 +6,8 @@ require './postgresql-lib.pl';
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
@str = &table_structure($in{'db'}, $in{'table'});
-$desc = &text('table_header', "<tt>$in{'table'}</tt>", "<tt>$in{'db'}</tt>");
+$desc = &text('table_header', "<tt>" . &html_escape($in{'table'}) . "</tt>",
+ "<tt>" . &html_escape($in{'db'}) . "</tt>");
&ui_print_header($desc, $text{'adv_title'}, "");
print &ui_form_start("view_table.cgi", "post");
@@ -30,13 +31,13 @@ print "</table>\n";
print &ui_form_end([ [ "advanced", $text{'adv_ok'} ] ]);
if ($access{'edonly'}) {
- &ui_print_footer("edit_dbase.cgi?db=$in{'db'}",$text{'dbase_return'},
- "", $text{'index_return'});
+ &ui_print_footer("edit_dbase.cgi?db=" . &urlize($in{'db'}),
+ $text{'dbase_return'}, "", $text{'index_return'});
}
else {
- &ui_print_footer("edit_table.cgi?db=$in{'db'}&table=$in{'table'}",
- $text{'table_return'},
- "edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'},
- "", $text{'index_return'});
+ &ui_print_footer("edit_table.cgi?db=" . &urlize($in{'db'}) .
+ "&table=" . &urlize($in{'table'}), $text{'table_return'},
+ "edit_dbase.cgi?db=" . &urlize($in{'db'}),
+ $text{'dbase_return'}, "", $text{'index_return'});
}

View File

@@ -0,0 +1,34 @@
$NetBSD: patch-ar,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- postgresql/search_form.cgi.orig 2007-09-21 23:26:53.000000000 +0200
+++ postgresql/search_form.cgi
@@ -12,7 +12,8 @@ require './view-lib.pl';
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
@str = &table_structure($in{'db'}, $in{'table'});
-$desc = &text('table_header', "<tt>$in{'table'}</tt>", "<tt>$in{'db'}</tt>");
+$desc = &text('table_header', "<tt>" . &html_escape($in{'table'}) . "</tt>",
+ "<tt>" . &html_escape($in{'db'}) . "</tt>");
&ui_print_header($desc, $text{'adv_title'}, "");
print &ui_form_start("view_table.cgi", "post");
@@ -36,13 +37,13 @@ print "</table>\n";
print &ui_form_end([ [ "advanced", $text{'adv_ok'} ] ]);
if ($access{'edonly'}) {
- &ui_print_footer("edit_dbase.cgi?db=$in{'db'}",$text{'dbase_return'},
- "", $text{'index_return'});
+ &ui_print_footer("edit_dbase.cgi?db=" . &urlize($in{'db'}),
+ $text{'dbase_return'}, "", $text{'index_return'});
}
else {
- &ui_print_footer("edit_table.cgi?db=$in{'db'}&table=$in{'table'}",
- $text{'table_return'},
- "edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'},
- "", $text{'index_return'});
+ &ui_print_footer("edit_table.cgi?db=" . &urlize($in{'db'}) .
+ "&table=" . &urlize($in{'table'}), $text{'table_return'},
+ "edit_dbase.cgi?db=" . &urlize($in{'db'}),
+ $text{'dbase_return'}, "", $text{'index_return'});
}

View File

@@ -0,0 +1,36 @@
$NetBSD: patch-as,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- cluster-software/search.cgi.orig 2007-09-21 23:27:39.000000000 +0200
+++ cluster-software/search.cgi
@@ -29,7 +29,8 @@ if (@match == 1) {
&ui_print_header(undef, $text{'search_title'}, "", "search");
if (@match) {
@match = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @match;
- print "<b>",&text('search_match', "<tt>$s</tt>"),"</b><br>\n";
+ print "<b>",&text('search_match', "<tt>" . &html_escape($s) . "</tt>"),
+ "</b><br>\n";
print &ui_form_start("delete_packs.cgi", "post");
print &ui_hidden("search", $in{'search'}),"\n";
@@ -43,8 +44,9 @@ if (@match) {
$text{'search_desc'} ], 100, 0, \@tds);
foreach $i (@match) {
local @cols;
- push(@cols, "<a href=\"edit_pack.cgi?search=$s&package=".
- &urlize($i->{'name'})."\">$i->{'name'}</a>");
+ push(@cols, "<a href=\"edit_pack.cgi?search=" .
+ &urlize($s) . "&package=". &urlize($i->{'name'}) .
+ "\">$i->{'name'}</a>");
$c = $i->{'class'};
push(@cols, $i->{'class'} || $text{'search_none'});
push(@cols, $i->{'desc'});
@@ -62,7 +64,8 @@ if (@match) {
print &ui_form_end();
}
else {
- print "<b>",&text('search_nomatch', "<tt>$s</tt>"),"</b>\n";
+ print "<b>",&text('search_nomatch', "<tt>" . &html_escape($s) .
+ "</tt>"),"</b>\n";
}
&ui_print_footer("", $text{'index_return'});

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-au,v 1.1 2008/07/25 02:55:27 tonnerre Exp $
--- smf/search_instance.cgi.orig 2007-09-21 23:28:42.000000000 +0200
+++ smf/search_instance.cgi
@@ -34,7 +34,8 @@ print "</h2>";
print "<form method=\"POST\" action=\"search_instance.cgi\">\n";
print
- "<input size=60 name=\"searchstring\" value=\"$original_searchstring\">\n";
+ "<input size=60 name=\"searchstring\" value=\"" .
+ &html_escape($original_searchstring) . "\">\n";
&print_svc_chooser("searchstring", 0, "$text{'search_instance_browse'}",
"both", "0");
print "&nbsp;<input type=submit value=\"$text{'search_instance_go'}\">\n";

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-av,v 1.2 2012/11/02 19:02:51 shattered Exp $
--- ldap-useradmin/search_user.cgi.orig 2011-04-27 00:19:01.000000000 +0200
+++ ldap-useradmin/search_user.cgi 2011-06-15 23:36:01.000000000 +0200
@@ -24,8 +24,8 @@ elsif ($in{'match'} == 3) {
$rv = $ldap->search(base => $base,
filter => "(&".&user_filter().$search.")");
if ($rv->code) {
- &error(&text('search_err', "<tt>$search</tt>",
- "<tt>$base</tt>", $rv->error));
+ &error(&text('search_err', "<tt>" . &html_escape($search) . "</tt>",
+ "<tt>" . &html_escape($base) . "</tt>", $rv->error));
}
@users = $rv->all_entries;

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-aw,v 1.2 2012/11/02 19:02:51 shattered Exp $
--- ldap-useradmin/search_group.cgi.orig 2011-04-27 00:19:01.000000000 +0200
+++ ldap-useradmin/search_group.cgi 2011-06-15 23:37:06.000000000 +0200
@@ -24,8 +24,8 @@ elsif ($in{'match'} == 3) {
$rv = $ldap->search(base => $base,
filter => "(&".&group_filter().$search.")");
if ($rv->code) {
- &error(&text('search_err', "<tt>$search</tt>",
- "<tt>$base</tt>", $rv->error));
+ &error(&text('search_err', "<tt>" . &html_escape($search) . "</tt>",
+ "<tt>" . &html_escape($base) . "</tt>", $rv->error));
}
@groups = $rv->all_entries;

View File

@@ -0,0 +1,49 @@
$NetBSD: patch-ax,v 1.2 2012/11/02 19:02:51 shattered Exp $
--- htaccess-htpasswd/search.cgi.orig 2011-04-27 00:19:02.000000000 +0200
+++ htaccess-htpasswd/search.cgi 2011-06-15 23:23:42.000000000 +0200
@@ -19,7 +19,8 @@
@dirs = &list_directories();
%got = map { ( "$_->[0]/$config{'htaccess'}", 1 ) } @dirs;
-print "<b>",&text('search_doing', "<tt>$in{'search'}</tt>"),"</b><p>\n";
+print "<b>",&text('search_doing', "<tt>" . &html_escape($in{'search'}) .
+ "</tt>"), "</b><p>\n";
# Use the find command
&switch_user();
@@ -28,10 +29,12 @@
while($f = <FIND>) {
chop($f);
if ($got{$f}) {
- print &text('search_already', "<tt>$f</tt>"),"<br>\n";
+ print &text('search_already', "<tt>" . &html_escape($f) .
+ "</tt>"),"<br>\n";
}
elsif (!open(TEST, $f)) {
- print &text('search_open', "<tt>$f</tt>", $!),"<br>\n";
+ print &text('search_open', "<tt>" . &html_escape($f) . "</tt>",
+ $!),"<br>\n";
}
else {
$conf = &foreign_call($apachemod, "get_htaccess_config", $f);
@@ -40,14 +43,16 @@
$require = &foreign_call($apachemod, "find_directive",
"require", $conf, 1);
if ($currfile && $require) {
- print &text('search_found', "<tt>$f</tt>",
- "<tt>$currfile</tt>"),"<br>\n";
+ print &text('search_found', "<tt>" . &html_escape($f) .
+ "</tt>", "<tt>" . &html_escape($currfile) .
+ "</tt>"),"<br>\n";
local $d = $f;
$d =~ s/\/$config{'htaccess'}$//;
push(@dirs, [ $d, $currfile ]);
}
else {
- print &text('search_noprot', "<tt>$f</tt>"),"<br>\n";
+ print &text('search_noprot', "<tt>" .
+ &html_escape($f) . "</tt>"),"<br>\n";
}
}
}

View File

@@ -0,0 +1,53 @@
$NetBSD: patch-ay,v 1.3 2012/11/02 19:02:51 shattered Exp $
--- mailboxes/mail_search.cgi.orig 2012-06-29 22:31:50.000000000 +0000
+++ mailboxes/mail_search.cgi
@@ -46,7 +46,8 @@ if ($in{'simple'}) {
@searchlist = ( [ $field, $what ] );
@rv = &mailbox_search_mail(\@searchlist, 0, $folder);
print "<p><b>",&text('search_results5', scalar(@rv),
- "<tt>$field</tt>", "<tt>$what</tt>")," ..</b><p>\n";
+ "<tt>" . &html_escape($field) . "</tt>", "<tt>" .
+ &html_escape($what) . "</tt>")," ..</b><p>\n";
}
else {
# Just search by Subject and From in one folder
@@ -73,7 +74,8 @@ if ($in{'simple'}) {
&error($text{'search_eboolean'});
}
print "<p><b>",&text('search_results2', scalar(@rv),
- "<tt>$in{'search'}</tt>")," ..</b><p>\n";
+ "<tt>" . &html_escape($in{'search'}) .
+ "</tt>")," ..</b><p>\n";
}
foreach $mail (@rv) {
$mail->{'folder'} = $folder;
@@ -106,9 +108,9 @@ else {
# Show list of messages, with form
if (@rv) {
print &ui_form_start("delete_mail.cgi", "post");
- print &ui_hidden("user", $in{'user'});
- print &ui_hidden("dom", $in{'dom'});
- print &ui_hidden("folder", $in{'folder'});
+ print &ui_hidden("user", &html_escape($in{'user'}));
+ print &ui_hidden("dom", &html_escape($in{'folder'}));
+ print &ui_hidden("folder", &html_escape($in{'folder'}));
if ($config{'top_buttons'} && !$multi_folder) {
&show_buttons(1, \@folders, $folder, \@rv, $in{'user'}, 1);
}
@@ -121,10 +123,10 @@ if (@rv) {
else {
print "<b>$text{'search_none'}</b> <p>\n";
}
-
-&ui_print_footer($in{'simple'} ? ( ) : ( "search_form.cgi?folder=$in{'folder'}",
- $text{'sform_return'} ),
- "list_mail.cgi?user=$in{'user'}&folder=$in{'folder'}&dom=$in{'dom'}",
- $text{'mail_return'},
+
+&ui_print_footer($in{'simple'} ? ( ) : ( "search_form.cgi?folder=" .
+ &urlize($in{'folder'}), $text{'sform_return'} ),
+ "list_mail.cgi?user=" . &urlize($in{'user'}) . "&folder=" .
+ &urlize($in{'folder'}) . "&dom=" . &urlize($in{'dom'}), $text{'mail_return'},
&user_list_link(), $text{'index_return'});

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-az,v 1.3 2012/11/02 19:02:51 shattered Exp $
--- mailboxes/search_form.cgi.orig 2012-06-29 22:31:51.000000000 +0000
+++ mailboxes/search_form.cgi
@@ -13,9 +13,9 @@ require './mailboxes-lib.pl';
# Start of form
print &ui_form_start("mail_search.cgi");
-print &ui_hidden("user", $in{'user'});
-print &ui_hidden("dom", $in{'dom'});
-print &ui_hidden("ofolder", $in{'folder'});
+print &ui_hidden("user", &html_escape($in{'user'}));
+print &ui_hidden("dom", &html_escape($in{'user'}));
+print &ui_hidden("ofolder", &html_escape($in{'folder'}));
print &ui_table_start($text{'sform_header'}, "width=100%", 2);
# And/or mode
@@ -54,7 +54,7 @@ print &ui_table_row($text{'sform_folder2
print &ui_table_end();
print &ui_form_end([ [ undef, $text{'sform_ok'} ] ]);
-&ui_print_footer("list_mail.cgi?folder=$in{'folder'}&user=".
- &urlize($in{'user'})."&dom=$in{'dom'}", $text{'mail_return'},
+&ui_print_footer("list_mail.cgi?folder=" . &urlize($in{'folder'}) . "&user=".
+ &urlize($in{'user'})."&dom=".&urlize($in{'dom'}), $text{'mail_return'},
&user_list_link(), $text{'index_return'});

View File

@@ -0,0 +1,3 @@
# $NetBSD: version.mk,v 1.6 2012/11/02 19:02:50 shattered Exp $
WBM_VERSION= 1.600

98
sysutils/webmin/wbm.mk Normal file
View File

@@ -0,0 +1,98 @@
# $NetBSD: wbm.mk,v 1.11 2012/11/02 19:02:50 shattered Exp $
#
# Makefile fragment for Webmin modules
#
# Then following variables may be set prior to including this file:
#
# WBM_NAME Module name.
#
# WBM_STD_MODULE if "YES", then this package provided as standard
# module. defaults to "YES".
#
# WBM_MOD_REV Updated revision number since the each release.
# Updated modules are taken from following URL:
# http://www.webmin.com/updates.html
#
# WBM_DEPEND_MODULES Depending webmin modules.
#
.include "version.mk"
WBM_STD_MODULE?=YES
.if defined(WBM_MOD_REV) && !empty(WBM_MOD_REV) || !empty(WBM_STD_MODULE:M[Nn][Oo])
PKGNAME?= wbm-${WBM_NAME}-${WBM_VERSION:S/0$/${WBM_MOD_REV}/}
DISTNAME?= ${WBM_NAME}-${WBM_VERSION}-${WBM_MOD_REV}
MASTER_SITES?= http://www.webmin.com/updates/
EXTRACT_SUFX?= .wbm.gz
EXTRACT_OPTS+= -f tar
WRKSRC?= ${WRKDIR}
WBMSRC= ${WRKDIR}/${WBM_NAME}
.else
PKGNAME= wbm-${WBM_NAME}-${WBM_VERSION}
DISTNAME= webmin-${WBM_VERSION}
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=webadmin/}
WBMSRC= ${WRKSRC}/${WBM_NAME}
EXTRACT_ELEMENTS=${DISTNAME}/${WBM_NAME}
.endif
CATEGORIES+= sysutils www
MAINTAINER?= pkgsrc-users@NetBSD.org
HOMEPAGE?= http://www.webmin.com/standard.html
USE_TOOLS+= perl:run perl
DEPENDS+= webmin>=${WBM_VERSION}:../../sysutils/webmin
.for m in ${WBM_DEPEND_MODULES}
DEPENDS+= wbm-${m}>=${WBM_VERSION}:../../sysutils/wbm-${m}
.endfor
EVAL_PREFIX+= PREFIX.webmin=webmin
WEBMIN_DIR= ${PREFIX.webmin}/share/webmin
WEBMIN_EGDIR= ${PREFIX.webmin}/share/examples/webmin
WEBMIN_VARDIR= ${VARBASE}/webmin
WBM_DIR= ${PREFIX}/share/webmin
WBM_EGDIR= ${PREFIX}/share/examples/webmin
PKG_SYSCONFSUBDIR= webmin
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${WBM_NAME} \
${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
CONF_FILES_PERMS+= ${WBM_EGDIR}/${WBM_NAME}/config \
${PKG_SYSCONFDIR}/${WBM_NAME}/config \
${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0600
FILES_SUBST+= WBM_NAME=${WBM_NAME:Q}
FILES_SUBST+= WEBMIN_DIR=${WEBMIN_DIR:Q}
FILES_SUBST+= WEBMIN_VARDIR=${WEBMIN_VARDIR:Q}
BUILD_DEFS+= VARBASE
INSTALL_TEMPLATES+= ${PKGSRCDIR}/sysutils/webmin/files/wbm-install.tmpl
DEINSTALL_TEMPLATES+= ${PKGSRCDIR}/sysutils/webmin/files/wbm-deinstall.tmpl
# WBM_NAME is the name of the module directory
WBM_NAME?= ${DISTNAME}
WEBMIN_OSTYPE_cmd= ${AWK} '/^os_type=/ {sub("os_type=",""); print}' \
${WEBMIN_EGDIR}/config
WEBMIN_OSVERSION_cmd= ${AWK} '/^os_version=/ {sub("os_version=",""); print}' \
${WEBMIN_EGDIR}/config
.PHONY: wbm-configure wbm-build wbm-install
wbm-configure:
${FIND} ${WBMSRC} -name "*.orig" -print | ${XARGS} ${RM} -f
wbm-build:
${FIND} ${WBMSRC} -name '*.cgi' -print -o -name '*.pl' -print | \
${PERL5} ${WEBMIN_DIR}/perlpath.pl ${PERL5} -
INSTALLATION_DIRS+= ${WBM_DIR} ${WBM_EGDIR}
wbm-install:
${CP} -R ${WBMSRC} ${DESTDIR}${WBM_DIR}/.
${PERL5} ${WEBMIN_DIR}/copyconfig.pl \
${WEBMIN_OSTYPE_cmd:sh:Q} ${WEBMIN_OSVERSION_cmd:sh:Q:S/^$/''/}\
${DESTDIR}${WBM_DIR} ${DESTDIR}${WBM_EGDIR} ${WBM_NAME}
do-configure: wbm-configure
do-build: wbm-build
do-install: wbm-install