~ecryptfs/ecryptfs/trunk

« back to all changes in this revision

Viewing changes to src/utils/ecryptfs-setup-private

  • Committer: Dustin Kirkland
  • Date: 2011-03-08 11:22:02 UTC
  • Revision ID: kirkland@ubuntu.com-20110308112202-yecdkxodji7p1qos
* src/utils/ecryptfs-setup-private:
  - add -p to mkdir, address noise for a non-error
  - must insert keys during testing phase, since we remove keys on
    unmount now, LP: #725862

Show diffs side-by-side

added added

removed removed

Lines of Context:
437
437
 
438
438
# Now let's perform some basic mount/write/umount/read sanity testing...
439
439
echo "$(gettext 'Testing mount/write/umount/read...')"
 
440
printf "%s" "$MOUNTPASS" | ecryptfs-add-passphrase $FNEK -
440
441
/sbin/mount.ecryptfs_private || error "$(gettext 'Could not mount private ecryptfs directory')"
441
442
temp=`mktemp "$MOUNTPOINT/ecryptfs.test.XXXXXX"` || error_testing "$temp" "$(gettext 'Could not create empty file')"
442
443
random_data=`head -c 16000 /dev/urandom | od -x` || error_testing "$temp" "$(gettext 'Could not generate random data')"
443
444
echo "$random_data" > "$temp" || error_testing "$temp" "$(gettext 'Could not write encrypted file')"
444
445
md5sum1=`md5sum "$temp"` || error_testing "$temp" "$(gettext 'Could not read encrypted file')"
445
446
/sbin/umount.ecryptfs_private || error_testing "$temp" "$(gettext 'Could not unmount private ecryptfs directory')"
 
447
printf "%s" "$MOUNTPASS" | ecryptfs-add-passphrase $FNEK -
446
448
/sbin/mount.ecryptfs_private || error_testing "$temp" "$(gettext 'Could not mount private ecryptfs directory (2)')"
447
449
md5sum2=`md5sum "$temp"` || error_testing "$temp" "$(gettext 'Could not read encrypted file (2)')"
448
450
rm -f "$temp"