tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
A fix for pkgtools/mksandbox
Kia ora,
Can I commit the following patch to pkgtools/mksandbox during the pkgsrc
freeze?
Without this patch security/sudo will build a defective binary when
built in a sandbox. The resulting sudo program crashes when trying to
record the fact that the user has accepted the sudo lecture.
I have no idea how much of our published packages get built in a
sandbox, but I'm guessing not much because nobody has noticed this sudo
problem before.
I have tested this patch on NetBSD and Linux.
Ngā mihi,
Lloyd
--------------------------8<---------------------------
cvs diff: Diffing .
Index: Makefile
===================================================================
RCS file: /vol/source/cvs/mirror/pkgsrc/pkgtools/mksandbox/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile 5 Dec 2023 20:45:27 -0000 1.19
+++ Makefile 16 Dec 2025 21:09:29 -0000
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.18 2023/08/31 20:14:35 triaxx Exp $
-PKGNAME= mksandbox-1.11
+PKGNAME= mksandbox-1.12
CATEGORIES= pkgtools
MAINTAINER= agc%NetBSD.org@localhost
cvs diff: Diffing files
Index: files/mksandbox
===================================================================
RCS file: /vol/source/cvs/mirror/pkgsrc/pkgtools/mksandbox/files/mksandbox,v
retrieving revision 1.20
diff -u -r1.20 mksandbox
--- files/mksandbox 21 Apr 2025 21:11:41 -0000 1.20
+++ files/mksandbox 16 Dec 2025 21:07:44 -0000
@@ -181,6 +181,14 @@
;;
esac
+for vardir in /var/db /var/lib /var/adm /usr/adm; do
+ if test -d "$vardir"; then
+ sandboxEmptyDirs="$sandboxEmptyDirs $vardir"
+ break
+ fi
+done
+
+
while [ $# -gt 0 ]; do
case "$1" in
--mounthost=*) mounthost=`echo $1 | $sedprog -e
's|^--mounthost=||'` ;;
Home |
Main Index |
Thread Index |
Old Index