From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bs7NlQBxij_o for ; Sun, 17 Mar 2013 19:57:37 +0100 (CET) Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Sun, 17 Mar 2013 19:57:37 +0100 (CET) Received: by mail-ee0-f44.google.com with SMTP id l10so2353112eei.31 for ; Sun, 17 Mar 2013 11:57:36 -0700 (PDT) Message-ID: <514611E8.3040308@gmail.com> Date: Sun, 17 Mar 2013 19:56:40 +0100 From: Milan Broz MIME-Version: 1.0 References: <512363E1.7040703@gmail.com> In-Reply-To: <512363E1.7040703@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] inconsistent behavior btw a binary and library call when closing truecrypt volume made up of multiple algorithms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ".. ink .." Cc: dm-crypt@saout.de On 19.2.2013 12:37, Milan Broz wrote: > On 02/18/2013 05:58 AM, .. ink .. wrote: >> >> test: >> >> 1. create a truecrypt volume using multiple algorithms,i went with AES-twofist-serpent >> 2. open the volume using cryptsetup with "cryptsetup tcryptOpen ttt ttt" >> 3. ls -l /dev/mapper/ will give: >> >> crw------- 1 root root 10, 236 Feb 17 22:37 /dev/mapper/control >> lrwxrwxrwx 1 root root 7 Feb 17 23:45 /dev/mapper/ttt -> ../dm-2 >> lrwxrwxrwx 1 root root 7 Feb 17 23:45 /dev/mapper/ttt_1 -> ../dm-1 >> lrwxrwxrwx 1 root root 7 Feb 17 23:45 /dev/mapper/ttt_2 -> ../dm-0 >> >> It looks like 3 mapper will be created,each per algorithm. >> >> closing the mapper with " cryptsetup tcryptClose ttt" will remove all three mappers expected. >> >> closing the mapper through the library "crypt_deactivate( NULL,"ttt" >> )" will not remove all 3,just the "ttt" one.With the library call, >> all 3 seem to require to be removed individually.> >> Is this behavior of the library expected? > > Kind of... if NULL is in context. If you use context (init_by_name) it should work. Fixed in commit http://code.google.com/p/cryptsetup/source/detail?r=f2521889c2315b8f2bd812a92fa37057fc382877# Thanks, Milan