[Pkg-loop-aes-commits] r1498 - /upstream/loop-aes/current/

xam at users.alioth.debian.org xam at users.alioth.debian.org
Sun Mar 9 00:40:27 UTC 2008


Author: xam
Date: Sun Mar  9 00:40:26 2008
New Revision: 1498

URL: http://svn.debian.org/wsvn/pkg-loop-aes/?sc=1&rev=1498
Log:
Import loop-AES v3.2c

Added:
    upstream/loop-aes/current/gnupg-1.4.8.diff
      - copied, changed from r1497, upstream/loop-aes/current/gnupg-1.4.7.diff
    upstream/loop-aes/current/kernel-2.4.36.diff
      - copied, changed from r1497, upstream/loop-aes/current/kernel-2.4.35.diff
    upstream/loop-aes/current/kernel-2.6.24.diff
      - copied, changed from r1497, upstream/loop-aes/current/kernel-2.6.23.diff
    upstream/loop-aes/current/util-linux-ng-2.13.1.diff
      - copied, changed from r1497, upstream/loop-aes/current/util-linux-ng-2.13.0.1.diff
Removed:
    upstream/loop-aes/current/gnupg-1.4.7.diff
    upstream/loop-aes/current/kernel-2.4.35.diff
    upstream/loop-aes/current/kernel-2.6.23.diff
    upstream/loop-aes/current/util-linux-ng-2.13.0.1.diff
Modified:
    upstream/loop-aes/current/ChangeLog
    upstream/loop-aes/current/README
    upstream/loop-aes/current/dkms.conf
    upstream/loop-aes/current/loop.c-2.6.patched
    upstream/loop-aes/current/util-linux-2.12r.diff

Modified: upstream/loop-aes/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/ChangeLog?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/ChangeLog (original)
+++ upstream/loop-aes/current/ChangeLog Sun Mar  9 00:40:26 2008
@@ -519,3 +519,7 @@
     - Added util-linux-ng patch.
     - Worked around block layer interface breakage on linux-2.6.24-rc1
       kernel.
+
+loop-AES-v3.2c    March 6 2008
+    - Fixed incompatibility with symlinks in /etc/fstab
+    - Fixed incompatibility with 2.6.25-rc kernels.

Modified: upstream/loop-aes/current/README
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/README?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/README (original)
+++ upstream/loop-aes/current/README Sun Mar  9 00:40:26 2008
@@ -1,6 +1,6 @@
-Written by Jari Ruusu <jariruusu at users.sourceforge.net>, October 25 2007
-
-Copyright 2001-2007 by Jari Ruusu.
+Written by Jari Ruusu <jariruusu at users.sourceforge.net>, March 6 2008
+
+Copyright 2001-2008 by Jari Ruusu.
 Redistribution of this file is permitted under the GNU Public License.
 
 
@@ -403,9 +403,9 @@
 
 Or alternatively, if your distro is using util-linux-ng version:
 
-    bzip2 -d -c util-linux-ng-2.13.0.1.tar.bz2 | tar xvf -
-    cd util-linux-ng-2.13.0.1
-    patch -p1 </PATH/TO/LOOP-AES/util-linux-ng-2.13.0.1.diff
+    bzip2 -d -c util-linux-ng-2.13.1.tar.bz2 | tar xvf -
+    cd util-linux-ng-2.13.1
+    patch -p1 </PATH/TO/LOOP-AES/util-linux-ng-2.13.1.diff
     CFLAGS="-O2 -Wall" ./configure
     make SUBDIRS=mount
 

Modified: upstream/loop-aes/current/dkms.conf
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/dkms.conf?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/dkms.conf (original)
+++ upstream/loop-aes/current/dkms.conf Sun Mar  9 00:40:26 2008
@@ -1,7 +1,7 @@
 # dkms.conf for Dynamic Kernel Module Support
 # http://linux.dell.com/dkms/dkms.html for more info
 
-PACKAGE_VERSION=v3.2b
+PACKAGE_VERSION=v3.2c
 PACKAGE_NAME="loop-AES"
 CLEAN="make clean"
 

Copied: upstream/loop-aes/current/gnupg-1.4.8.diff (from r1497, upstream/loop-aes/current/gnupg-1.4.7.diff)
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/gnupg-1.4.8.diff?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/gnupg-1.4.7.diff (original)
+++ upstream/loop-aes/current/gnupg-1.4.8.diff Sun Mar  9 00:40:26 2008
@@ -1,6 +1,6 @@
---- gnupg-1.4.7/g10/gpg.c.old	2007-03-05 11:02:57.000000000 +0200
-+++ gnupg-1.4.7/g10/gpg.c	2007-03-14 20:13:50.000000000 +0200
-@@ -1795,7 +1795,7 @@
+--- gnupg-1.4.8/g10/gpg.c.old	2007-12-14 12:55:49.000000000 +0200
++++ gnupg-1.4.8/g10/gpg.c	2008-01-26 19:39:49.000000000 +0200
+@@ -1832,7 +1832,7 @@
      opt.cert_digest_algo = 0;
      opt.compress_algo = -1; /* defaults to DEFAULT_COMPRESS_ALGO */
      opt.s2k_mode = 3; /* iterated+salted */

Copied: upstream/loop-aes/current/kernel-2.4.36.diff (from r1497, upstream/loop-aes/current/kernel-2.4.35.diff)
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/kernel-2.4.36.diff?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/kernel-2.4.35.diff (original)
+++ upstream/loop-aes/current/kernel-2.4.36.diff Sun Mar  9 00:40:26 2008
@@ -3,9 +3,9 @@
 
     rm -f drivers/block/loop.c include/linux/loop.h
 
-diff -urN linux-2.4.35-noloop/Documentation/Configure.help linux-2.4.35-AES/Documentation/Configure.help
---- linux-2.4.35-noloop/Documentation/Configure.help	2007-07-27 18:17:26.000000000 +0300
-+++ linux-2.4.35-AES/Documentation/Configure.help	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/Documentation/Configure.help linux-2.4.36-AES/Documentation/Configure.help
+--- linux-2.4.36-noloop/Documentation/Configure.help	2007-07-27 18:17:26.000000000 +0300
++++ linux-2.4.36-AES/Documentation/Configure.help	2008-01-26 19:46:59.000000000 +0200
 @@ -622,6 +622,27 @@
  
    If unsure, say N.
@@ -34,9 +34,9 @@
  ATA/IDE/MFM/RLL support
  CONFIG_IDE
    If you say Y here, your kernel will be able to manage low cost mass
-diff -urN linux-2.4.35-noloop/drivers/block/Config.in linux-2.4.35-AES/drivers/block/Config.in
---- linux-2.4.35-noloop/drivers/block/Config.in	2004-08-08 14:15:13.000000000 +0300
-+++ linux-2.4.35-AES/drivers/block/Config.in	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/block/Config.in linux-2.4.36-AES/drivers/block/Config.in
+--- linux-2.4.36-noloop/drivers/block/Config.in	2004-08-08 14:15:13.000000000 +0300
++++ linux-2.4.36-AES/drivers/block/Config.in	2008-01-26 19:46:59.000000000 +0200
 @@ -42,6 +42,15 @@
  dep_tristate 'Promise SATA SX8 support' CONFIG_BLK_DEV_SX8 $CONFIG_PCI
  
@@ -53,9 +53,9 @@
  dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
  
  tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
