]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd, rbd-nbd: don't strip trailing newline in passphrase files
authorIlya Dryomov <idryomov@gmail.com>
Mon, 14 Nov 2022 12:24:00 +0000 (13:24 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 4 Dec 2022 17:19:19 +0000 (18:19 +0100)
commitd642f7804bb74c2a2a6763e3de3b10433f076cd3
tree34c2cef480ad63873c26a1ebb1c963be17b36ec0
parentadea1ab805efee44ec08bbdf857af7a9a8a599ad
rbd, rbd-nbd: don't strip trailing newline in passphrase files

One of the stated goals is compatibility with standard LUKS tools,
in particular being able to load encryption on images formatted with
cryptsetup.  cryptsetup doesn't do this and this really interferes
with randomly generated (binary) passphrases.

While at it, open passphrase files as binary -- it communicates the
intent if nothing else on POSIX.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
PendingReleaseNotes
doc/rbd/rbd-encryption.rst
qa/workunits/rbd/luks-encryption.sh
src/tools/rbd/Utils.cc
src/tools/rbd/action/Encryption.cc
src/tools/rbd_nbd/rbd-nbd.cc