info zfs-utils-2.1.9-alt1.x86_64 The test discovered scripts with errors which may be used by a user for damaging important system files. For example if a script uses in its work a temp file which is created in /tmp directory, then every user can create symlinks with the same name (pattern) in this directory in order to destroy or rewrite some system or another user's files. Scripts _must_ _use_ mktemp/tempfile or must use $TMPDIR. mktemp/tempfile is safest. $TMPDIR is safer than /tmp/ because libpam-tmpdir creates a subdirectory of /tmp that is only accessible by that user, and then sets TMPDIR and other variables to that. Hence, it doesn't matter nearly as much if you create a non-random filename, because nobody but you can access it. Found error in /usr/share/doc/zfs-utils-2.1.9/examples/zpool_get_005_pos.ksh: $ grep /tmp/ /usr/share/doc/zfs-utils-2.1.9/examples/zpool_get_005_pos.ksh typeset i=0 while [[ $i ]]; do log_note "Checking for parsable ${properties[$i]} property" log_must eval "zpool get ${properties[$i]} $TESTPOOL >/tmp/value.$$" grep "${properties[$i]}" /tmp/value.$$ >/dev/null 2>&1 if [[ $? 0 ]]; then log_fail "${properties[$i]} not seen in output" fi typeset v=$(grep "${properties[$i]}" /tmp/value.$$ | awk '{print $3}') log_note "${properties[$i]} has a value of $v" # Determine if this value is a valid number, result in return code log_must test "$v" fi i=$(( $i + 1 )) done rm /tmp/value.$$ log_pass "Zpool get returns parsable values for all known parsable properties" Found error in /usr/share/doc/zfs-utils-2.1.9/examples/xattr_004_pos.ksh: $ grep -A5 -B5 /tmp/ /usr/share/doc/zfs-utils-2.1.9/examples/xattr_004_pos.ksh # we need to be able to create zvols to hold our test ufs|ext filesystem. verify_runnable "global" # Make sure we clean up properly function cleanup { if ismounted /tmp/$NEWFS_DEFAULT_FS.$$ $NEWFS_DEFAULT_FS; then log_must umount /tmp/$NEWFS_DEFAULT_FS.$$ log_must rm -rf /tmp/$NEWFS_DEFAULT_FS.$$ fi } log_assert "Files from $NEWFS_DEFAULT_FS with xattrs copied to zfs retain xattr info." log_onexit cleanup -- # Create a ufs|ext file system that we can work in log_must zfs create -V128m $TESTPOOL/$TESTFS/zvol block_device_wait log_must eval "new_fs $ZVOL_DEVDIR/$TESTPOOL/$TESTFS/zvol > /dev/null 2>&1" log_must mkdir /tmp/$NEWFS_DEFAULT_FS.$$ if is_illumos; then log_must mount $ZVOL_DEVDIR/$TESTPOOL/$TESTFS/zvol \ /tmp/$NEWFS_DEFAULT_FS.$$ # Create files in ufs, and set some xattrs on them. log_must touch /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ log_must runat /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ \ cp /etc/passwd . # copy those files to ZFS log_must cp -@ /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ \ $TESTDIR # ensure the xattr information has been copied correctly log_must runat $TESTDIR/$NEWFS_DEFAULT_FS-file.$$ \ diff passwd /etc/passwd log_must umount /tmp/$NEWFS_DEFAULT_FS.$$ else if is_linux; then options="-o user_xattr" fi log_must mount ${options:+""} \ $ZVOL_DEVDIR/$TESTPOOL/$TESTFS/zvol /tmp/$NEWFS_DEFAULT_FS.$$ # Create files in ext, and set some xattrs on them. # Use small values for xattrs for ext compatibility. log_must touch /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ echo "TEST XATTR" >/tmp/xattr1 log_must set_xattr_stdin xattr1 \ /tmp/$NEWFS_DEFAULT_FS.$$/$NEWFS_DEFAULT_FS-file.$$ /tmp/xattr1.$$" log_must diff /tmp/xattr1.$$ /tmp/xattr1 log_must rm $TESTDIR/$NEWFS_DEFAULT_FS-file.$$ log_must rm /tmp/xattr1 /tmp/xattr1.$$ log_must umount /tmp/$NEWFS_DEFAULT_FS.$$ fi log_pass "Files from $NEWFS_DEFAULT_FS with xattrs copied to zfs retain xattr info.";