-diff -urN linux-2.4.35-noloop/drivers/block/loop.c linux-2.4.35-AES/drivers/block/loop.c
---- linux-2.4.35-noloop/drivers/block/loop.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/block/loop.c	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/block/loop.c linux-2.4.36-AES/drivers/block/loop.c
+--- linux-2.4.36-noloop/drivers/block/loop.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/block/loop.c	2008-01-26 19:46:59.000000000 +0200
 @@ -0,0 +1,2271 @@
 +/*
 + *  linux/drivers/block/loop.c
@@ -2328,9 +2328,9 @@
 +}
 +EXPORT_SYMBOL(loop_add_keyscrub_fn);
 +#endif
-diff -urN linux-2.4.35-noloop/drivers/misc/Makefile linux-2.4.35-AES/drivers/misc/Makefile
---- linux-2.4.35-noloop/drivers/misc/Makefile	2000-12-30 00:07:22.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/Makefile	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/Makefile linux-2.4.36-AES/drivers/misc/Makefile
+--- linux-2.4.36-noloop/drivers/misc/Makefile	2000-12-30 00:07:22.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/Makefile	2008-01-26 19:46:59.000000000 +0200
 @@ -9,8 +9,35 @@
  # parent makes..
  #
@@ -2367,9 +2367,9 @@
  include $(TOPDIR)/Rules.make
  
  fastdep:
-diff -urN linux-2.4.35-noloop/drivers/misc/aes-amd64.S linux-2.4.35-AES/drivers/misc/aes-amd64.S
---- linux-2.4.35-noloop/drivers/misc/aes-amd64.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/aes-amd64.S	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/aes-amd64.S linux-2.4.36-AES/drivers/misc/aes-amd64.S
+--- linux-2.4.36-noloop/drivers/misc/aes-amd64.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/aes-amd64.S	2008-01-26 19:46:59.000000000 +0200
 @@ -0,0 +1,893 @@
 +//
 +// Copyright (c) 2001, Dr Brian Gladman <brg at gladman.uk.net>, Worcester, UK.
@@ -3264,9 +3264,9 @@
 +	im_data5(v3)
 +	im_data6(v3)
 +	im_data7(v3)
-diff -urN linux-2.4.35-noloop/drivers/misc/aes-x86.S linux-2.4.35-AES/drivers/misc/aes-x86.S
---- linux-2.4.35-noloop/drivers/misc/aes-x86.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/aes-x86.S	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/aes-x86.S linux-2.4.36-AES/drivers/misc/aes-x86.S
+--- linux-2.4.36-noloop/drivers/misc/aes-x86.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/aes-x86.S	2008-01-26 19:46:59.000000000 +0200
 @@ -0,0 +1,923 @@
 +//
 +// Copyright (c) 2001, Dr Brian Gladman <brg at gladman.uk.net>, Worcester, UK.
@@ -4191,9 +4191,9 @@
 +	im_data5(v3)
 +	im_data6(v3)
 +	im_data7(v3)
-diff -urN linux-2.4.35-noloop/drivers/misc/aes.c linux-2.4.35-AES/drivers/misc/aes.c
---- linux-2.4.35-noloop/drivers/misc/aes.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/aes.c	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/aes.c linux-2.4.36-AES/drivers/misc/aes.c
+--- linux-2.4.36-noloop/drivers/misc/aes.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/aes.c	2008-01-26 19:46:59.000000000 +0200
 @@ -0,0 +1,1479 @@
 +// I retain copyright in this code but I encourage its free use provided
 +// that I don't carry any responsibility for the results. I am especially 
@@ -5674,9 +5674,9 @@
 +
 +    state_out(out_blk, b0);
 +}
-diff -urN linux-2.4.35-noloop/drivers/misc/aes.h linux-2.4.35-AES/drivers/misc/aes.h
---- linux-2.4.35-noloop/drivers/misc/aes.h	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/aes.h	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/aes.h linux-2.4.36-AES/drivers/misc/aes.h
+--- linux-2.4.36-noloop/drivers/misc/aes.h	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/aes.h	2008-01-26 19:46:59.000000000 +0200
 @@ -0,0 +1,113 @@
 +// I retain copyright in this code but I encourage its free use provided
 +// that I don't carry any responsibility for the results. I am especially 
@@ -5791,9 +5791,9 @@
 +// if their parameters have not changed.
 +
 +#endif  // _AES_H
-diff -urN linux-2.4.35-noloop/drivers/misc/crypto-ksym.c linux-2.4.35-AES/drivers/misc/crypto-ksym.c
---- linux-2.4.35-noloop/drivers/misc/crypto-ksym.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/crypto-ksym.c	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/crypto-ksym.c linux-2.4.36-AES/drivers/misc/crypto-ksym.c
+--- linux-2.4.36-noloop/drivers/misc/crypto-ksym.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/crypto-ksym.c	2008-01-26 19:46:59.000000000 +0200
 @@ -0,0 +1,7 @@
 +#include <linux/module.h>
 +#include "aes.h"
@@ -5802,9 +5802,9 @@
 +EXPORT_SYMBOL_NOVERS(aes_encrypt);
 +EXPORT_SYMBOL_NOVERS(aes_decrypt);
 +EXPORT_SYMBOL_NOVERS(md5_transform_CPUbyteorder);
-diff -urN linux-2.4.35-noloop/drivers/misc/md5-amd64.S linux-2.4.35-AES/drivers/misc/md5-amd64.S
---- linux-2.4.35-noloop/drivers/misc/md5-amd64.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/md5-amd64.S	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/md5-amd64.S linux-2.4.36-AES/drivers/misc/md5-amd64.S
+--- linux-2.4.36-noloop/drivers/misc/md5-amd64.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/md5-amd64.S	2008-01-26 19:47:00.000000000 +0200
 @@ -0,0 +1,200 @@
 +//
 +//  md5-amd64.S
@@ -6006,9 +6006,9 @@
 +	addl	%ecx,8(%rdi)
 +	addl	%edx,12(%rdi)
 +	ret
-diff -urN linux-2.4.35-noloop/drivers/misc/md5-x86.S linux-2.4.35-AES/drivers/misc/md5-x86.S
---- linux-2.4.35-noloop/drivers/misc/md5-x86.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/md5-x86.S	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/md5-x86.S linux-2.4.36-AES/drivers/misc/md5-x86.S
+--- linux-2.4.36-noloop/drivers/misc/md5-x86.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/md5-x86.S	2008-01-26 19:47:00.000000000 +0200
 @@ -0,0 +1,207 @@
 +//
 +//  md5-x86.S
@@ -6217,9 +6217,9 @@
 +	pop	%ebx
 +	pop	%ebp
 +	ret
-diff -urN linux-2.4.35-noloop/drivers/misc/md5.c linux-2.4.35-AES/drivers/misc/md5.c
---- linux-2.4.35-noloop/drivers/misc/md5.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/md5.c	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/md5.c linux-2.4.36-AES/drivers/misc/md5.c
+--- linux-2.4.36-noloop/drivers/misc/md5.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/md5.c	2008-01-26 19:47:00.000000000 +0200
 @@ -0,0 +1,106 @@
 +/*
 + * MD5 Message Digest Algorithm (RFC1321).
@@ -6327,9 +6327,9 @@
 +    hash[2] += c;
 +    hash[3] += d;
 +}
-diff -urN linux-2.4.35-noloop/drivers/misc/md5.h linux-2.4.35-AES/drivers/misc/md5.h
---- linux-2.4.35-noloop/drivers/misc/md5.h	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/drivers/misc/md5.h	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/drivers/misc/md5.h linux-2.4.36-AES/drivers/misc/md5.h
+--- linux-2.4.36-noloop/drivers/misc/md5.h	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/drivers/misc/md5.h	2008-01-26 19:47:00.000000000 +0200
 @@ -0,0 +1,11 @@
 +/* md5.h */
 +
@@ -6342,9 +6342,9 @@
 + asmlinkage
 +#endif
 +extern void md5_transform_CPUbyteorder(u_int32_t *, u_int32_t const *);
-diff -urN linux-2.4.35-noloop/include/linux/loop.h linux-2.4.35-AES/include/linux/loop.h
---- linux-2.4.35-noloop/include/linux/loop.h	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.4.35-AES/include/linux/loop.h	2007-07-27 18:33:04.000000000 +0300
+diff -urN linux-2.4.36-noloop/include/linux/loop.h linux-2.4.36-AES/include/linux/loop.h
+--- linux-2.4.36-noloop/include/linux/loop.h	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.4.36-AES/include/linux/loop.h	2008-01-26 19:47:00.000000000 +0200
 @@ -0,0 +1,195 @@
 +#ifndef _LINUX_LOOP_H
 +#define _LINUX_LOOP_H

Copied: upstream/loop-aes/current/kernel-2.6.24.diff (from r1497, upstream/loop-aes/current/kernel-2.6.23.diff)
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/kernel-2.6.24.diff?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/kernel-2.6.23.diff (original)
+++ upstream/loop-aes/current/kernel-2.6.24.diff Sun Mar  9 00:40:26 2008
@@ -3,10 +3,10 @@
 
     rm -f drivers/block/loop.c include/linux/loop.h
 
-diff -urN linux-2.6.23-noloop/drivers/block/Kconfig linux-2.6.23-AES/drivers/block/Kconfig
---- linux-2.6.23-noloop/drivers/block/Kconfig	2007-10-11 18:26:34.000000000 +0300
-+++ linux-2.6.23-AES/drivers/block/Kconfig	2007-10-11 20:15:59.000000000 +0300
-@@ -248,14 +248,6 @@
+diff -urN linux-2.6.24-noloop/drivers/block/Kconfig linux-2.6.24-AES/drivers/block/Kconfig
+--- linux-2.6.24-noloop/drivers/block/Kconfig	2008-01-26 19:23:29.000000000 +0200
++++ linux-2.6.24-AES/drivers/block/Kconfig	2008-01-26 20:10:22.000000000 +0200
+@@ -231,14 +231,6 @@
  	  bits of, say, a sound file). This is also safe if the file resides
  	  on a remote file server.
  
@@ -21,7 +21,7 @@
  	  Note that this loop device has nothing to do with the loopback
  	  device used for network connections from the machine to itself.
  
-@@ -264,20 +256,32 @@
+@@ -247,20 +239,32 @@
  
  	  Most users will answer N here.
  
@@ -66,9 +66,9 @@
  
  config BLK_DEV_NBD
  	tristate "Network block device support"
-diff -urN linux-2.6.23-noloop/drivers/block/Makefile linux-2.6.23-AES/drivers/block/Makefile
---- linux-2.6.23-noloop/drivers/block/Makefile	2007-10-11 18:26:34.000000000 +0300
-+++ linux-2.6.23-AES/drivers/block/Makefile	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/block/Makefile linux-2.6.24-AES/drivers/block/Makefile
+--- linux-2.6.24-noloop/drivers/block/Makefile	2008-01-26 19:23:29.000000000 +0200
++++ linux-2.6.24-AES/drivers/block/Makefile	2008-01-26 20:10:22.000000000 +0200
 @@ -1,6 +1,11 @@
  #
  # Makefile for the kernel block device drivers.
@@ -81,9 +81,9 @@
  # 12 June 2000, Christoph Hellwig <hch at infradead.org>
  # Rewritten to use lists instead of if-statements.
  # 
