Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/scripts/entropy
Show All 20 Lines | |||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
# SUCH DAMAGE. | # SUCH DAMAGE. | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
dd if=/dev/random of=$BSDINSTALL_CHROOT/entropy bs=4096 count=1 | umask 077 | ||||
for i in /entropy /boot/entropy; do | |||||
i="$BSDINSTALL_CHROOT/$i" | |||||
dd if=/dev/random of="$i" bs=4096 count=1 | |||||
delphij: Instead of this can we just do umask 077 before the dd and umask 022 after it? | |||||
Done Inline Actionshmm.. We should just do umask 077 and not restore after.. I just confirmed w/ dteske that these scripts are executed, not sourced. jmg: hmm.. We should just do umask 077 and not restore after.. I just confirmed w/ dteske that… | |||||
chown 0:0 "$i" | |||||
done | |||||
Done Inline ActionsThe double quotes are superfluous, but not a particularly big deal. markm: The double quotes are superfluous, but not a particularly big deal. | |||||
Done Inline Actionsonly if BSDINSTALL_CHROOT is guaranteed to never have spaces in it, and as this is passed in externally, I prefer not to make that assumption. jmg: only if BSDINSTALL_CHROOT is guaranteed to never have spaces in it, and as this is passed in… |
Instead of this can we just do umask 077 before the dd and umask 022 after it?