Merge lp:~wiebe-halfgaar/ecryptfs/1539553 into lp:ecryptfs

Proposed by halfgaar
Status: Needs review
Proposed branch: lp:~wiebe-halfgaar/ecryptfs/1539553
Merge into: lp:ecryptfs
Diff against target: 12 lines (+1/-1)
1 file modified
src/utils/ecryptfs-setup-private (+1/-1)
To merge this branch: bzr merge lp:~wiebe-halfgaar/ecryptfs/1539553
Reviewer Review Type Date Requested Status
Tyler Hicks Needs Fixing
Review via email: mp+284437@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for the merge request. Unfortunately, this approach will not work because the shebang line is #!/bin/sh and PIPESTATUS is a bash'ism. In other words, this causes a regression if /bin/sh is dash instead of bash.

review: Needs Fixing

Unmerged revisions

874. By Wiebe Cazemier <email address hidden>

LP: #1539553

Error handling reading /dev/urandom fixed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/utils/ecryptfs-setup-private'
2--- src/utils/ecryptfs-setup-private 2015-02-10 19:10:36 +0000
3+++ src/utils/ecryptfs-setup-private 2016-01-29 11:55:53 +0000
4@@ -440,7 +440,7 @@
5 printf "%s" "$MOUNTPASS" | ecryptfs-add-passphrase $FNEK -
6 /sbin/mount.ecryptfs_private || error "$(gettext 'Could not mount private ecryptfs directory')"
7 temp=`mktemp "$MOUNTPOINT/ecryptfs.test.XXXXXX"` || error_testing "$temp" "$(gettext 'Could not create empty file')"
8-random_data=`head -c 16000 /dev/urandom | od -x` || error_testing "$temp" "$(gettext 'Could not generate random data')"
9+random_data=`head -c 16000 /dev/urandom | od -x && [ "${PIPESTATUS[0]}" -eq 0 ]` || error_testing "$temp" "$(gettext 'Could not generate random data')"
10 echo "$random_data" > "$temp" || error_testing "$temp" "$(gettext 'Could not write encrypted file')"
11 md5sum1=`md5sum "$temp"` || error_testing "$temp" "$(gettext 'Could not read encrypted file')"
12 /sbin/umount.ecryptfs_private || error_testing "$temp" "$(gettext 'Could not unmount private ecryptfs directory')"

Subscribers

People subscribed via source and target branches