-diff -urN linux-2.6.23-noloop/drivers/block/loop.c linux-2.6.23-AES/drivers/block/loop.c
---- linux-2.6.23-noloop/drivers/block/loop.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/block/loop.c	2007-10-24 20:26:05.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/block/loop.c linux-2.6.24-AES/drivers/block/loop.c
+--- linux-2.6.24-noloop/drivers/block/loop.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/block/loop.c	2008-03-05 21:03:45.000000000 +0200
 @@ -0,0 +1,2900 @@
 +/*
 + *  linux/drivers/block/loop.c
@@ -2930,7 +2930,7 @@
 +
 +out_mem5:
 +	while (i--)
-+		blk_put_queue(disks[i]->queue);
++		blk_cleanup_queue(disks[i]->queue);
 +	i = max_loop;
 +out_mem4:
 +	while (i--)
@@ -2955,7 +2955,7 @@
 +	for (i = 0; i < max_loop; i++) {
 +		del_gendisk(disks[i]);
 +		put_disk(disks[i]);
-+		blk_put_queue(loop_dev_ptr_arr[i]->lo_queue);
++		blk_cleanup_queue(loop_dev_ptr_arr[i]->lo_queue);
 +		kfree(loop_dev_ptr_arr[i]);
 +	}
 +#ifdef CONFIG_DEVFS_FS
@@ -2985,9 +2985,9 @@
 +}
 +EXPORT_SYMBOL(loop_add_keyscrub_fn);
 +#endif
-diff -urN linux-2.6.23-noloop/drivers/misc/Makefile linux-2.6.23-AES/drivers/misc/Makefile
---- linux-2.6.23-noloop/drivers/misc/Makefile	2007-10-11 18:26:58.000000000 +0300
-+++ linux-2.6.23-AES/drivers/misc/Makefile	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/Makefile linux-2.6.24-AES/drivers/misc/Makefile
+--- linux-2.6.24-noloop/drivers/misc/Makefile	2008-01-26 19:23:54.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/Makefile	2008-01-26 20:10:22.000000000 +0200
 @@ -1,6 +1,28 @@
  #
  # Makefile for misc devices that really don't fit anywhere else.
@@ -3017,9 +3017,9 @@
  obj- := misc.o	# Dummy rule to force built-in.o to be made
  
  obj-$(CONFIG_IBM_ASM)		+= ibmasm/
-diff -urN linux-2.6.23-noloop/drivers/misc/aes-amd64.S linux-2.6.23-AES/drivers/misc/aes-amd64.S
---- linux-2.6.23-noloop/drivers/misc/aes-amd64.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/aes-amd64.S	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/aes-amd64.S linux-2.6.24-AES/drivers/misc/aes-amd64.S
+--- linux-2.6.24-noloop/drivers/misc/aes-amd64.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/aes-amd64.S	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,893 @@
 +//
 +// Copyright (c) 2001, Dr Brian Gladman <brg at gladman.uk.net>, Worcester, UK.
@@ -3914,9 +3914,9 @@
 +	im_data5(v3)
 +	im_data6(v3)
 +	im_data7(v3)
-diff -urN linux-2.6.23-noloop/drivers/misc/aes-x86.S linux-2.6.23-AES/drivers/misc/aes-x86.S
---- linux-2.6.23-noloop/drivers/misc/aes-x86.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/aes-x86.S	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/aes-x86.S linux-2.6.24-AES/drivers/misc/aes-x86.S
+--- linux-2.6.24-noloop/drivers/misc/aes-x86.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/aes-x86.S	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,923 @@
 +//
 +// Copyright (c) 2001, Dr Brian Gladman <brg at gladman.uk.net>, Worcester, UK.
@@ -4841,9 +4841,9 @@
 +	im_data5(v3)
 +	im_data6(v3)
 +	im_data7(v3)
-diff -urN linux-2.6.23-noloop/drivers/misc/aes.c linux-2.6.23-AES/drivers/misc/aes.c
---- linux-2.6.23-noloop/drivers/misc/aes.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/aes.c	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/aes.c linux-2.6.24-AES/drivers/misc/aes.c
+--- linux-2.6.24-noloop/drivers/misc/aes.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/aes.c	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,1479 @@
 +// I retain copyright in this code but I encourage its free use provided
 +// that I don't carry any responsibility for the results. I am especially 
@@ -6324,9 +6324,9 @@
 +
 +    state_out(out_blk, b0);
 +}
-diff -urN linux-2.6.23-noloop/drivers/misc/aes.h linux-2.6.23-AES/drivers/misc/aes.h
---- linux-2.6.23-noloop/drivers/misc/aes.h	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/aes.h	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/aes.h linux-2.6.24-AES/drivers/misc/aes.h
+--- linux-2.6.24-noloop/drivers/misc/aes.h	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/aes.h	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,112 @@
 +// I retain copyright in this code but I encourage its free use provided
 +// that I don't carry any responsibility for the results. I am especially 
@@ -6440,9 +6440,9 @@
 +// if their parameters have not changed.
 +
 +#endif  // _AES_H
-diff -urN linux-2.6.23-noloop/drivers/misc/crypto-ksym.c linux-2.6.23-AES/drivers/misc/crypto-ksym.c
---- linux-2.6.23-noloop/drivers/misc/crypto-ksym.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/crypto-ksym.c	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/crypto-ksym.c linux-2.6.24-AES/drivers/misc/crypto-ksym.c
+--- linux-2.6.24-noloop/drivers/misc/crypto-ksym.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/crypto-ksym.c	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,7 @@
 +#include <linux/module.h>
 +#include "aes.h"
@@ -6451,9 +6451,9 @@
 +EXPORT_SYMBOL(aes_encrypt);
 +EXPORT_SYMBOL(aes_decrypt);
 +EXPORT_SYMBOL(md5_transform_CPUbyteorder);
-diff -urN linux-2.6.23-noloop/drivers/misc/md5-amd64.S linux-2.6.23-AES/drivers/misc/md5-amd64.S
---- linux-2.6.23-noloop/drivers/misc/md5-amd64.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/md5-amd64.S	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/md5-amd64.S linux-2.6.24-AES/drivers/misc/md5-amd64.S
+--- linux-2.6.24-noloop/drivers/misc/md5-amd64.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/md5-amd64.S	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,200 @@
 +//
 +//  md5-amd64.S
@@ -6655,9 +6655,9 @@
 +	addl	%ecx,8(%rdi)
 +	addl	%edx,12(%rdi)
 +	ret
-diff -urN linux-2.6.23-noloop/drivers/misc/md5-x86.S linux-2.6.23-AES/drivers/misc/md5-x86.S
---- linux-2.6.23-noloop/drivers/misc/md5-x86.S	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/md5-x86.S	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/md5-x86.S linux-2.6.24-AES/drivers/misc/md5-x86.S
+--- linux-2.6.24-noloop/drivers/misc/md5-x86.S	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/md5-x86.S	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,207 @@
 +//
 +//  md5-x86.S
@@ -6866,9 +6866,9 @@
 +	pop	%ebx
 +	pop	%ebp
 +	ret
-diff -urN linux-2.6.23-noloop/drivers/misc/md5.c linux-2.6.23-AES/drivers/misc/md5.c
---- linux-2.6.23-noloop/drivers/misc/md5.c	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/md5.c	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/md5.c linux-2.6.24-AES/drivers/misc/md5.c
+--- linux-2.6.24-noloop/drivers/misc/md5.c	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/md5.c	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,106 @@
 +/*
 + * MD5 Message Digest Algorithm (RFC1321).
@@ -6976,9 +6976,9 @@
 +    hash[2] += c;
 +    hash[3] += d;
 +}
-diff -urN linux-2.6.23-noloop/drivers/misc/md5.h linux-2.6.23-AES/drivers/misc/md5.h
---- linux-2.6.23-noloop/drivers/misc/md5.h	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/drivers/misc/md5.h	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/drivers/misc/md5.h linux-2.6.24-AES/drivers/misc/md5.h
+--- linux-2.6.24-noloop/drivers/misc/md5.h	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/drivers/misc/md5.h	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,10 @@
 +/* md5.h */
 +
@@ -6990,9 +6990,9 @@
 + asmlinkage
 +#endif
 +extern void md5_transform_CPUbyteorder(u_int32_t *, u_int32_t const *);
-diff -urN linux-2.6.23-noloop/include/linux/loop.h linux-2.6.23-AES/include/linux/loop.h
---- linux-2.6.23-noloop/include/linux/loop.h	1970-01-01 02:00:00.000000000 +0200
-+++ linux-2.6.23-AES/include/linux/loop.h	2007-10-11 20:15:59.000000000 +0300
+diff -urN linux-2.6.24-noloop/include/linux/loop.h linux-2.6.24-AES/include/linux/loop.h
+--- linux-2.6.24-noloop/include/linux/loop.h	1970-01-01 02:00:00.000000000 +0200
++++ linux-2.6.24-AES/include/linux/loop.h	2008-01-26 20:10:22.000000000 +0200
 @@ -0,0 +1,167 @@
 +#ifndef _LINUX_LOOP_H
 +#define _LINUX_LOOP_H

Modified: upstream/loop-aes/current/loop.c-2.6.patched
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/loop.c-2.6.patched?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/loop.c-2.6.patched (original)
+++ upstream/loop-aes/current/loop.c-2.6.patched Sun Mar  9 00:40:26 2008
@@ -2128,7 +2128,7 @@
 
 out_mem5:
 	while (i--)
-		blk_put_queue(disks[i]->queue);
+		blk_cleanup_queue(disks[i]->queue);
 	i = max_loop;
 out_mem4:
 	while (i--)
@@ -2154,7 +2154,7 @@
 	for (i = 0; i < max_loop; i++) {
 		del_gendisk(disks[i]);
 		put_disk(disks[i]);
-		blk_put_queue(loop_dev_ptr_arr[i]->lo_queue);
+		blk_cleanup_queue(loop_dev_ptr_arr[i]->lo_queue);
 		kfree(loop_dev_ptr_arr[i]);
 	}
 #ifdef CONFIG_DEVFS_FS

Modified: upstream/loop-aes/current/util-linux-2.12r.diff
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/util-linux-2.12r.diff?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/util-linux-2.12r.diff (original)
+++ upstream/loop-aes/current/util-linux-2.12r.diff Sun Mar  9 00:40:26 2008
@@ -470,7 +470,7 @@
 +#endif  // _AES_H
 diff -urN util-linux-2.12r/mount/lomount.c util-linux-2.12r-AES/mount/lomount.c
 --- util-linux-2.12r/mount/lomount.c	2004-12-21 00:11:04.000000000 +0200
-+++ util-linux-2.12r-AES/mount/lomount.c	2007-10-16 18:51:47.000000000 +0300
++++ util-linux-2.12r-AES/mount/lomount.c	2008-03-03 16:28:30.000000000 +0200
 @@ -1,4 +1,15 @@
 -/* Originally from Ted's losetup.c */
 +/* Taken from Ted's losetup.c - Mitch <m.dsouza at mrc-apu.cam.ac.uk> */
@@ -757,7 +757,7 @@
  			continue;/* continue trying as long as devices exist */
  		}
  		break;
-@@ -176,75 +196,626 @@
+@@ -176,75 +196,639 @@
  	}
  
  	if (!somedev)
