Hello Paul,
        Thanks for spotting this issue, and for your patch.

        As this may affect the interpretation of the 'startsector' and
'numsectors' parameters in users' /etc/cryptmount/cmtab files, I think
it safest to incorporate this fix into the next release of cryptmount
rather than an updated version of the 4.1 series. I've updated the
documentation to make clear that these parameters will in future refer
exclusively to 512-byte sectors.

        I've just released an alpha version of cryptmount-4.2 on
www.sourceforge.net/projects/cryptmount, which I hope will behave
correctly on optical media.

                Kind regards,
                        RW Penney

+--   on Mon, Feb 28, 2011 at 02:42:01PM +0000, Paul Martin wrote:   ---+
> Package: cryptmount
> Version: 4.1-2
> Severity: important
> Tags: patch
> 
> When using optical media (sector size 2048 bytes), cryptmount guesses 
> the device size as a quarter of its actual size.

> Index: cryptmount-4.1/cryptmount.c
> ===================================================================
> --- cryptmount-4.1.orig/cryptmount.c  2011-02-28 14:20:50.867166060 +0000
> +++ cryptmount-4.1/cryptmount.c       2011-02-28 14:21:24.236073480 +0000
> @@ -196,9 +196,8 @@
>      if (fd < 0) return (int64_t)-1;
>  
>  #ifdef BLKGETSIZE64
> -    if (ioctl(fd, BLKGETSIZE64, &count) == 0
> -        && ioctl(fd, BLKSSZGET, &blklen) == 0) {
> -        count /= (int64_t)blklen;
> +    if (ioctl(fd, BLKGETSIZE64, &count) == 0) {
> +        count /= 512;
>      } else {
>          count = -1;
>      }




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to