* Replace not safe option --non-exclusive with --disable-uuid.

(just formal change, code already contains the change)

Signed-off-by: Milan Broz <mbroz@redhat.com>

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@101 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2009-08-31 17:03:10 +00:00
parent 8a0553d452
commit 771db939ad
3 changed files with 7 additions and 3 deletions

View File

@@ -17,6 +17,7 @@
* Implement old API calls using new functions. * Implement old API calls using new functions.
* Remove old API code helper functions. * Remove old API code helper functions.
* Add --master-key-file option for luksFormat and luksAddKey. * Add --master-key-file option for luksFormat and luksAddKey.
* Replace not safe option --non-exclusive with --disable-uuid.
2009-08-17 Milan Broz <mbroz@redhat.com> 2009-08-17 Milan Broz <mbroz@redhat.com>
* Fix PBKDF2 speed calculation for large passhrases. * Fix PBKDF2 speed calculation for large passhrases.

View File

@@ -134,6 +134,9 @@ This option is only relevant for \fIcreate\fR action.
.B "\-\-readonly" .B "\-\-readonly"
set up a read-only mapping. set up a read-only mapping.
.TP .TP
.B "\-\-disable-uuid"
Activate device without UUID. Useful for \fIluksOpen\fR to activate cloned LUKS device or its snapshot.
.TP
.B "\-\-iter-time, \-i" .B "\-\-iter-time, \-i"
The number of milliseconds to spend with PBKDF2 password processing. This option is only relevant to the LUKS operations as \fIluksFormat\fR or \fIluksAddKey\fR. The number of milliseconds to spend with PBKDF2 password processing. This option is only relevant to the LUKS operations as \fIluksFormat\fR or \fIluksAddKey\fR.
.TP .TP

View File

@@ -34,7 +34,7 @@ static int opt_version_mode = 0;
static int opt_timeout = 0; static int opt_timeout = 0;
static int opt_tries = 3; static int opt_tries = 3;
static int opt_align_payload = 0; static int opt_align_payload = 0;
static int opt_non_exclusive = 0; static int opt_disable_uuid = 0;
static const char **action_argv; static const char **action_argv;
static int action_argc; static int action_argc;
@@ -371,7 +371,7 @@ static int action_luksOpen(int arg)
if (opt_readonly) if (opt_readonly)
options.flags |= CRYPT_FLAG_READONLY; options.flags |= CRYPT_FLAG_READONLY;
if (opt_non_exclusive) if (opt_disable_uuid) /* Abuse old flag */
options.flags |= CRYPT_FLAG_NON_EXCLUSIVE_ACCESS; options.flags |= CRYPT_FLAG_NON_EXCLUSIVE_ACCESS;
return crypt_luksOpen(&options); return crypt_luksOpen(&options);
} }
@@ -598,7 +598,7 @@ int main(int argc, char **argv)
{ "timeout", 't', POPT_ARG_INT, &opt_timeout, 0, N_("Timeout for interactive passphrase prompt (in seconds)"), N_("secs") }, { "timeout", 't', POPT_ARG_INT, &opt_timeout, 0, N_("Timeout for interactive passphrase prompt (in seconds)"), N_("secs") },
{ "tries", 'T', POPT_ARG_INT, &opt_tries, 0, N_("How often the input of the passphrase canbe retried"), NULL }, { "tries", 'T', POPT_ARG_INT, &opt_tries, 0, N_("How often the input of the passphrase canbe retried"), NULL },
{ "align-payload", '\0', POPT_ARG_INT, &opt_align_payload, 0, N_("Align payload at <n> sector boundaries - for luksFormat"), N_("SECTORS") }, { "align-payload", '\0', POPT_ARG_INT, &opt_align_payload, 0, N_("Align payload at <n> sector boundaries - for luksFormat"), N_("SECTORS") },
{ "non-exclusive", '\0', POPT_ARG_NONE, &opt_non_exclusive, 0, N_("Allows non-exclusive access for luksOpen, WARNING see manpage."), NULL }, { "disable-uuid", '\0', POPT_ARG_NONE, &opt_disable_uuid, 0, N_("Do not set UUID for device luksOpen."), NULL },
POPT_TABLEEND POPT_TABLEEND
}; };
poptContext popt_context; poptContext popt_context;