@@ -916,6 +916,19 @@
 +	}
 +}
 +
++static int are_these_files_same(const char *name1, const char *name2)
++{
++	struct stat statbuf1;
++	struct stat statbuf2;
++
++	if(!name1 || !*name1 || !name2 || !*name2) return 0;
++	if(stat(name1, &statbuf1)) return 0;
++	if(stat(name2, &statbuf2)) return 0;
++	if(statbuf1.st_dev != statbuf2.st_dev) return 0;
++	if(statbuf1.st_ino != statbuf2.st_ino) return 0;
++	return 1;   /* are same */
++}
++
 +static char *do_GPG_pipe(char *pass)
 +{
 +	int     x, pfdi[2], pfdo[2];
@@ -986,7 +999,7 @@
 +	 * mount -t iso9660 /dev/cdrom /cdrom -o loop=/dev/loop0,encryption=AES128,gpgkey=/dev/cdrom,offset=8192
 +	 *                  ^^^^^^^^^^                                                    ^^^^^^^^^^        ^^^^
 +	 */
-+	if(loopOffsetBytes && !strcmp(loopFileName, gpgKeyFile)) {
++	if(loopOffsetBytes && are_these_files_same(loopFileName, gpgKeyFile)) {
 +		FILE *f;
 +		char b[1024];
 +		long long cnt;
@@ -1089,7 +1102,7 @@
 +		}
 +		if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break;
 +		x++;
-+	}
+ 	}
 +	warnAboutBadKeyData(x);
 +	if(x >= 65)
 +		multiKeyMode = 65;
@@ -1100,12 +1113,16 @@
 +	if(!multiKeyPass[0]) goto nomem1;
 +	return multiKeyPass[0];
 +}
-+
+ 
+-	if (pass == NULL)
+-		return "";
 +static char *sGetPass(int minLen, int warnLen)
 +{
 +	char *p, *s, *seed;
 +	int i, ask2, close_i_fd = 0;
-+
+ 
+-	pass[i] = 0;
+-	return pass;
 +	if(!passFDnumber) {
 +		if(clearTextKeyFile) {
 +			if((i = open(clearTextKeyFile, O_RDONLY)) == -1) {
@@ -1179,7 +1196,7 @@
 +		nomem:
 +		fprintf(stderr, _("Error: Unable to allocate memory\n"));
 +		return(NULL);
- 	}
++	}
 +	strcpy(s, p);
 +	memset(p, 0, i);
 +	if(ask2) {
@@ -1197,18 +1214,20 @@
 +	}
 +	strcat(s, seed);
 +	return(s);
-+}
- 
--	if (pass == NULL)
--		return "";
+ }
+ 
+-static int
+-digits_only(const char *s) {
+-	while (*s)
+-		if (!isdigit(*s++))
+-			return 0;
+-	return 1;
 +/* this is for compatibility with historic loop-AES version */
 +static void unhashed1_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize)
 +{
 +	register int    x, y, z, cnt = ile;
 +	unsigned char   *kp;
- 
--	pass[i] = 0;
--	return pass;
++
 +	memset(keyBuf, 0, bufSize);
 +	kp = keyStr;
 +	for(x = 0; x < (bufSize * 8); x += 6) {
@@ -1231,14 +1250,8 @@
 +			keyBuf[z] |= y >> (8 - (x & 7));
 +		}
 +	}
- }
- 
--static int
--digits_only(const char *s) {
--	while (*s)
--		if (!isdigit(*s++))
--			return 0;
--	return 1;
++}
++
 +/* this is for compatibility with mainline mount */
 +static void unhashed2_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize)
 +{
@@ -1369,8 +1382,8 @@
 +	close(fd);
 +	memset(&b[0], 0, sizeof(b));
 +	return 0;
- }
- 
++}
++
 +#if !defined(MAIN)
 +static int loop_fork_mkfs_command(char *device, char *fstype)
 +{
@@ -1415,9 +1428,9 @@
 +		return 1;
 +	}
 +	return 0;
-+}
+ }
 +#endif
-+
+ 
  int
 -set_loop(const char *device, const char *file, unsigned long long offset,
 -	 const char *encryption, int pfd, int *loopro) {
@@ -1438,7 +1451,7 @@
  	mode = (*loopro ? O_RDONLY : O_RDWR);
  	if ((ffd = open(file, mode)) < 0) {
  		if (!*loopro && errno == EROFS)
-@@ -256,159 +827,253 @@
+@@ -256,159 +840,253 @@
  	}
  	if ((fd = open(device, mode)) < 0) {
  		perror (device);
@@ -1691,7 +1704,7 @@
 +		}
  	}
 -	close (fd);
--
+ 
 -	if (verbose > 1)
 -		printf(_("set_loop(%s,%s,%llu): success\n"),
 -		       device, file, offset);
@@ -1701,7 +1714,7 @@
 -int 
 -del_loop (const char *device) {
 -	int fd;
- 
+-
 -	if ((fd = open (device, O_RDONLY)) < 0) {
 -		int errsv = errno;
 -		fprintf(stderr, _("loop: can't delete device %s: %s\n"),
@@ -1801,7 +1814,7 @@
  	exit(1);
  }
  
-@@ -439,107 +1104,252 @@
+@@ -439,107 +1117,252 @@
  	fprintf (stderr, "\n");
  }
  

Copied: upstream/loop-aes/current/util-linux-ng-2.13.1.diff (from r1497, upstream/loop-aes/current/util-linux-ng-2.13.0.1.diff)
URL: http://svn.debian.org/wsvn/pkg-loop-aes/upstream/loop-aes/current/util-linux-ng-2.13.1.diff?rev=1498&op=diff
==============================================================================
--- upstream/loop-aes/current/util-linux-ng-2.13.0.1.diff (original)
+++ upstream/loop-aes/current/util-linux-ng-2.13.1.diff Sun Mar  9 00:40:26 2008
@@ -7,9 +7,9 @@
 file if you generate it again by running the ./autogen.sh script. That
 ./autogen.sh script needs recent versions of autohell tools.
 
-diff -urN util-linux-ng-2.13.0.1/mount/Makefile.am util-linux-ng-2.13.0.1-AES/mount/Makefile.am
---- util-linux-ng-2.13.0.1/mount/Makefile.am	2007-10-10 00:33:57.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/Makefile.am	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/Makefile.am util-linux-ng-2.13.1-AES/mount/Makefile.am
+--- util-linux-ng-2.13.1/mount/Makefile.am	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/Makefile.am	2008-01-26 19:13:34.000000000 +0200
 @@ -12,20 +12,20 @@
  	mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \
  	getusername.h loop.h sundries.h
@@ -36,9 +36,9 @@
  losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
  
  mount_LDADD = $(LDADD_common)
-diff -urN util-linux-ng-2.13.0.1/mount/Makefile.in util-linux-ng-2.13.0.1-AES/mount/Makefile.in
---- util-linux-ng-2.13.0.1/mount/Makefile.in	2007-10-22 12:21:36.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/Makefile.in	2007-10-23 18:54:25.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/Makefile.in util-linux-ng-2.13.1-AES/mount/Makefile.in
+--- util-linux-ng-2.13.1/mount/Makefile.in	2008-01-16 14:15:31.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/Makefile.in	2008-01-26 19:13:34.000000000 +0200
 @@ -1,8 +1,8 @@
 -# Makefile.in generated by automake 1.10 from Makefile.am.
 +# Makefile.in generated by automake 1.9.5 from Makefile.am.
@@ -311,7 +311,7 @@
  am__include = @am__include@
  am__leading_dot = @am__leading_dot@
  am__quote = @am__quote@
-@@ -227,39 +322,28 @@
+@@ -227,43 +322,33 @@
  build_cpu = @build_cpu@
  build_os = @build_os@
  build_vendor = @build_vendor@
@@ -332,7 +332,7 @@
  install_sh = @install_sh@
  libdir = @libdir@
  libexecdir = @libexecdir@
--localedir = @localedir@
+-localedir = ${datadir}/locale
  localstatedir = @localstatedir@
  mandir = @mandir@
  mkdir_p = @mkdir_p@
@@ -351,7 +351,12 @@
  
  # The original default vaues of bindir and sbindir:
  usrbinexecdir = ${exec_prefix}/bin
-@@ -283,17 +367,17 @@
+ usrsbinexecdir = ${exec_prefix}/sbin
++localedir = ${datadir}/locale
+ AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \
+ 	-DLOCALEDIR=\"$(localedir)\"
+ 
+@@ -283,17 +368,17 @@
  	mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \
  	getusername.h loop.h sundries.h
  
@@ -374,7 +379,7 @@
  losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
  mount_LDADD = $(LDADD_common) $(am__append_3)
  umount_LDADD = $(LDADD_common)
-@@ -336,7 +420,7 @@
+@@ -336,7 +421,7 @@
  	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  install-binPROGRAMS: $(bin_PROGRAMS)
  	@$(NORMAL_INSTALL)
@@ -383,7 +388,7 @@
  	@list='$(bin_PROGRAMS)'; for p in $$list; do \
  	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
  	  if test -f $$p \
-@@ -362,7 +446,7 @@
+@@ -362,7 +447,7 @@
  	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
  install-sbinPROGRAMS: $(sbin_PROGRAMS)
  	@$(NORMAL_INSTALL)
@@ -392,7 +397,7 @@
  	@list='$(sbin_PROGRAMS)'; for p in $$list; do \
  	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
  	  if test -f $$p \
-@@ -385,22 +469,22 @@
+@@ -385,22 +470,22 @@
  	-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
  losetup$(EXEEXT): $(losetup_OBJECTS) $(losetup_DEPENDENCIES) 
  	@rm -f losetup$(EXEEXT)
@@ -421,7 +426,7 @@
  
  mostlyclean-compile:
  	-rm -f *.$(OBJEXT)
-@@ -411,7 +495,14 @@
+@@ -411,7 +496,14 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fsprobe.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fsprobe_blkid.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fsprobe_volumeid.Po at am__quote@
@@ -436,7 +441,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-env.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-fsprobe.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-fsprobe_blkid.Po at am__quote@
-@@ -419,10 +510,14 @@
+@@ -419,10 +511,14 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-fstab.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-getusername.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-lomount.Po at am__quote@
@@ -451,7 +456,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-sundries.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mount-xmalloc.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mtab_lock_test-fstab.Po at am__quote@
-@@ -430,6 +525,7 @@
+@@ -430,6 +526,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mtab_lock_test-xmalloc.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pivot_root.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/realpath.Po at am__quote@
@@ -459,7 +464,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sundries.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/swapon.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-env.Po at am__quote@
-@@ -438,7 +534,7 @@
+@@ -438,7 +535,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-fsprobe_volumeid.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-fstab.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-getusername.Po at am__quote@
@@ -468,7 +473,7 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-mount_mntent.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-realpath.Po at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/umount-sundries.Po at am__quote@
-@@ -447,427 +543,568 @@
+@@ -447,427 +544,568 @@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmalloc.Po at am__quote@
  
  .c.o:
@@ -1178,7 +1183,7 @@
  	@list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
  	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
  	for i in $$l2; do \
-@@ -912,7 +1149,7 @@
+@@ -912,7 +1150,7 @@
  	done
  install-man8: $(man8_MANS) $(man_MANS)
  	@$(NORMAL_INSTALL)
@@ -1187,7 +1192,7 @@
  	@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
  	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
  	for i in $$l2; do \
-@@ -1005,21 +1242,23 @@
+@@ -1005,21 +1243,23 @@
  	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
  
  distdir: $(DISTFILES)
@@ -1224,7 +1229,7 @@
  	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
  	    fi; \
-@@ -1035,7 +1274,7 @@
+@@ -1035,7 +1275,7 @@
  all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
  installdirs:
  	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
@@ -1233,7 +1238,7 @@
  	done
  install: install-am
  install-exec: install-exec-am
-@@ -1084,22 +1323,14 @@
+@@ -1084,22 +1324,14 @@
  
  install-data-am: install-man
  
@@ -1256,7 +1261,7 @@
  installcheck-am:
  
  maintainer-clean: maintainer-clean-am
-@@ -1119,28 +1350,25 @@
+@@ -1119,28 +1351,25 @@
  
  ps-am:
  
@@ -1290,9 +1295,9 @@
  
  
  install-exec-hook:
-diff -urN util-linux-ng-2.13.0.1/mount/aes.c util-linux-ng-2.13.0.1-AES/mount/aes.c
---- util-linux-ng-2.13.0.1/mount/aes.c	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/aes.c	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/aes.c util-linux-ng-2.13.1-AES/mount/aes.c
+--- util-linux-ng-2.13.1/mount/aes.c	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/aes.c	2008-01-26 19:13:34.000000000 +0200
 @@ -0,0 +1,299 @@
 +// I retain copyright in this code but I encourage its free use provided
 +// that I don't carry any responsibility for the results. I am especially 
@@ -1593,9 +1598,9 @@
 +
 +    state_out(out_blk, b0);
 +}
