Reset umask before touching the chroot.

This prevents problems when running with a umask that masks permissions
for others.

Signed-off-by: Byron Clark <byron@theclarkfamily.name>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Byron Clark 2010-01-11 10:25:43 -08:00 committed by Aaron Griffin
parent a7d88845a8
commit 7ce9cd6965
2 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,7 @@ if [ ! -d "$chrootdir/root" ]; then
usage
fi
umask 000
[ -d "$chrootdir/$LAYER" -a "$clean_first" -eq "1" ] && rm -rf "$chrootdir/$LAYER/"
[ -d "$chrootdir/$LAYER" ] || mkdir "$chrootdir/$LAYER"
[ -d "$chrootdir/union" ] || mkdir "$chrootdir/union"

View File

@ -107,6 +107,7 @@ chroot_umount ()
}
# }}}
umask 000
if [ "$RUN" != "" ]; then
# run chroot {{{
#Sanity check