Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Apr 2017 20:38:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-geom@FreeBSD.org
Subject:   [Bug 218512] Geli arbitrarily prevents setting passphrases
Message-ID:  <bug-218512-14739-8UXZmK927m@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-218512-14739@https.bugs.freebsd.org/bugzilla/>
References:  <bug-218512-14739@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218512

--- Comment #14 from Frank <fhriley@gmail.com> ---
(In reply to Alexander Motin from comment #13)

"Multiple processes running same time indeed likely cause different number =
of
iterations to be set on different disks."

If you recognize that, you should see the problem. Say we have three disks,=
 you
set passphrases on them and they end up with the following iterations:

1: 10
2: 11
3: 10

Now you come along and want to change the passphrase (without using -i), and
this time it computes the iterations as so:

1: 11
2: 10
3: 10

With the current code and your commit, disks 1 & 2 will fail because it sees
you trying to change the iterations. Here is your if statement:

if (*valp !=3D -1 && md.md_iterations =3D=3D -1) {
    md.md_iterations =3D *valp;
} else if (*valp !=3D -1 && *valp !=3D md.md_iterations) {
    /* fail */
}

For disk 1 above in setting the passphrase the second time:

*valp =3D=3D 11
md_md_iterations =3D=3D 10

This is fixed in my pull request.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218512-14739-8UXZmK927m>