-diff -urN util-linux-ng-2.13.0.1/mount/aes.h util-linux-ng-2.13.0.1-AES/mount/aes.h
---- util-linux-ng-2.13.0.1/mount/aes.h	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/aes.h	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/aes.h util-linux-ng-2.13.1-AES/mount/aes.h
+--- util-linux-ng-2.13.1/mount/aes.h	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/aes.h	2008-01-26 19:13:34.000000000 +0200
 @@ -0,0 +1,97 @@
 +// I retain copyright in this code but I encourage its free use provided
 +// that I don't carry any responsibility for the results. I am especially 
@@ -1694,9 +1699,9 @@
 +// if their parameters have not changed.
 +
 +#endif  // _AES_H
-diff -urN util-linux-ng-2.13.0.1/mount/lomount.c util-linux-ng-2.13.0.1-AES/mount/lomount.c
---- util-linux-ng-2.13.0.1/mount/lomount.c	2007-10-22 11:48:24.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/lomount.c	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/lomount.c util-linux-ng-2.13.1-AES/mount/lomount.c
+--- util-linux-ng-2.13.1/mount/lomount.c	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/lomount.c	2008-03-03 16:28:30.000000000 +0200
 @@ -1,4 +1,15 @@
 -/* Originally from Ted's losetup.c */
 +/* Taken from Ted's losetup.c - Mitch <m.dsouza at mrc-apu.cam.ac.uk> */
@@ -2014,7 +2019,7 @@
  			continue;/* continue trying as long as devices exist */
  		}
  		break;
-@@ -211,75 +196,626 @@
+@@ -211,264 +196,899 @@
  	}
  
  	if (!somedev)
@@ -2066,6 +2071,7 @@
 -		}
 -		if (read(pfd, pass+i, 1) != 1 ||
 -		    pass[i] == '\n' || pass[i] == 0)
+-			break;
 +int is_loop_active(const char *dev, const char *backdev)
 +{
 +	int fd;
@@ -2083,15 +2089,19 @@
 +			ret = 1; /* backing device matches */
 +		memset(&loopinfo, 0, sizeof(loopinfo));
 +		close(fd);
-+	}
+ 	}
 +	return ret;
 +}
 +#endif
-+
+ 
+-	if (pass == NULL)
+-		return "";
 +static int rd_wr_retry(int fd, char *buf, int cnt, int w)
 +{
 +	int x, y, z;
-+
+ 
+-	pass[i] = 0;
+-	return pass;
 +	x = 0;
 +	while(x < cnt) {
 +		y = cnt - x;
@@ -2110,8 +2120,14 @@
 +		x += z;
 +	}
 +	return x;
-+}
-+
+ }
+ 
+-static int
+-digits_only(const char *s) {
+-	while (*s)
+-		if (!isdigit(*s++))
+-			return 0;
+-	return 1;
 +static char *get_FD_pass(int fd)
 +{
 +	char *p = NULL, *n;
@@ -2139,13 +2155,26 @@
 +	} while(1);
 +	if(p) p[y] = 0;
 +	return p;
-+}
-+
+ }
+ 
+-int
+-set_loop(const char *device, const char *file, unsigned long long offset,
+-	 const char *encryption, int pfd, int *loopro) {
+-	struct loop_info64 loopinfo64;
+-	int fd, ffd, mode, i;
+-	char *pass;
 +static unsigned long long mystrtoull(char *s, int acceptAT)
 +{
 +	unsigned long long v = 0;
 +	int negative = 0;
-+
+ 
+-	mode = (*loopro ? O_RDONLY : O_RDWR);
+-	if ((ffd = open(file, mode)) < 0) {
+-		if (!*loopro && errno == EROFS)
+-			ffd = open(file, mode = O_RDONLY);
+-		if (ffd < 0) {
+-			perror(file);
+-			return 1;
 +	while ((*s == ' ') || (*s == '\t'))
 +		s++;
 +	if (acceptAT && (*s == '@')) {
@@ -2159,10 +2188,14 @@
 +			sscanf(s, "%llx", &v);
 +		} else {
 +			sscanf(s, "%llo", &v);
-+		}
+ 		}
 +	} else {
 +		sscanf(s, "%llu", &v);
-+	}
+ 	}
+-	if ((fd = open(device, mode)) < 0) {
+-		perror (device);
+-		close(ffd);
+-		return 1;
 +	return negative ? -v : v;
 +}
 +
@@ -2170,9 +2203,25 @@
 +{
 +	if((x > 1) && (x != 64) && (x != 65)) {
 +		fprintf(stderr, _("Warning: Unknown key data format - using it anyway\n"));
-+	}
+ 	}
+-	*loopro = (mode == O_RDONLY);
 +}
 +
++static int are_these_files_same(const char *name1, const char *name2)
++{
++	struct stat statbuf1;
++	struct stat statbuf2;
+ 
+-	memset(&loopinfo64, 0, sizeof(loopinfo64));
++	if(!name1 || !*name1 || !name2 || !*name2) return 0;
++	if(stat(name1, &statbuf1)) return 0;
++	if(stat(name2, &statbuf2)) return 0;
++	if(statbuf1.st_dev != statbuf2.st_dev) return 0;
++	if(statbuf1.st_ino != statbuf2.st_ino) return 0;
++	return 1;   /* are same */
++}
+ 
+-	xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
 +static char *do_GPG_pipe(char *pass)
 +{
 +	int     x, pfdi[2], pfdo[2];
@@ -2180,24 +2229,32 @@
 +	pid_t   gpid;
 +	struct passwd *p;
 +	void    *oldSigPipeHandler;
-+
+ 
+-	if (encryption && *encryption) {
+-		if (digits_only(encryption)) {
+-			loopinfo64.lo_encrypt_type = atoi(encryption);
+-		} else {
+-			loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
+-			snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE,
+-				 "%s", encryption);
 +	if((getuid() == 0) && gpgHomeDir && gpgHomeDir[0]) {
 +		h = gpgHomeDir;
 +	} else {
 +		if(!(p = getpwuid(getuid()))) {
 +			fprintf(stderr, _("Error: Unable to detect home directory for uid %d\n"), (int)getuid());
 +			return NULL;
-+		}
+ 		}
 +		h = p->pw_dir;
 +	}
 +	if(!(e[0] = malloc(strlen(h) + 6))) {
 +		nomem1:
 +		fprintf(stderr, _("Error: Unable to allocate memory\n"));
 +		return NULL;
-+	}
+ 	}
 +	sprintf(e[0], "HOME=%s", h);
 +	e[1] = 0;
-+
+ 
+-	loopinfo64.lo_offset = offset;
 +	if(pipe(&pfdi[0])) {
 +		nomem2:
 +		free(e[0]);
@@ -2208,8 +2265,11 @@
 +		close(pfdi[1]);
 +		goto nomem2;
 +	}
