[ecryptfs-utils/f13/master] - fix unsigned < 0 test (#664474)

Michal Hlavinka mhlavink at fedoraproject.org
Tue Jan 4 13:41:16 UTC 2011


commit 9a9b47fb20baf466d9eb4746731773b073e9a4e3
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Tue Jan 4 14:41:05 2011 +0100

    - fix unsigned < 0 test (#664474)

 .gitignore                         |    2 +
 ecryptfs-utils-75-werror.patch     |   39 +++++++++++++++++++++++++++--------
 ecryptfs-utils-84-fixsigness.patch |   21 +++++++++++++++++++
 ecryptfs-utils.spec                |   31 ++++++++++++++++++++++++----
 sources                            |    2 +-
 5 files changed, 80 insertions(+), 15 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e411c51..117d223 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 ecryptfs-utils_83.orig.tar.gz
 ecryptfs-mount-private.png
+/ecryptfs-mount-private.png
+/ecryptfs-utils_84.orig.tar.gz
diff --git a/ecryptfs-utils-75-werror.patch b/ecryptfs-utils-75-werror.patch
index 8844609..ee65fc4 100644
--- a/ecryptfs-utils-75-werror.patch
+++ b/ecryptfs-utils-75-werror.patch
@@ -1,6 +1,6 @@
-diff -up ecryptfs-utils-83/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror ecryptfs-utils-83/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c
---- ecryptfs-utils-83/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror	2010-03-22 09:14:49.758683763 +0100
-+++ ecryptfs-utils-83/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c	2010-03-22 09:21:16.957387907 +0100
+diff -up ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c
+--- ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror	2010-12-17 18:34:04.000000000 +0100
++++ ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c	2011-01-04 14:15:47.117777798 +0100
 @@ -86,7 +86,7 @@ static int ecryptfs_pkcs11h_deserialize(
  		pkcs11h_data->serialized_id = NULL;
  	}
@@ -141,9 +141,18 @@ diff -up ecryptfs-utils-83/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror e
  	return rc;
  }
  
-diff -up ecryptfs-utils-83/src/libecryptfs/ecryptfs-stat.c.werror ecryptfs-utils-83/src/libecryptfs/ecryptfs-stat.c
---- ecryptfs-utils-83/src/libecryptfs/ecryptfs-stat.c.werror	2009-10-20 20:49:55.000000000 +0200
-+++ ecryptfs-utils-83/src/libecryptfs/ecryptfs-stat.c	2010-03-22 09:13:24.003425916 +0100
+@@ -1120,7 +1119,7 @@ static int tf_pkcs11h_key_x509file(struc
+ 	X509 *x509 = NULL;
+ 	unsigned char *p = NULL;
+ 	FILE *fp = NULL;
+-	int rc;
++	int rc = 0;
+ 
+ 	subgraph_key_ctx = (struct pkcs11h_subgraph_key_ctx *)(*foo);
+ 
+diff -up ecryptfs-utils-84/src/libecryptfs/ecryptfs-stat.c.werror ecryptfs-utils-84/src/libecryptfs/ecryptfs-stat.c
+--- ecryptfs-utils-84/src/libecryptfs/ecryptfs-stat.c.werror	2010-12-17 18:34:04.000000000 +0100
++++ ecryptfs-utils-84/src/libecryptfs/ecryptfs-stat.c	2011-01-04 14:13:41.746022440 +0100
 @@ -146,7 +146,7 @@ int ecryptfs_parse_stat(struct ecryptfs_
  	if (buf_size < (ECRYPTFS_FILE_SIZE_BYTES
  			+ MAGIC_ECRYPTFS_MARKER_SIZE_BYTES
@@ -153,9 +162,9 @@ diff -up ecryptfs-utils-83/src/libecryptfs/ecryptfs-stat.c.werror ecryptfs-utils
  		       "bytes; there are only [%zu] bytes\n", __FUNCTION__,
  		       (ECRYPTFS_FILE_SIZE_BYTES
  			+ MAGIC_ECRYPTFS_MARKER_SIZE_BYTES
-diff -up ecryptfs-utils-83/src/pam_ecryptfs/pam_ecryptfs.c.werror ecryptfs-utils-83/src/pam_ecryptfs/pam_ecryptfs.c
---- ecryptfs-utils-83/src/pam_ecryptfs/pam_ecryptfs.c.werror	2010-02-16 18:01:43.000000000 +0100
-+++ ecryptfs-utils-83/src/pam_ecryptfs/pam_ecryptfs.c	2010-03-22 09:13:24.003425916 +0100
+diff -up ecryptfs-utils-84/src/pam_ecryptfs/pam_ecryptfs.c.werror ecryptfs-utils-84/src/pam_ecryptfs/pam_ecryptfs.c
+--- ecryptfs-utils-84/src/pam_ecryptfs/pam_ecryptfs.c.werror	2010-12-17 18:34:04.000000000 +0100
++++ ecryptfs-utils-84/src/pam_ecryptfs/pam_ecryptfs.c	2011-01-04 14:13:41.747022438 +0100
 @@ -43,31 +43,6 @@
  
  #define PRIVATE_DIR "Private"
@@ -233,3 +242,15 @@ diff -up ecryptfs-utils-83/src/pam_ecryptfs/pam_ecryptfs.c.werror ecryptfs-utils
  		goto out;
  	}
  	saved_uid = geteuid();
+diff -up ecryptfs-utils-84/src/utils/test.c.werror ecryptfs-utils-84/src/utils/test.c
+--- ecryptfs-utils-84/src/utils/test.c.werror	2010-12-17 18:34:04.000000000 +0100
++++ ecryptfs-utils-84/src/utils/test.c	2011-01-04 14:13:41.750022429 +0100
+@@ -281,7 +281,7 @@ int ecryptfs_encrypt_page(int page_cache
+ 	struct inode *lower_inode;
+ 	struct ecryptfs_crypt_stat *crypt_stat;
+ 	int rc = 0;
+-	int lower_byte_offset;
++	int lower_byte_offset = 0;
+ 	int orig_byte_offset = 0;
+ 	int num_extents_per_page;
+ #define ECRYPTFS_PAGE_STATE_UNREAD    0
diff --git a/ecryptfs-utils-84-fixsigness.patch b/ecryptfs-utils-84-fixsigness.patch
new file mode 100644
index 0000000..5a07520
--- /dev/null
+++ b/ecryptfs-utils-84-fixsigness.patch
@@ -0,0 +1,21 @@
+diff -up ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.fixsigness ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c
+--- ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.fixsigness	2011-01-04 14:15:58.711761181 +0100
++++ ecryptfs-utils-84/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c	2011-01-04 14:15:58.744761153 +0100
+@@ -1144,7 +1144,7 @@ static int tf_pkcs11h_key_x509file(struc
+ 			goto out;
+ 		}
+ 
+-		if ((subgraph_key_ctx->pkcs11h_data.certificate_blob_size = i2d_X509 (x509, NULL)) < 0	) {
++		if ((ssize_t)(subgraph_key_ctx->pkcs11h_data.certificate_blob_size = i2d_X509 (x509, NULL)) < 0	) {
+ 			syslog(LOG_ERR, "PKCS#11: Cannot read decode certificate");
+ 			rc = -EIO;
+ 			goto out;
+@@ -1165,7 +1165,7 @@ static int tf_pkcs11h_key_x509file(struc
+ 		 */
+ 		p = subgraph_key_ctx->pkcs11h_data.certificate_blob;
+ 
+-		if ((subgraph_key_ctx->pkcs11h_data.certificate_blob_size = i2d_X509 (x509, &p)) < 0) {
++		if ((ssize_t)(subgraph_key_ctx->pkcs11h_data.certificate_blob_size = i2d_X509 (x509, &p)) < 0) {
+ 			syslog(LOG_ERR, "PKCS#11: Cannot read decode certificate");
+ 			goto out;
+ 		}
diff --git a/ecryptfs-utils.spec b/ecryptfs-utils.spec
index f732939..4bd29dc 100644
--- a/ecryptfs-utils.spec
+++ b/ecryptfs-utils.spec
@@ -4,8 +4,8 @@
 %global _sbindir /sbin
 
 Name: ecryptfs-utils
-Version: 83
-Release: 6%{?dist}
+Version: 84
+Release: 2%{?dist}
 Summary: The eCryptfs mount helper and support libraries
 Group: System Environment/Base
 License: GPLv2+
@@ -26,6 +26,9 @@ Patch3: ecryptfs-utils-83-fixsalt.patch
 # fedora/rhel specific, rhbz#486139, remove nss dependency from umount.ecryptfs
 Patch4: ecryptfs-utils-83-splitnss.patch
 
+# rhbz#664474, fix unsigned < 0 test
+Patch5: ecryptfs-utils-84-fixsigness.patch
+
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 Requires: keyutils, cryptsetup-luks, util-linux-ng, gettext
 BuildRequires: libgcrypt-devel keyutils-libs-devel openssl-devel pam-devel
@@ -67,9 +70,10 @@ the interface supplied by the ecryptfs-utils library.
 %patch2 -p1 -b .nocryptdisks
 %patch3 -p1 -b .fixsalt
 %patch4 -p1 -b .splitnss
+%patch5 -p1 -b .fixsigness
 
 %build
-export CFLAGS="$RPM_OPT_FLAGS -ggdb -O2 -Werror"
+export CFLAGS="$RPM_OPT_FLAGS -ggdb -O2 -Werror -Wtype-limits"
 #we're modifing Makefile.am
 autoreconf -fiv
 %configure --disable-rpath --enable-tspi --enable-nss --enable-pkcs11-helper
@@ -136,6 +140,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/ecryptfs-manager
 %{_bindir}/ecryptfs-migrate-home
 %{_bindir}/ecryptfs-mount-private
+%{_bindir}/ecryptfs-recover-private
 %{_bindir}/ecryptfs-rewrap-passphrase
 %{_bindir}/ecryptfs-rewrite-file
 %{_bindir}/ecryptfs-setup-private
@@ -157,6 +162,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/ecryptfs-generate-tpm-key.1.gz
 %{_mandir}/man1/ecryptfs-insert-wrapped-passphrase-into-keyring.1.gz
 %{_mandir}/man1/ecryptfs-mount-private.1.gz
+%{_mandir}/man1/ecryptfs-recover-private.1.gz
 %{_mandir}/man1/ecryptfs-rewrap-passphrase.1.gz
 %{_mandir}/man1/ecryptfs-rewrite-file.1.gz
 %{_mandir}/man1/ecryptfs-setup-private.1.gz
@@ -192,14 +198,29 @@ rm -rf $RPM_BUILD_ROOT
 %{python_sitearch}/ecryptfs-utils/_libecryptfs.so
 
 %changelog
-* Thu Sep 23 2010 Michal Hlavinka <mhlavink at redhat.com> - 83-6
+* Mon Jan 04 2011 Michal Hlavinka <mhlavink at redhat.com> - 84-2
+- fix unsigned < 0 test (#664474)
+
+* Mon Dec 20 2010 Michal Hlavinka <mhlavink at redhat.com> - 84-1
+- ecryptfs-utils updated to 84
+
+* Wed Sep 29 2010 jkeating - 83-9
+- Rebuilt for gcc bug 634757
+
+* Wed Sep 22 2010 Michal Hlavinka <mhlavink at redhat.com> - 83-8
 - add missing gettext require (#630212)
 
+* Mon Jul 26 2010 Michal Hlavinka <mhlavink at redhat.com> - 83-7
+- fix ftbfs for python mass rebuild
+
+* Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 83-6
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+
 * Tue May 04 2010 Michal Hlavinka <mhlavink at redhat.com> - 83-5
 - remove nss dependency from umount.ecryptfs
 
 * Fri Apr 16 2010 Michal Hlavinka <mhlavink at redhat.com> - 83-4
-- make salt working together with passwd_file 
+- make salt working together with passwd_file
 
 * Mon Mar 22 2010 Michal Hlavinka <mhlavink at redhat.com> - 83-3
 - enable PKCS#11 support
diff --git a/sources b/sources
index 45a75f8..f1269e6 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-1c97d96437d62921744647d4157a8f3e  ecryptfs-utils_83.orig.tar.gz
 e612ddb9ccb17f8fec79df26e626a8c6  ecryptfs-mount-private.png
+635c74aad2f95cb77b01268b46974a9f  ecryptfs-utils_84.orig.tar.gz


More information about the scm-commits mailing list