Add a patch to fix the parameter type of YESCRYPT_salt_cost()

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
This commit is contained in:
Björn Esser 2021-06-21 14:49:14 +02:00
parent cb2f54a2c1
commit 0946f2a3b0
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From 8d987bc55ccb65a3ef3a541cc5e351cfcbef0c90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Sat, 12 Jun 2021 19:05:07 +0200
Subject: [PATCH] libmisc/salt.c: Use int pointer for YESCRYPT_salt_cost().
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The corresponding functions for the other hash methods all take
a pointer to an integer value as the only paramater, so this
particular function should do so as well.
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
libmisc/salt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmisc/salt.c b/libmisc/salt.c
index c35c6797..1bfa015b 100644
--- a/libmisc/salt.c
+++ b/libmisc/salt.c
@@ -34,7 +34,7 @@ static /*@observer@*/const char *BCRYPT_salt_rounds (/*@null@*/int *prefered_rou
#endif /* USE_BCRYPT */
#ifdef USE_YESCRYPT
static /*@observer@*/const char *gensalt_yescrypt (void);
-static /*@observer@*/const char *YESCRYPT_salt_cost (/*@null@*/long *prefered_rounds);
+static /*@observer@*/const char *YESCRYPT_salt_cost (/*@null@*/int *prefered_cost);
#endif /* USE_YESCRYPT */
#ifndef HAVE_L64A
@@ -277,7 +277,7 @@ static /*@observer@*/const char *gensalt_bcrypt (void)
/*
* Return a salt prefix specifying the cost for the YESCRYPT method.
*/
-static /*@observer@*/const char *YESCRYPT_salt_cost (/*@null@*/long *prefered_cost)
+static /*@observer@*/const char *YESCRYPT_salt_cost (/*@null@*/int *prefered_cost)
{
static char cost_prefix[5];
long cost;

View File

@ -97,6 +97,8 @@ Patch56: shadow-4.8.1-man_clarify_subid_delegation.patch
Patch57: shadow-4.8.1-libsubid_make_logfd_not_extern.patch
# https://github.com/shadow-maint/shadow/commit/5cd04d03f94622c12220d4a6352824af081b8531
Patch58: shadow-4.8.1-yescrypt-support.patch
# https://github.com/shadow-maint/shadow/pull/358
Patch59: shadow-4.8.1-fix_YESCRYPT_salt_cost_param_type.patch
License: BSD and GPLv2+
BuildRequires: make
@ -180,6 +182,7 @@ Development files for shadow-utils-subid.
%patch56 -p1 -b .man_clarify_subid_delegation
%patch57 -p1 -b .libsubid_make_logfd_not_extern
%patch58 -p1 -b .yescrypt
%patch59 -p1 -b .YESCRYPT_salt_cost_param_type
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
cp -f doc/HOWTO.utf8 doc/HOWTO
@ -351,6 +354,7 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la
%changelog
* Mon Jun 21 2021 Björn Esser <besser82@fedoraproject.org> - 2:4.8.1-12
- Backport support for yescrypt hash method
- Add a patch to fix the parameter type of YESCRYPT_salt_cost()
* Mon Jun 21 2021 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.8.1-11
- libsubid: don't print error messages on stderr by default