-+
-+	/*
+ 
+-#ifdef MCL_FUTURE
+ 	/*
+-	 * Oh-oh, sensitive data coming up. Better lock into memory to prevent
+-	 * passwd etc being swapped out and left somewhere on disk.
 +	 * When this code is run as part of losetup, normal read permissions
 +	 * affect the open() below because losetup is not setuid-root.
 +	 *
@@ -2221,7 +2281,12 @@
 +	 * and is very useful in situations where non-root users mount loop
 +	 * devices with their own gpg private key, and yet don't have access
 +	 * to the actual key used to encrypt loop device.
-+	 */
+ 	 */
+-	if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) {
+-		if(mlockall(MCL_CURRENT | MCL_FUTURE)) {
+-			perror("memlock");
+-			fprintf(stderr, _("Couldn't lock into memory, exiting.\n"));
+-			exit(1);
 +	if((x = open(gpgKeyFile, O_RDONLY)) == -1) {
 +		fprintf(stderr, _("Error: unable to open %s for reading\n"), gpgKeyFile);
 +		nomem3:
@@ -2243,7 +2308,7 @@
 +	 * mount -t iso9660 /dev/cdrom /cdrom -o loop=/dev/loop0,encryption=AES128,gpgkey=/dev/cdrom,offset=8192
 +	 *                  ^^^^^^^^^^                                                    ^^^^^^^^^^        ^^^^
 +	 */
-+	if(loopOffsetBytes && !strcmp(loopFileName, gpgKeyFile)) {
++	if(loopOffsetBytes && are_these_files_same(loopFileName, gpgKeyFile)) {
 +		FILE *f;
 +		char b[1024];
 +		long long cnt;
@@ -2271,7 +2336,7 @@
 +			}
 +			if(cnt2 != cnt3) break;
 +			cnt -= cnt3;
-+		}
+ 		}
 +		if(fflush(f)) goto tmpWrErr;
 +		close(x);
 +		x = dup(fileno(f));
@@ -2315,7 +2380,8 @@
 +		execve("/usr/bin/gpg", &a[0], &e[0]);
 +		execve("/usr/local/bin/gpg", &a[0], &e[0]);
 +		exit(1);
-+	}
+ 	}
+-#endif
 +	free(e[0]);
 +	close(x);
 +	close(pfdi[0]);
@@ -2342,7 +2408,7 @@
 +		if(!multiKeyPass[x]) {
 +			/* mem alloc failed - abort */
 +			multiKeyPass[0] = 0;
- 			break;
++			break;
 +		}
 +		if(strlen(multiKeyPass[x]) < LOOP_PASSWORD_MIN_LENGTH) break;
 +		x++;
@@ -2357,7 +2423,21 @@
 +	if(!multiKeyPass[0]) goto nomem1;
 +	return multiKeyPass[0];
 +}
-+
+ 
+-	switch (loopinfo64.lo_encrypt_type) {
+-	case LO_CRYPT_NONE:
+-		loopinfo64.lo_encrypt_key_size = 0;
+-		break;
+-	case LO_CRYPT_XOR:
+-		pass = getpass(_("Password: "));
+-		goto gotpass;
+-	default:
+-		pass = xgetpass(pfd, _("Password: "));
+-	gotpass:
+-		memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
+-		xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+-		memset(pass, 0, strlen(pass));
+-		loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
 +static char *sGetPass(int minLen, int warnLen)
 +{
 +	char *p, *s, *seed;
@@ -2401,7 +2481,7 @@
 +			p = multiKeyPass[0];
 +		}
 +		ask2 = 0;
-+	}
+ 	}
 +	if(!p) goto nomem;
 +	if(gpgKeyFile && gpgKeyFile[0]) {
 +		if(ask2) {
@@ -2448,7 +2528,7 @@
 +			return(NULL);
 +		}
 +		memset(p, 0, i);
- 	}
++	}
 +	if(i < warnLen) {
 +		fprintf(stderr, _("WARNING - Please use longer password (%d or more characters)\n"), LOOP_PASSWORD_MIN_LENGTH);
 +	}
@@ -2456,16 +2536,21 @@
 +	return(s);
 +}
  
--	if (pass == NULL)
--		return "";
+-	if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
+-		int rc = 1;
 +/* this is for compatibility with historic loop-AES version */
 +static void unhashed1_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize)
 +{
 +	register int    x, y, z, cnt = ile;
 +	unsigned char   *kp;
  
--	pass[i] = 0;
--	return pass;
+-		if (errno == EBUSY) {
+-			if (verbose)
+-				printf(_("ioctl LOOP_SET_FD failed: %s\n"),
+-							strerror(errno));
+-			rc = 2;
+-		} else
+-			perror("ioctl: LOOP_SET_FD");
 +	memset(keyBuf, 0, bufSize);
 +	kp = keyStr;
 +	for(x = 0; x < (bufSize * 8); x += 6) {
@@ -2488,14 +2573,11 @@
 +			keyBuf[z] |= y >> (8 - (x & 7));
 +		}
 +	}
- }
- 
--static int
--digits_only(const char *s) {
--	while (*s)
--		if (!isdigit(*s++))
--			return 0;
--	return 1;
++}
+ 
+-		close(fd);
+-		close(ffd);
+-		return rc;
 +/* this is for compatibility with mainline mount */
 +static void unhashed2_key_setup(unsigned char *keyStr, int ile, unsigned char *keyBuf, int bufSize)
 +{
@@ -2530,15 +2612,28 @@
 +		return lseek(fd, offset, whence);
 +	} else {
 +		return llseek(fd, offset, whence);
-+	}
+ 	}
+-	close (ffd);
 +}
-+
+ 
+-	i = ioctl(fd, LOOP_SET_STATUS64, &loopinfo64);
+-	if (i) {
+-		struct loop_info loopinfo;
+-		int errsv = errno;
 +static int loop_create_random_keys(char *partition, long long offset, long long sizelimit, int loopro, unsigned char *k)
 +{
 +	int x, y, fd;
 +	sha512_context s;
 +	unsigned char b[4096];
-+
+ 
+-		i = loop_info64_to_old(&loopinfo64, &loopinfo);
+-		if (i) {
+-			errno = errsv;
+-			perror("ioctl: LOOP_SET_STATUS64");
+-		} else {
+-			i = ioctl(fd, LOOP_SET_STATUS, &loopinfo);
+-			if (i)
+-				perror("ioctl: LOOP_SET_STATUS");
 +	if(loopro) {
 +		fprintf(stderr, _("Error: read-only device %s\n"), partition);
 +		return 1;
@@ -2589,12 +2684,17 @@
 +			}
 +			if((sizelimit > 0) && ((sizeof(b) * x) > sizelimit)) break;
 +			if(rd_wr_retry(fd, &b[0], sizeof(b), 1) != sizeof(b)) break;
-+		}
+ 		}
+-		memset(&loopinfo, 0, sizeof(loopinfo));
 +		memset(&j, 0, sizeof(j));
 +		if(fsync(fd)) break;
-+	}
+ 	}
+-	memset(&loopinfo64, 0, sizeof(loopinfo64));
 +	close(fd);
-+
+ 
+-	if (i) {
+-		ioctl (fd, LOOP_CLR_FD, 0);
+-		close (fd);
 +	/*
 +	 * Use all 512 bits of hash output
 +	 */
@@ -2610,10 +2710,14 @@
 +	 */
 +	if((fd = open("/dev/urandom", O_RDONLY)) == -1) {
 +		fprintf(stderr, _("Error: unable to open /dev/urandom\n"));
-+		return 1;
-+	}
+ 		return 1;
+ 	}
+-	close (fd);
 +	rd_wr_retry(fd, &b[64], 32, 0);
