aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2004-09-16 01:19:53 +0800
committerolgeni <olgeni@FreeBSD.org>2004-09-16 01:19:53 +0800
commit6a31f7372c1935c63140589ebfce95c68b3a04e3 (patch)
tree804fbaa253d913bb4ad1b6656488d57d0a866534 /sysutils
parent81f8a6911e3e326fac865c07945d9386f2c3ed27 (diff)
downloadfreebsd-ports-gnome-6a31f7372c1935c63140589ebfce95c68b3a04e3.tar.gz
freebsd-ports-gnome-6a31f7372c1935c63140589ebfce95c68b3a04e3.tar.zst
freebsd-ports-gnome-6a31f7372c1935c63140589ebfce95c68b3a04e3.zip
Backport security fix from version 1.160.
VuXML entry: ae7b7f65-05c7-11d9-b45d-000c41e2cdad. Approved by: portmgr
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/webmin/Makefile2
-rw-r--r--sysutils/webmin/files/patch-maketemp.pl34
2 files changed, 35 insertions, 1 deletions
diff --git a/sysutils/webmin/Makefile b/sysutils/webmin/Makefile
index e989697fe307..ee033e6eea91 100644
--- a/sysutils/webmin/Makefile
+++ b/sysutils/webmin/Makefile
@@ -7,7 +7,7 @@
PORTNAME= webmin
PORTVERSION= 1.150
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= sysutils
MASTER_SITES= http://www.webmin.com/updates/ \
${MASTER_SITE_SOURCEFORGE}
diff --git a/sysutils/webmin/files/patch-maketemp.pl b/sysutils/webmin/files/patch-maketemp.pl
new file mode 100644
index 000000000000..286cb8942e5a
--- /dev/null
+++ b/sysutils/webmin/files/patch-maketemp.pl
@@ -0,0 +1,34 @@
+
+$FreeBSD$
+
+--- maketemp.pl.orig Wed Sep 15 00:00:08 2004
++++ maketemp.pl Wed Sep 15 00:00:19 2004
+@@ -3,17 +3,16 @@
+
+ $tmp_dir = $ENV{'tempdir'} || "/tmp/.webmin";
+
+-if (!-d $tmp_dir) {
+- mkdir($tmp_dir, 0755) || exit 1;
+- }
+-chown($<, $(, $tmp_dir);
+-chmod(0755, $tmp_dir);
+-@st = lstat($tmp_dir);
+-if (@st && $st[4] == $< && (-d _) &&
+- ($st[2] & 0777) == 0755) {
+- exit 0;
+- }
+-else {
+- exit 1;
++while($tries++ < 10) {
++ local @st = lstat($tmp_dir);
++ exit(0) if ($st[4] == $< && (-d _) && ($st[2] & 0777) == 0755);
++ if (@st) {
++ unlink($tmp_dir) || rmdir($tmp_dir) ||
++ system("/bin/rm -rf ".quotemeta($tmp_dir));
++ }
++ mkdir($tmp_dir, 0755) || next;
++ chown($<, $(, $tmp_dir);
++ chmod(0755, $tmp_dir);
+ }
++exit(1);
+