]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptsetup: craft a unique ID with the source device 77/head
authorHarald Hoyer <harald@redhat.com>
Mon, 1 Jun 2015 15:26:27 +0000 (17:26 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 9 Jun 2015 08:17:55 +0000 (10:17 +0200)
commite51b9486d1b59e72c293028fed1384f4e4ef09aa
tree5fc769175d87583ea27e074c839c93c2874bdfef
parentfba3d902b49e1f4654b36c9d4311def4a084c3a7
cryptsetup: craft a unique ID with the source device

If cryptsetup is called with a source device as argv[3], then craft the
ID for the password agent with a unique device path.

If possible "/dev/block/<maj>:<min>" is used, otherwise the original
argv[3] is used.

This enables password agents like petera [1] to provide a password
according to the source device. The original ID did not carry enough
information and was more targeted for a human readable string, which
is specified in the "Message" field anyway.

With this patch the ID of the ask.XXX ini file looks like this:
ID=cryptsetup:/dev/block/<maj>:<min>

[1] https://github.com/npmccallum/petera
src/cryptsetup/cryptsetup.c