-+
+ 
+-	if (verbose > 1)
+-		printf(_("set_loop(%s,%s,%llu): success\n"),
+-		       device, file, offset);
 +	/* generate multi-key hashes */
 +	x = 0;
 +	while(x < 65) {
@@ -2625,15 +2729,22 @@
 +
 +	close(fd);
 +	memset(&b[0], 0, sizeof(b));
-+	return 0;
-+}
-+
+ 	return 0;
+ }
+ 
+-int
+-del_loop (const char *device) {
+-	int fd;
 +#if !defined(MAIN)
 +static int loop_fork_mkfs_command(char *device, char *fstype)
 +{
 +	int x, y = 0;
 +	char *a[10], *e[1];
-+
+ 
+-	if ((fd = open (device, O_RDONLY)) < 0) {
+-		int errsv = errno;
+-		fprintf(stderr, _("loop: can't delete device %s: %s\n"),
+-			device, strerror (errsv));
 +	sync();
 +	if(!(x = fork())) {
 +		if((x = open("/dev/null", O_WRONLY)) >= 0) {
@@ -2663,24 +2774,38 @@
 +	}
 +	if(x == -1) {
 +		fprintf(stderr, _("Error: fork failed\n"));
-+		return 1;
-+	}
+ 		return 1;
+ 	}
+-	if (ioctl (fd, LOOP_CLR_FD, 0) < 0) {
+-		perror ("ioctl: LOOP_CLR_FD");
+-		close(fd);
 +	waitpid(x, &y, 0);
 +	sync();
 +	if(!WIFEXITED(y) || (WEXITSTATUS(y) != 0)) {
 +		fprintf(stderr, _("Error: encrypted file system mkfs failed\n"));
-+		return 1;
-+	}
-+	return 0;
+ 		return 1;
+ 	}
+-	close (fd);
+-	if (verbose > 1)
+-		printf(_("del_loop(%s): success\n"), device);
+ 	return 0;
  }
+-
+-#else /* no LOOP_SET_FD defined */
+-static void
+-mutter(void) {
+-	fprintf(stderr,
+-		_("This mount was compiled without loop support. "
+-		  "Please recompile.\n"));
+-}  
 +#endif
  
  int
--set_loop(const char *device, const char *file, unsigned long long offset,
--	 const char *encryption, int pfd, int *loopro) {
--	struct loop_info64 loopinfo64;
--	int fd, ffd, mode, i;
--	char *pass;
+-set_loop (const char *device, const char *file, unsigned long long offset,
+-	  const char *encryption, int *loopro) {
+-	mutter();
+-	return 1;
+-}
 +set_loop(const char *device, const char *file, int *loopro, const char **fstype, unsigned int *AutoChmodPtr, int busyRetVal) {
 +	struct loop_info64 loopinfo;
 +	int fd, ffd, mode, i, errRetVal = 1;
@@ -2690,32 +2815,33 @@
 +	int minPassLen = LOOP_PASSWORD_MIN_LENGTH;
 +	int run_mkfs_command = 0;
  
+-int
+-del_loop (const char *device) {
+-	mutter();
+-	return 1;
+-}
 +	loopFileName = (char *)file;
 +	multiKeyMode = 0;
- 	mode = (*loopro ? O_RDONLY : O_RDWR);
- 	if ((ffd = open(file, mode)) < 0) {
- 		if (!*loopro && errno == EROFS)
-@@ -291,180 +827,255 @@
- 	}
- 	if ((fd = open(device, mode)) < 0) {
- 		perror (device);
--		return 1;
++	mode = (*loopro ? O_RDONLY : O_RDWR);
++	if ((ffd = open(file, mode)) < 0) {
++		if (!*loopro && errno == EROFS)
++			ffd = open(file, mode = O_RDONLY);
++		if (ffd < 0) {
++			perror(file);
++			return 1;
++		}
++	}
++	if ((fd = open(device, mode)) < 0) {
++		perror (device);
 +		goto close_ffd_return1;
- 	}
- 	*loopro = (mode == O_RDONLY);
- 
--	memset(&loopinfo64, 0, sizeof(loopinfo64));
--
--	xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
--
--	if (encryption && *encryption) {
--		if (digits_only(encryption)) {
--			loopinfo64.lo_encrypt_type = atoi(encryption);
--		} else {
--			loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
--			snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE,
--				 "%s", encryption);
--		}
++	}
++	*loopro = (mode == O_RDONLY);
+ 
+-char *
+-find_unused_loop_device (void) {
+-	mutter();
+-	return 0;
+-}
 +	if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
 +		if(errno == EBUSY)
 +			errRetVal = busyRetVal;
@@ -2728,9 +2854,8 @@
 +close_ffd_return1:
 +		close (ffd);
 +		return errRetVal;
- 	}
- 
--	loopinfo64.lo_offset = offset;
++	}
++
 +	memset (&loopinfo, 0, sizeof (loopinfo));
 +	xstrncpy ((char *)loopinfo.lo_file_name, file, LO_NAME_SIZE);
 +	if (loopEncryptionType)
@@ -2739,36 +2864,27 @@
 +		loopinfo.lo_offset = mystrtoull(loopOffsetBytes, 1);
 +	if (loopSizeBytes)
 +		loopinfo.lo_sizelimit = mystrtoull(loopSizeBytes, 0);
- 
- #ifdef MCL_FUTURE
- 	/*
- 	 * Oh-oh, sensitive data coming up. Better lock into memory to prevent
- 	 * passwd etc being swapped out and left somewhere on disk.
- 	 */
--	if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) {
--		if(mlockall(MCL_CURRENT | MCL_FUTURE)) {
--			perror("memlock");
--			fprintf(stderr, _("Couldn't lock into memory, exiting.\n"));
--			exit(1);
--		}
-+
++
++#ifdef MCL_FUTURE
++	/*
++	 * Oh-oh, sensitive data coming up. Better lock into memory to prevent
++	 * passwd etc being swapped out and left somewhere on disk.
++	 */
+ 
 +	if(loopinfo.lo_encrypt_type && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 +		perror("memlock");
 +		ioctl (fd, LOOP_CLR_FD, 0);
 +		fprintf(stderr, _("Couldn't lock into memory, exiting.\n"));
 +		exit(1);
- 	}
++	}
  #endif
  
--	switch (loopinfo64.lo_encrypt_type) {
+-#ifdef MAIN
 +	switch (loopinfo.lo_encrypt_type) {
- 	case LO_CRYPT_NONE:
--		loopinfo64.lo_encrypt_key_size = 0;
++	case LO_CRYPT_NONE:
 +		loopinfo.lo_encrypt_key_size = 0;
- 		break;
- 	case LO_CRYPT_XOR:
--		pass = getpass(_("Password: "));
--		goto gotpass;
++		break;
++	case LO_CRYPT_XOR:
 +		pass = sGetPass (1, 0);
 +		if(!pass) goto loop_clr_fd_out;
 +		xstrncpy ((char *)loopinfo.lo_encrypt_key, pass, LO_KEY_SIZE);
@@ -2885,27 +3001,11 @@
 +		}
 +		memset(pass, 0, i);   /* erase original password */
 +		break;
- 	default:
--		pass = xgetpass(pfd, _("Password: "));
--	gotpass:
--		memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
--		xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
--		memset(pass, 0, strlen(pass));
--		loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
++	default:
 +		fprintf (stderr, _("Error: don't know how to get key for encryption system %d\n"), loopinfo.lo_encrypt_type);
 +		goto loop_clr_fd_out;
- 	}
- 
--	if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
--		close(fd);
--		close(ffd);
--		if (errno == EBUSY) {
--			if (verbose)
--				printf(_("ioctl LOOP_SET_FD failed: %s\n"), strerror(errno));
--			return 2;
--		} else {
--			perror("ioctl: LOOP_SET_FD");
--			return 1;
++	}
++
 +	if(loInitValue) {
 +		/* cipher modules are free to do whatever they want with this value */
 +		i = 0;
@@ -2921,23 +3021,8 @@
 +			loop_clr_fd_out:
 +			(void) ioctl (fd, LOOP_CLR_FD, 0);
 +			goto keyclean_close_fd_ffd_return1;
- 		}
- 	}
--	close (ffd);
--
--	i = ioctl(fd, LOOP_SET_STATUS64, &loopinfo64);
--	if (i) {
--		struct loop_info loopinfo;
--		int errsv = errno;
--
--		i = loop_info64_to_old(&loopinfo64, &loopinfo);
--		if (i) {
--			errno = errsv;
--			perror("ioctl: LOOP_SET_STATUS64");
--		} else {
--			i = ioctl(fd, LOOP_SET_STATUS, &loopinfo);
--			if (i)
--				perror("ioctl: LOOP_SET_STATUS");
++		}
++	}
 +	if(multiKeyMode >= 65) {
 +		if(ioctl(fd, LOOP_MULTI_KEY_SETUP_V3, &multiKeyBits[0][0]) < 0) {
 +			if(multiKeyMode == 1000) goto try_v2_setup;
@@ -2949,41 +3034,14 @@
 +		if((ioctl(fd, LOOP_MULTI_KEY_SETUP, &multiKeyBits[0][0]) < 0) && (multiKeyMode != 1000)) {
 +			perror("ioctl: LOOP_MULTI_KEY_SETUP");
 +			goto loop_clr_fd_out;
- 		}
--		memset(&loopinfo, 0, sizeof(loopinfo));
- 	}
--	memset(&loopinfo64, 0, sizeof(loopinfo64));
- 
--	if (i) {
--		ioctl (fd, LOOP_CLR_FD, 0);
--		close (fd);
--		return 1;
--	}
++		}
++	}
++
 +	memset(loopinfo.lo_encrypt_key, 0, sizeof(loopinfo.lo_encrypt_key));
 +	memset(&multiKeyBits[0][0], 0, sizeof(multiKeyBits));
- 	close (fd);
++	close (fd);
 +	close (ffd);
- 
--	if (verbose > 1)
--		printf(_("set_loop(%s,%s,%llu): success\n"),
--		       device, file, offset);
--	return 0;
--}
--
--int 
--del_loop (const char *device) {
--	int fd;
--
--	if ((fd = open (device, O_RDONLY)) < 0) {
--		int errsv = errno;
--		fprintf(stderr, _("loop: can't delete device %s: %s\n"),
--			device, strerror (errsv));
--		return 1;
--	}
--	if (ioctl (fd, LOOP_CLR_FD, 0) < 0) {
--		perror ("ioctl: LOOP_CLR_FD");
--		close(fd);
--		return 1;
++
 +#if !defined(MAIN)
 +	if(run_mkfs_command && fstype && *fstype && **fstype && (getuid() == 0)) {
 +		if(!loop_fork_mkfs_command((char *)device, (char *)(*fstype))) {
@@ -2999,49 +3057,17 @@
 +				return 1;
 +			}
 +		}
- 	}
--	close (fd);
--	if (verbose > 1)
--		printf(_("del_loop(%s): success\n"), device);
--	return 0;
--}
--
--#else /* no LOOP_SET_FD defined */
--static void
--mutter(void) {
--	fprintf(stderr,
--		_("This mount was compiled without loop support. "
--		  "Please recompile.\n"));
--}  
--
--int
--set_loop (const char *device, const char *file, unsigned long long offset,
--	  const char *encryption, int *loopro) {
--	mutter();
--	return 1;
--}
--
--int
--del_loop (const char *device) {
--	mutter();
--	return 1;
--}
++	}
 +#endif
  
--char *
--find_unused_loop_device (void) {
--	mutter();
+-#ifdef LOOP_SET_FD
 +	if (verbose > 1)
 +		printf(_("set_loop(%s,%s): success\n"), device, file);
- 	return 0;
- }
- 
--#endif
--
- #ifdef MAIN
- 
--#ifdef LOOP_SET_FD
--
++	return 0;
++}
++
++#ifdef MAIN
+ 
  #include <getopt.h>
  #include <stdarg.h>
  
@@ -3083,7 +3109,7 @@
  
  char *
  xstrdup (const char *s) {
-@@ -493,153 +1104,252 @@
+@@ -497,153 +1117,252 @@
  	fprintf (stderr, "\n");
  }
  
@@ -3448,9 +3474,9 @@
 -}
 -#endif
  #endif
