Make crypt{,_r} return NULL on failure (#1611784)

Use valgrind to check for memory leaks
This commit is contained in:
Björn Esser 2018-08-08 07:50:39 +02:00
parent 8df361c7da
commit 853ed305cd
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
3 changed files with 2826 additions and 81 deletions

View File

@ -1,78 +0,0 @@
From cc1806e214b89403152c2c53932d8d0b8aeb1e91 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Sat, 4 Aug 2018 13:02:03 +0200
Subject: [PATCH] Add alias man-pages for other crypt functions.
---
Makefile.am | 3 ++-
crypt.3 | 1 +
crypt.5 | 2 ++
crypt_gensalt.3 | 2 ++
crypt_r.3 | 1 +
crypt_ra.3 | 1 +
6 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 crypt.3
create mode 100644 crypt_r.3
create mode 100644 crypt_ra.3
diff --git a/Makefile.am b/Makefile.am
index 874db12..41ca783 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,8 @@ EXTRA_DIST = \
gen-map.awk gen-vers.awk gen-crypt-h.awk \
gen-hashes.awk sel-hashes.awk hashes.lst
-notrans_dist_man3_MANS = crypt_rn.3 crypt_gensalt.3
+notrans_dist_man3_MANS = crypt.3 crypt_r.3 crypt_ra.3 \
+ crypt_rn.3 crypt_gensalt.3
notrans_dist_man5_MANS = crypt.5
nodist_include_HEADERS = crypt.h
diff --git a/crypt.3 b/crypt.3
new file mode 100644
index 0000000..430e48f
--- /dev/null
+++ b/crypt.3
@@ -0,0 +1 @@
+.so man3/crypt_rn.3
diff --git a/crypt.5 b/crypt.5
index 5db9c92..7fe4609 100644
--- a/crypt.5
+++ b/crypt.5
@@ -279,6 +279,8 @@ that will work on an old operating system that supports nothing else.
.hash "$3$" "\e$3\e$\e$[0-9a-f]{32}" unlimited 8 256 256 0 1
.SH SEE ALSO
.BR crypt (3),
+.BR crypt_r (3),
+.BR crypt_ra (3),
.BR crypt_rn (3),
.BR crypt_gensalt (3),
.BR getpwent (3),
diff --git a/crypt_gensalt.3 b/crypt_gensalt.3
index ebfff28..3109740 100644
--- a/crypt_gensalt.3
+++ b/crypt_gensalt.3
@@ -223,6 +223,8 @@ T} Thread safety MT-Safe
.SH SEE ALSO
.ad l
.BR crypt (3),
+.BR crypt_r (3),
+.BR crypt_ra (3),
.BR crypt_rn (3),
.BR getpass (3),
.BR getpwent (3),
diff --git a/crypt_r.3 b/crypt_r.3
new file mode 100644
index 0000000..430e48f
--- /dev/null
+++ b/crypt_r.3
@@ -0,0 +1 @@
+.so man3/crypt_rn.3
diff --git a/crypt_ra.3 b/crypt_ra.3
new file mode 100644
index 0000000..430e48f
--- /dev/null
+++ b/crypt_ra.3
@@ -0,0 +1 @@
+.so man3/crypt_rn.3

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
Name: libxcrypt
Version: 4.1.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Extended crypt library for DES, MD5, Blowfish and others
# For explicit license breakdown, see the
@ -28,10 +28,11 @@ License: LGPLv2+ and BSD and Public Domain
URL: https://github.com/besser82/%{name}
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: %{url}/commit/cc1806e214b8.patch#/%{name}-4.1.1_add_other_manpages.patch
Patch0: %{url}/compare/v4.1.1...develop.patch#/%{name}-4.1.1_to_master.patch
BuildRequires: fipscheck
BuildRequires: libtool
BuildRequires: valgrind
Requires: glibc%{_isa} >= 2.26.9000-46
@ -117,6 +118,7 @@ is highly discouraged.
--disable-silent-rules \
--enable-shared \
--enable-static \
--disable-failure-tokens \
--enable-hashes=all \
--enable-obsolete-api=glibc \
--with-pkgconfigdir=%{_libdir}/pkgconfig
@ -144,6 +146,15 @@ is highly discouraged.
exit $rc;
}
%make_build check-valgrind-memcheck || \
{
rc=$?;
echo "-----BEGIN TESTLOG-----";
%{__cat} test-suite.log;
echo "-----END TESTLOG-----";
exit $rc;
}
%ldconfig_scriptlets
@ -180,8 +191,12 @@ is highly discouraged.
%changelog
* Wed Aug 08 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-3
- Make crypt{,_r} return NULL on failure (#1611784)
- Use valgrind to check for memory leaks
* Sat Aug 04 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-2
- Add manpages for crypt{,_r_ra}.3 (#1610307)
- Add manpages for crypt{,_r,_ra}.3 (#1610307)
* Wed Aug 01 2018 Björn Esser <besser82@fedoraproject.org> - 4.1.1-1
- New upstream release