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
+136
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
+13
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
+32
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'});
+28
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
+13
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
+12
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)' ],
+13
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=鞁ろ枆欷戩澑 頂勲�靹胳
name=Process Manager
desc_tr=莂l�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
+13
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
+13
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
+14
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;
+25
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";
+34
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'});
}
+14
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;
+14
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);
+14
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";
+34
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'});
}
+34
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'});
}
+36
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'});
+14
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";
+15
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;
+15
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;
+49
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";
}
}
}
+53
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'});
+27
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'});