-diff -urN util-linux-ng-2.13.0.1/mount/lomount.h util-linux-ng-2.13.0.1-AES/mount/lomount.h
---- util-linux-ng-2.13.0.1/mount/lomount.h	2007-10-10 01:33:43.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/lomount.h	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/lomount.h util-linux-ng-2.13.1-AES/mount/lomount.h
+--- util-linux-ng-2.13.1/mount/lomount.h	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/lomount.h	2008-01-26 19:13:34.000000000 +0200
 @@ -1,6 +1,19 @@
  extern int verbose;
 -extern int set_loop(const char *, const char *, unsigned long long,
@@ -3473,9 +3499,9 @@
 +extern char *loopOffsetBytes;
 +extern char *loopSizeBytes;
 +extern char *loopEncryptionType;
-diff -urN util-linux-ng-2.13.0.1/mount/loop.c util-linux-ng-2.13.0.1-AES/mount/loop.c
---- util-linux-ng-2.13.0.1/mount/loop.c	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/loop.c	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/loop.c util-linux-ng-2.13.1-AES/mount/loop.c
+--- util-linux-ng-2.13.1/mount/loop.c	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/loop.c	2008-01-26 19:13:34.000000000 +0200
 @@ -0,0 +1,221 @@
 +/*
 + *  loop.c
@@ -3698,9 +3724,9 @@
 +	loopinfo->lo_encrypt_type = 18; /* LO_CRYPT_CRYPTOAPI */
 +	return(loop_set_status64_ioctl(fd, loopinfo));
 +}
-diff -urN util-linux-ng-2.13.0.1/mount/loop.h util-linux-ng-2.13.0.1-AES/mount/loop.h
---- util-linux-ng-2.13.0.1/mount/loop.h	2007-04-25 15:43:38.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/loop.h	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/loop.h util-linux-ng-2.13.1-AES/mount/loop.h
+--- util-linux-ng-2.13.1/mount/loop.h	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/loop.h	2008-01-26 19:13:35.000000000 +0200
 @@ -1,6 +1,20 @@
 -#define LO_CRYPT_NONE	0
 -#define LO_CRYPT_XOR	1
@@ -3811,9 +3837,9 @@
 +extern int try_cryptoapi_loop_interface(int, struct loop_info64 *, char *);
 +
 +#endif
-diff -urN util-linux-ng-2.13.0.1/mount/losetup.8 util-linux-ng-2.13.0.1-AES/mount/losetup.8
---- util-linux-ng-2.13.0.1/mount/losetup.8	2007-10-10 01:33:43.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/losetup.8	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/losetup.8 util-linux-ng-2.13.1-AES/mount/losetup.8
+--- util-linux-ng-2.13.1/mount/losetup.8	2007-11-26 13:39:10.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/losetup.8	2008-01-26 19:13:35.000000000 +0200
 @@ -1,45 +1,29 @@
 -.TH LOSETUP 8 "2003-07-01" "Linux" "MAINTENANCE COMMANDS"
 +.TH LOSETUP 8 "2007-09-02" "Linux" "MAINTENANCE COMMANDS"
@@ -4124,9 +4150,9 @@
 +Original version: Theodore Ts'o <tytso at athena.mit.edu>
 +AES support: Jari Ruusu
 +.fi
-diff -urN util-linux-ng-2.13.0.1/mount/loumount.c util-linux-ng-2.13.0.1-AES/mount/loumount.c
---- util-linux-ng-2.13.0.1/mount/loumount.c	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/loumount.c	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/loumount.c util-linux-ng-2.13.1-AES/mount/loumount.c
+--- util-linux-ng-2.13.1/mount/loumount.c	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/loumount.c	2008-01-26 19:13:35.000000000 +0200
 @@ -0,0 +1,60 @@
 +/*
 + *  loumount.c
@@ -4188,9 +4214,9 @@
 +		printf(_("del_loop(%s): success\n"), device);
 +	return 0;
 +}
-diff -urN util-linux-ng-2.13.0.1/mount/mount.8 util-linux-ng-2.13.0.1-AES/mount/mount.8
---- util-linux-ng-2.13.0.1/mount/mount.8	2007-10-22 11:48:24.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/mount.8	2007-10-23 18:49:28.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/mount.8 util-linux-ng-2.13.1-AES/mount/mount.8
+--- util-linux-ng-2.13.1/mount/mount.8	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/mount.8	2008-01-26 19:13:35.000000000 +0200
 @@ -316,6 +316,16 @@
  .B \-v
  Verbose mode.
@@ -4243,9 +4269,9 @@
  If no explicit loop device is mentioned
  (but just an option `\fB\-o loop\fP' is given), then
  .B mount
-diff -urN util-linux-ng-2.13.0.1/mount/mount.c util-linux-ng-2.13.0.1-AES/mount/mount.c
---- util-linux-ng-2.13.0.1/mount/mount.c	2007-10-22 12:03:48.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/mount.c	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/mount.c util-linux-ng-2.13.1-AES/mount/mount.c
+--- util-linux-ng-2.13.1/mount/mount.c	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/mount.c	2008-01-26 19:13:35.000000000 +0200
 @@ -11,6 +11,7 @@
  #include <string.h>
  #include <getopt.h>
@@ -4408,7 +4434,7 @@
      if (special) {
        block_signals (SIG_UNBLOCK);
        res = status;
-@@ -1840,8 +1841,8 @@
+@@ -1846,8 +1847,8 @@
  		case 'O':		/* with -t: mount only if (not) opt */
  			test_opts = append_opt(test_opts, optarg, NULL);
  			break;
@@ -4419,9 +4445,9 @@
  			break;
  		case 'r':		/* mount readonly */
  			readonly = 1;
-diff -urN util-linux-ng-2.13.0.1/mount/rmd160.c util-linux-ng-2.13.0.1-AES/mount/rmd160.c
---- util-linux-ng-2.13.0.1/mount/rmd160.c	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/rmd160.c	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/rmd160.c util-linux-ng-2.13.1-AES/mount/rmd160.c
+--- util-linux-ng-2.13.1/mount/rmd160.c	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/rmd160.c	2008-01-26 19:13:35.000000000 +0200
 @@ -0,0 +1,532 @@
 +/* rmd160.c  -	RIPE-MD160
 + *	Copyright (C) 1998 Free Software Foundation, Inc.
@@ -4955,9 +4981,9 @@
 +    rmd160_final( &hd );
 +    memcpy( outbuf, hd.buf, 20 );
 +}
-diff -urN util-linux-ng-2.13.0.1/mount/rmd160.h util-linux-ng-2.13.0.1-AES/mount/rmd160.h
---- util-linux-ng-2.13.0.1/mount/rmd160.h	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/rmd160.h	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/rmd160.h util-linux-ng-2.13.1-AES/mount/rmd160.h
+--- util-linux-ng-2.13.1/mount/rmd160.h	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/rmd160.h	2008-01-26 19:13:35.000000000 +0200
 @@ -0,0 +1,9 @@
 +#ifndef RMD160_H
 +#define RMD160_H
@@ -4968,9 +4994,9 @@
 +#endif /*RMD160_H*/
 +
 +
-diff -urN util-linux-ng-2.13.0.1/mount/sha512.c util-linux-ng-2.13.0.1-AES/mount/sha512.c
---- util-linux-ng-2.13.0.1/mount/sha512.c	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/sha512.c	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/sha512.c util-linux-ng-2.13.1-AES/mount/sha512.c
+--- util-linux-ng-2.13.1/mount/sha512.c	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/sha512.c	2008-01-26 19:13:35.000000000 +0200
 @@ -0,0 +1,432 @@
 +/*
 + *  sha512.c
@@ -5404,9 +5430,9 @@
 +    memset(&ctx, 0, sizeof(ctx));
 +}
 +#endif
-diff -urN util-linux-ng-2.13.0.1/mount/sha512.h util-linux-ng-2.13.0.1-AES/mount/sha512.h
---- util-linux-ng-2.13.0.1/mount/sha512.h	1970-01-01 02:00:00.000000000 +0200
-+++ util-linux-ng-2.13.0.1-AES/mount/sha512.h	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/sha512.h util-linux-ng-2.13.1-AES/mount/sha512.h
+--- util-linux-ng-2.13.1/mount/sha512.h	1970-01-01 02:00:00.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/sha512.h	2008-01-26 19:13:35.000000000 +0200
 @@ -0,0 +1,45 @@
 +/*
 + *  sha512.h
@@ -5453,9 +5479,9 @@
 +/* no sha384_write(), use sha512_write() */
 +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47]  */
 +extern void sha384_hash_buffer(unsigned char *, int, unsigned char *, int);
-diff -urN util-linux-ng-2.13.0.1/mount/swapon.8 util-linux-ng-2.13.0.1-AES/mount/swapon.8
---- util-linux-ng-2.13.0.1/mount/swapon.8	2007-08-13 13:49:22.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/swapon.8	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/swapon.8 util-linux-ng-2.13.1-AES/mount/swapon.8
+--- util-linux-ng-2.13.1/mount/swapon.8	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/swapon.8	2008-01-26 19:13:35.000000000 +0200
 @@ -142,6 +142,22 @@
  .I /proc/swaps
  or
@@ -5479,9 +5505,9 @@
  .SH NOTE
  You should not use
  .B swapon
-diff -urN util-linux-ng-2.13.0.1/mount/swapon.c util-linux-ng-2.13.0.1-AES/mount/swapon.c
---- util-linux-ng-2.13.0.1/mount/swapon.c	2007-10-22 11:48:24.000000000 +0300
-+++ util-linux-ng-2.13.0.1-AES/mount/swapon.c	2007-10-23 18:49:29.000000000 +0300
+diff -urN util-linux-ng-2.13.1/mount/swapon.c util-linux-ng-2.13.1-AES/mount/swapon.c
+--- util-linux-ng-2.13.1/mount/swapon.c	2008-01-16 11:31:41.000000000 +0200
++++ util-linux-ng-2.13.1-AES/mount/swapon.c	2008-01-26 19:13:35.000000000 +0200
 @@ -1,5 +1,18 @@
  /*
   * A swapon(8)/swapoff(8) for Linux 0.99.




More information about the Pkg-loop-aes-commits mailing list