rpms/cryptsetup-luks/F-13 cryptsetup-fix-activate-null.patch, NONE, 1.1 cryptsetup-fix-alignment-ioctl.patch, NONE, 1.1 cryptsetup-luks.spec, 1.78, 1.79 sources, 1.19, 1.20

Till Maas till at fedoraproject.org
Fri Jul 2 17:41:08 UTC 2010


Author: till

Update of /cvs/pkgs/rpms/cryptsetup-luks/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv13364

Modified Files:
	cryptsetup-luks.spec sources 
Added Files:
	cryptsetup-fix-activate-null.patch 
	cryptsetup-fix-alignment-ioctl.patch 
Log Message:
sync with devel (Red Hat Bug #610885)


cryptsetup-fix-activate-null.patch:
 ChangeLog   |    1 +
 lib/setup.c |   11 ++++++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

--- NEW FILE cryptsetup-fix-activate-null.patch ---
--- cryptsetup-1.1.2.old/ChangeLog	2010-06-07 09:34:04.000000000 +0200
+++ cryptsetup-1.1.2/ChangeLog	2010-06-07 09:34:49.000000000 +0200
@@ -1,5 +1,6 @@
 2010-06-01  Milan Broz  <mbroz at redhat.com>
 	* Fix device alignment ioctl calls parameters.
+	* Fix activate_by_* API calls to handle NULL device name as documented.
 
 2010-05-30  Milan Broz  <mbroz at redhat.com>
 	* Version 1.1.2.
--- cryptsetup-1.1.2.old/lib/setup.c	2010-05-29 17:30:48.000000000 +0200
+++ cryptsetup-1.1.2/lib/setup.c	2010-06-07 09:34:49.000000000 +0200
@@ -355,6 +355,9 @@ static int create_device_helper(struct c
 	char *processed_key = NULL;
 	int r;
 
+	if (!name)
+		return -EINVAL;
+
 	ci = crypt_status(cd, name);
 	if (ci == CRYPT_INVALID)
 		return -EINVAL;
@@ -1656,9 +1659,6 @@ int crypt_activate_by_passphrase(struct
 		name ? "Activating" : "Checking", name ?: "",
 		keyslot, passphrase ? "" : "[none] ");
 
-	if (!name)
-		return -EINVAL;
-
 	/* plain, use hashed passphrase */
 	if (isPLAIN(cd->type))
 		return create_device_helper(cd, name, cd->plain_hdr.hash,
@@ -1712,7 +1712,7 @@ int crypt_activate_by_keyfile(struct cry
 	int r;
 
 	log_dbg("Activating volume %s [keyslot %d] using keyfile %s.",
-		name, keyslot, keyfile ?: "[none]");
+		name ?: "", keyslot, keyfile ?: "[none]");
 
 	if (!isLUKS(cd->type)) {
 		log_err(cd, _("This operation is supported only for LUKS device.\n"));
@@ -1744,7 +1744,8 @@ int crypt_activate_by_keyfile(struct cry
 
 	if (r >= 0) {
 		keyslot = r;
-		r = open_from_hdr_and_mk(cd, mk, name, flags);
+		if (name)
+			r = open_from_hdr_and_mk(cd, mk, name, flags);
 	}
 
 	LUKS_dealloc_masterkey(mk);

cryptsetup-fix-alignment-ioctl.patch:
 ChangeLog   |    3 +++
 lib/utils.c |   16 ++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

--- NEW FILE cryptsetup-fix-alignment-ioctl.patch ---
--- cryptsetup-1.1.2.old/ChangeLog	2010-06-07 09:31:25.000000000 +0200
+++ cryptsetup-1.1.2/ChangeLog	2010-06-07 09:31:39.000000000 +0200
@@ -1,3 +1,6 @@
+2010-06-01  Milan Broz  <mbroz at redhat.com>
+	* Fix device alignment ioctl calls parameters.
+
 2010-05-30  Milan Broz  <mbroz at redhat.com>
 	* Version 1.1.2.
 
--- cryptsetup-1.1.2.old/lib/utils.c	2010-05-27 18:02:06.000000000 +0200
+++ cryptsetup-1.1.2/lib/utils.c	2010-06-07 09:31:39.000000000 +0200
@@ -690,8 +690,8 @@ void get_topology_alignment(const char *
 			    unsigned long *alignment_offset,   /* bytes */
 			    unsigned long default_alignment)
 {
-	unsigned int dev_alignment_offset = 0;
-	unsigned long min_io_size = 0, opt_io_size = 0;
+	int dev_alignment_offset = 0;
+	unsigned int min_io_size = 0, opt_io_size = 0;
 	int fd;
 
 	*required_alignment = default_alignment;
@@ -713,18 +713,18 @@ void get_topology_alignment(const char *
 		opt_io_size = min_io_size;
 
 	/* alignment offset, bogus -1 means misaligned/unknown */
-	if (ioctl(fd, BLKALIGNOFF, &dev_alignment_offset) == -1 || (int)dev_alignment_offset < 0)
+	if (ioctl(fd, BLKALIGNOFF, &dev_alignment_offset) == -1 || dev_alignment_offset < 0)
 		dev_alignment_offset = 0;
 
-	if (*required_alignment < min_io_size)
-		*required_alignment = min_io_size;
+	if (*required_alignment < (unsigned long)min_io_size)
+		*required_alignment = (unsigned long)min_io_size;
 
-	if (*required_alignment < opt_io_size)
-		*required_alignment = opt_io_size;
+	if (*required_alignment < (unsigned long)opt_io_size)
+		*required_alignment = (unsigned long)opt_io_size;
 
 	*alignment_offset = (unsigned long)dev_alignment_offset;
 
-	log_dbg("Topology: IO (%lu/%lu), offset = %lu; Required alignment is %lu bytes.",
+	log_dbg("Topology: IO (%u/%u), offset = %lu; Required alignment is %lu bytes.",
 		min_io_size, opt_io_size, *alignment_offset, *required_alignment);
 out:
 	(void)close(fd);


Index: cryptsetup-luks.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cryptsetup-luks/F-13/cryptsetup-luks.spec,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -p -r1.78 -r1.79
--- cryptsetup-luks.spec	17 Jan 2010 13:59:41 -0000	1.78
+++ cryptsetup-luks.spec	2 Jul 2010 17:41:08 -0000	1.79
@@ -1,7 +1,7 @@
 Summary: A utility for setting up encrypted filesystems
 Name: cryptsetup-luks
-Version: 1.1.0
-Release: 1%{?dist}
+Version: 1.1.2
+Release: 2%{?dist}
 License: GPLv2
 Group: Applications/System
 URL: http://cryptsetup.googlecode.com/
@@ -16,6 +16,8 @@ Requires: cryptsetup-luks-libs = %{versi
 %define _root_sbindir /sbin
 %define upstream_version %{version}
 Source0: http://cryptsetup.googlecode.com/files/cryptsetup-%{upstream_version}.tar.bz2
+Patch0: cryptsetup-fix-alignment-ioctl.patch
+Patch1: cryptsetup-fix-activate-null.patch
 
 %description
 This package contains cryptsetup, a utility for setting up
@@ -41,9 +43,11 @@ This package contains the cryptsetup sha
 
 %prep
 %setup -q -n cryptsetup-%{upstream_version}
+%patch0 -p1 -b align
+%patch1 -p1 -b activate
 
 iconv -f latin1 -t utf8 ChangeLog > ChangeLog.new
-mv -f ChangeLog.new ChangeLog 
+mv -f ChangeLog.new ChangeLog
 
 %build
 %configure  --sbindir=%{_root_sbindir} --libdir=/%{_lib}
@@ -57,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 rm -rf  $RPM_BUILD_ROOT/%{_lib}/*.la $RPM_BUILD_ROOT/%{_lib}/cryptsetup
 
-# move libcryptsetup.so to %{_libdir}
+# move libcryptsetup.so to %%{_libdir}
 pushd $RPM_BUILD_ROOT/%{_lib}
 rm libcryptsetup.so
 mkdir -p $RPM_BUILD_ROOT/%{_libdir}
@@ -90,6 +94,24 @@ popd 
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Mon Jun 07 2010 Milan Broz <mbroz at redhat.com> - 1.1.2-2
+- Fix alignment ioctl use.
+- Fix API activation calls to handle NULL device name.
+
+* Sun May 30 2010 Milan Broz <mbroz at redhat.com> - 1.1.2-1
+- Update to cryptsetup 1.1.2
+- Fix luksOpen handling of new line char on stdin.
+
+* Sun May 23 2010 Milan Broz <mbroz at redhat.com> - 1.1.1-1
+- Update to cryptsetup 1.1.1
+- Fix luksClose for stacked LUKS/LVM devices.
+
+* Mon May 03 2010 Milan Broz <mbroz at redhat.com> - 1.1.1-0.2
+- Update to cryptsetup 1.1.1-rc2.
+
+* Sat May 01 2010 Milan Broz <mbroz at redhat.com> - 1.1.1-0.1
+- Update to cryptsetup 1.1.1-rc1.
+
 * Sun Jan 17 2010 Milan Broz <mbroz at redhat.com> - 1.1.0-1
 - Update to cryptsetup 1.1.0.
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cryptsetup-luks/F-13/sources,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -p -r1.19 -r1.20
--- sources	17 Jan 2010 13:59:41 -0000	1.19
+++ sources	2 Jul 2010 17:41:08 -0000	1.20
@@ -1 +1 @@
-8177f1833f4d6aaacc5812046d2010b6  cryptsetup-1.1.0.tar.bz2
+f3928c1f1d49fcee39bb1e8d42fe707a  cryptsetup-1.1.2.tar.bz2



More information about the scm-commits mailing list