Merge lp:~tyhicks/ecryptfs/rewrap-passphrase-cleanups into lp:ecryptfs
Proposed by
Tyler Hicks
Status: | Merged |
---|---|
Approved by: | Colin Ian King |
Approved revision: | 782 |
Merged at revision: | 779 |
Proposed branch: | lp:~tyhicks/ecryptfs/rewrap-passphrase-cleanups |
Merge into: | lp:ecryptfs |
Diff against target: |
65 lines (+19/-6) 2 files modified
debian/changelog (+5/-0) src/utils/ecryptfs_rewrap_passphrase.c (+14/-6) |
To merge this branch: | bzr merge lp:~tyhicks/ecryptfs/rewrap-passphrase-cleanups |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
eCryptfs | Pending | ||
Review via email: mp+171912@code.launchpad.net |
Description of the change
Fixes minor segfault in ecryptfs-
To post a comment you must log in.
Review: Approve
On Jun 27, 2013 2:58 PM, "Tyler Hicks" <email address hidden> wrote:
> Tyler Hicks has proposed merging /code.launchpad .net/~tyhicks/ ecryptfs/ rewrap- passphrase- cleanups/ +merge/ 171912 rewrap- passphrase, as well as a bit of /code.launchpad .net/~tyhicks/ ecryptfs/ rewrap- passphrase- cleanups/ +merge/ 171912 ecryptfs_ rewrap_ passphrase. c: rewrap- passphrase if there was an error while reading ecryptfs- setup-swap: LP: #1172014 ecryptfs_ rewrap_ passphrase. c' ecryptfs_ rewrap_ passphrase. c 2011-12-13 20:51:40 +0000 ecryptfs_ rewrap_ passphrase. c 2013-06-27 20:57:33 +0000 ECRYPTFS_ MAX_PASSWORD_ LENGTH + 1]; passphrase; passphrase; passphrase2; SALT_SIZE] ; ECRYPTFS_ SALT_SIZE_ HEX]; passphrase2; passphrase = get_passphrase( "Old wrapping passphrase"); get_passphrase( "New wrapping passphrase"); passphrase2 = get_passphrase( "New wrapping passphrase new_wrapping_ passphrase) != new_wrapping_ passphrase2) || new_wrapping_ passphrase, passphrase2, strlen( new_wrapping_ passphrase) )!=0 passphrase) { passphrase2) { new_wrapping_ passphrase,
> lp:~tyhicks/ecryptfs/rewrap-passphrase-cleanups into lp:ecryptfs.
>
> Requested reviews:
> eCryptfs (ecryptfs)
>
> For more details, see:
>
> https:/
>
> Fixes minor segfault in ecryptfs-
> cleanup.
> --
>
> https:/
> Your team eCryptfs is requested to review the proposed merge of
> lp:~tyhicks/ecryptfs/rewrap-passphrase-cleanups into lp:ecryptfs.
>
> === modified file 'debian/changelog'
> --- debian/changelog 2013-06-08 01:37:48 +0000
> +++ debian/changelog 2013-06-27 20:57:33 +0000
> @@ -21,6 +21,11 @@
> - adjust man page text to avoid confusion about whether the
> interactive
> mount helper takes a capital 'N' for the answer to y/n questions
> (LP: #1130460)
> + * src/utils/
> + - Handle errors when interactively reading the new wrapping passphrase
> + and the confirmation from stdin. Fixes a segfault (invalid memory
> read)
> + in ecryptfs-
> either
> + of these passphrases.
>
> [ Dustin Kirkland ]
> * src/utils/
>
> === modified file 'src/utils/
> --- src/utils/
> +++ src/utils/
> @@ -42,12 +42,13 @@
> char passphrase[
> char *old_wrapping_
> char *new_wrapping_
> - char *new_wrapping_
> char salt[ECRYPTFS_
> char salt_hex[
> int rc = 0;
>
> if (argc == 2) {
> + char *new_wrapping_
> +
> /* interactive mode */
> old_wrapping_
> ecryptfs_
> @@ -55,10 +56,17 @@
> ecryptfs_
> new_wrapping_
> ecryptfs_
> (again)");
> - if (
> - strlen(
> strlen(
> - strncmp(
> new_wrapping_
> - ) {
> +
> + if (!new_wrapping_
> + fprintf(stderr, "Failed to read new wrapping
> passphrase\n");
> + rc = 1;
> + goto out;
> + } else if (!new_wrapping_
> + fprintf(stderr, "Failed to read new wrapping
> passphrase confirmation\n");
> + rc = 1;
> + goto out;
> + } else if (strcmp(
> + ...