misc/173483: NanoBSD initialises /cfg incorrectly (wrong permissions)
Nick Hibma
nick at anywi.com
Thu Nov 8 20:30:01 UTC 2012
>Number: 173483
>Category: misc
>Synopsis: NanoBSD initialises /cfg incorrectly (wrong permissions)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 08 20:30:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Nick Hibma
>Release: 8.3-RELEASE
>Organization:
AnyWi Technologies
>Environment:
System: FreeBSD bitske2.localdomain 8.3-RELEASE FreeBSD 8.3-RELEASE #0 r242660: Tue Nov 6 16:23:23 CET 2012 root at bitske2.localdomain:/usr/obj/usr/src/sys/GENERIC i386
>Description:
/cfg is initialised from /var/empty in NANO_CFGDIR is unset. This also copies
the 0555 permissions from this dir to /cfg.
>How-To-Repeat:
Build an image using NanoBSD with NANO_CFGDIR="" .
>Fix:
Index: nanobsd.sh
===================================================================
--- nanobsd.sh (revision 12226)
+++ nanobsd.sh (working copy)
@@ -413,12 +413,13 @@
dir=$2
mnt=$3
lbl=$4
- test -z $2 && dir=${NANO_WORLDDIR}/var/empty
- test -d $dir || dir=${NANO_WORLDDIR}/var/empty
- echo "Creating ${dev} with ${dir} (mounting on ${mnt})"
- newfs_part $dev $mnt $lbl
- cd ${dir}
- find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
+ echo "Creating ${dev} (mounting on ${mnt})"
+ newfs_part ${dev} ${mnt} ${lbl}
+ if [ -n "${dir}" -a -d "${dir}" ]; then
+ echo "Populating ${lbl} from ${dir}"
+ cd ${dir}
+ find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
+ fi
df -i ${mnt}
umount ${mnt}
)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list