Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 284757 Details for
Bug 380795
sys-fs/cryptsetup: dm-crypt-start.sh: get keys via custom pipe
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
cryptsetup-1.1.3-r3-pipe-support.patch
cryptsetup-1.1.3-r3-pipe-support.patch (text/plain), 1.96 KB, created by
Leho Kraav (:macmaN @lkraav)
on 2011-08-26 23:32:08 UTC
(
hide
)
Description:
cryptsetup-1.1.3-r3-pipe-support.patch
Filename:
MIME Type:
Creator:
Leho Kraav (:macmaN @lkraav)
Created:
2011-08-26 23:32:08 UTC
Size:
1.96 KB
patch
obsolete
>commit bb45c1fbac8c2a0491a9b20c5fa686abd4b0e9de >Author: Leho Kraav <leho@kraav.com> >Date: Thu Jun 16 14:06:37 2011 -0400 > > working pipe system > > Example key created with a pipe. This ensures that a certain token has > to be present in the system for sha512 to generate a correct password > for unlocking the volume. > > /etc/conf.d/dmcrypt: > target=c3 > source=/dev/sda3 > pipe='ls /dev/disk/by-uuid | sha512sum' > >diff --git a/1.1.3-dm-crypt-start.sh b/1.1.3-dm-crypt-start.sh >index bc60ba0..027ff4a 100644 >--- a/1.1.3-dm-crypt-start.sh >+++ b/1.1.3-dm-crypt-start.sh >@@ -176,7 +176,11 @@ dm_crypt_execute_dmcrypt() { > ret="$?" > eend "${ret}" "failure running cryptsetup" > else >- cryptsetup ${options} ${arg1} ${arg2} ${arg3} >+ if [ -n "${pipe}" ]; then >+ eval "${pipe}" | cryptsetup ${options} ${arg1} ${arg2} ${arg3} >+ else >+ cryptsetup ${options} ${arg1} ${arg2} ${arg3} >+ fi > ret="$?" > eend "${ret}" "failure running cryptsetup" > fi >@@ -249,7 +253,7 @@ parse_opt() { > } > > local cryptfs_status=0 >-local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev >+local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev pipe > > CMDLINE="`cat /proc/cmdline`" > for x in ${CMDLINE} >@@ -278,10 +282,10 @@ if [[ -f ${conf_file} ]] && [[ -x /sbin/cryptsetup ]] ; then > ${execute_hook} > > # Prepare for the next target/swap by resetting variables >- unset gpg_options key loop_file target options pre_mount post_mount source swap remdev >+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev pipe > ;; > >- gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*) >+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*|pipe=*) > if [[ -z ${target} && -z ${swap} ]] ; then > ewarn "Ignoring setting outside target/swap section: ${targetline}" > continue
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 380795
:
284757
|
285027