From: Milan Broz <gmazyland@gmail.com>
To: Matthias Schniedermeyer <ms@citd.de>
Cc: dm-crypt@saout.de,
Debian Cryptsetup Team
<pkg-cryptsetup-devel@lists.alioth.debian.org>,
Steffen Vogel <post@steffenvogel.de>
Subject: Re: [dm-crypt] u?mount (8) helper script for luks encrypted disks
Date: Thu, 29 Aug 2013 07:50:07 +0200 [thread overview]
Message-ID: <521EE10F.4040602@gmail.com> (raw)
In-Reply-To: <20130826082310.GA10172@citd.de>
On 26.8.2013 10:23, Matthias Schniedermeyer wrote:
> Personally i "solved" this by renaming /bin/mount to /bin/mount.orig
> and putting a shell-script as /bin/mount that checks if i want to mount
> a /dev/mapper/XXX and does the setup of XXX before it calls
> /bin/mount.orig.
Underlying device construction can be very complex task sometimes
(it can be combination of lvm, mdraid, multipath, partitions and whatever.)
So while it works for your use case, it will not work for other.
> "Back then" when i implemented that about 1.5 years ago i tried to
> explain to Karel Zak (util-linux maintainer) that a generic "premount"
> and "postumount" command in (u)mount could solve this generic problem.
> The Problem that all cryptographic-setups need (at least) one more step
> to setup(/tear-down) a device. But that didn't happen and i didn't try
> to open the issue again.
For that particular case, LUKS tear down, I think we had a better approach.
Just implement auto removal on last device close (similar to loop device
autoclear flag.)
For more info see
https://bugzilla.redhat.com/show_bug.cgi?id=873734
Milan
p.s.
Be very careful with shell scripts in mount helpers here.
It will run under the same UID as mount, which means root for LUKS here.
next prev parent reply other threads:[~2013-08-29 5:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-24 15:40 [dm-crypt] u?mount (8) helper script for luks encrypted disks Steffen Vogel
2013-08-26 8:23 ` Matthias Schniedermeyer
2013-08-29 5:50 ` Milan Broz [this message]
2013-08-29 23:16 ` Matthias Schniedermeyer
2013-08-29 23:56 ` .. ink ..
2013-08-30 5:29 ` Milan Broz
2013-08-30 5:58 ` .. ink ..
2013-08-30 6:23 ` Milan Broz
2013-08-30 7:59 ` Matthias Schniedermeyer
2013-08-30 8:24 ` .. ink ..
2013-08-30 8:58 ` Matthias Schniedermeyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=521EE10F.4040602@gmail.com \
--to=gmazyland@gmail.com \
--cc=dm-crypt@saout.de \
--cc=ms@citd.de \
--cc=pkg-cryptsetup-devel@lists.alioth.debian.org \
--cc=post@steffenvogel.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.