Skip to content

Conversation

@haraldh
Copy link
Member

@haraldh haraldh commented Jun 5, 2015

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/:" 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

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
@haraldh
Copy link
Member Author

haraldh commented Jun 9, 2015

@mezcalero thanks for the review on haraldh@9d2984c
Fixed, rebased and repushed the PR.

@haraldh
Copy link
Member Author

haraldh commented Jun 9, 2015

possible fix for #119

poettering added a commit that referenced this pull request Jun 9, 2015
cryptsetup: craft a unique ID with the source device
@poettering poettering merged commit fd31024 into systemd:master Jun 9, 2015
@haraldh haraldh deleted the cryptsetup branch June 9, 2015 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants