Update to version 1.1.8

This commit is contained in:
Andreas Schneider 2020-02-17 11:18:52 +01:00
parent 3f12601a5f
commit ecca680f19
5 changed files with 11 additions and 235 deletions

2
.gitignore vendored
View File

@ -7,3 +7,5 @@
/nss_wrapper-1.1.5.tar.gz.asc
/nss_wrapper-1.1.7.tar.gz
/nss_wrapper-1.1.7.tar.gz.asc
/nss_wrapper-1.1.8.tar.gz
/nss_wrapper-1.1.8.tar.gz.asc

View File

@ -1,204 +0,0 @@
From 79b48745f55cc4947b437f0f1912cbad51eade63 Mon Sep 17 00:00:00 2001
From: Samuel Cabrero <scabrero@suse.de>
Date: Mon, 11 Nov 2019 18:31:17 +0100
Subject: [PATCH] nwrap: Use size_t for iterations, can't be negative
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
---
src/nss_wrapper.c | 46 ++++++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 9b3e180..ff41eeb 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -625,7 +625,7 @@ struct nwrap_libc {
};
struct nwrap_main {
- int num_backends;
+ size_t num_backends;
struct nwrap_backend *backends;
struct nwrap_libc *libc;
};
@@ -1559,7 +1559,7 @@ static void *nwrap_load_module(const char *so_path)
static bool nwrap_module_init(const char *name,
struct nwrap_ops *ops,
const char *so_path,
- int *num_backends,
+ size_t *num_backends,
struct nwrap_backend **backends)
{
struct nwrap_backend *b;
@@ -4634,7 +4634,7 @@ again:
static struct passwd *nwrap_getpwnam(const char *name)
{
- int i;
+ size_t i;
struct passwd *pwd;
for (i=0; i < nwrap_main_global->num_backends; i++) {
@@ -4664,7 +4664,8 @@ struct passwd *getpwnam(const char *name)
static int nwrap_getpwnam_r(const char *name, struct passwd *pwdst,
char *buf, size_t buflen, struct passwd **pwdstp)
{
- int i,ret;
+ size_t i;
+ int ret;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4701,7 +4702,7 @@ int getpwnam_r(const char *name, struct passwd *pwdst,
static struct passwd *nwrap_getpwuid(uid_t uid)
{
- int i;
+ size_t i;
struct passwd *pwd;
for (i=0; i < nwrap_main_global->num_backends; i++) {
@@ -4731,7 +4732,8 @@ struct passwd *getpwuid(uid_t uid)
static int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst,
char *buf, size_t buflen, struct passwd **pwdstp)
{
- int i,ret;
+ size_t i;
+ int ret;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4766,7 +4768,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwdst,
static void nwrap_setpwent(void)
{
- int i;
+ size_t i;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4790,7 +4792,7 @@ void setpwent(void)
static struct passwd *nwrap_getpwent(void)
{
- int i;
+ size_t i;
struct passwd *pwd;
for (i=0; i < nwrap_main_global->num_backends; i++) {
@@ -4821,7 +4823,8 @@ struct passwd *getpwent(void)
static int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
size_t buflen, struct passwd **pwdstp)
{
- int i,ret;
+ size_t i;
+ int ret;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4870,7 +4873,7 @@ int getpwent_r(struct passwd *pwdst, char *buf,
static void nwrap_endpwent(void)
{
- int i;
+ size_t i;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4894,7 +4897,7 @@ void endpwent(void)
static int nwrap_initgroups(const char *user, gid_t group)
{
- int i;
+ size_t i;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4925,7 +4928,7 @@ int initgroups(const char *user, gid_t group)
static struct group *nwrap_getgrnam(const char *name)
{
- int i;
+ size_t i;
struct group *grp;
for (i=0; i < nwrap_main_global->num_backends; i++) {
@@ -4955,7 +4958,8 @@ struct group *getgrnam(const char *name)
static int nwrap_getgrnam_r(const char *name, struct group *grdst,
char *buf, size_t buflen, struct group **grdstp)
{
- int i, ret;
+ size_t i;
+ int ret;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -4996,7 +5000,7 @@ int getgrnam_r(const char *name, struct group *grp,
static struct group *nwrap_getgrgid(gid_t gid)
{
- int i;
+ size_t i;
struct group *grp;
for (i=0; i < nwrap_main_global->num_backends; i++) {
@@ -5026,7 +5030,8 @@ struct group *getgrgid(gid_t gid)
static int nwrap_getgrgid_r(gid_t gid, struct group *grdst,
char *buf, size_t buflen, struct group **grdstp)
{
- int i,ret;
+ size_t i;
+ int ret;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -5063,7 +5068,7 @@ int getgrgid_r(gid_t gid, struct group *grdst,
static void nwrap_setgrent(void)
{
- int i;
+ size_t i;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -5098,7 +5103,7 @@ out:
static struct group *nwrap_getgrent(void)
{
- int i;
+ size_t i;
struct group *grp;
for (i=0; i < nwrap_main_global->num_backends; i++) {
@@ -5129,7 +5134,8 @@ struct group *getgrent(void)
static int nwrap_getgrent_r(struct group *grdst, char *buf,
size_t buflen, struct group **grdstp)
{
- int i,ret;
+ size_t i;
+ int ret;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -5179,7 +5185,7 @@ int getgrent_r(struct group *src, char *buf,
static void nwrap_endgrent(void)
{
- int i;
+ size_t i;
for (i=0; i < nwrap_main_global->num_backends; i++) {
struct nwrap_backend *b = &nwrap_main_global->backends[i];
@@ -6059,7 +6065,7 @@ void nwrap_constructor(void)
*/
void nwrap_destructor(void)
{
- int i;
+ size_t i;
NWRAP_LOCK_ALL;
if (nwrap_main_global != NULL) {
--
2.22.0

View File

@ -1,24 +0,0 @@
From 9d72b6e5dac0e07be468122c0a909341cbf942bc Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Thu, 14 Nov 2019 10:35:27 +0100
Subject: [PATCH] pkgconfig: Fix path to library in nss_wrapper.pc
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org
---
nss_wrapper.pc.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nss_wrapper.pc.cmake b/nss_wrapper.pc.cmake
index fb9afd7..884c90b 100644
--- a/nss_wrapper.pc.cmake
+++ b/nss_wrapper.pc.cmake
@@ -1,4 +1,4 @@
Name: @PROJECT_NAME@
Description: The nss_wrapper library
Version: @PROJECT_VERSION@
-Libs: @CMAKE_INSTALL_LIBDIR@/@NSS_WRAPPER_LIB@
+Libs: @CMAKE_INSTALL_FULL_LIBDIR@/@NSS_WRAPPER_LIB@
--
2.22.0

View File

@ -1,6 +1,6 @@
Name: nss_wrapper
Version: 1.1.7
Release: 4%{?dist}
Version: 1.1.8
Release: 1%{?dist}
License: BSD
Summary: A wrapper for the user, group and hosts NSS API
@ -10,8 +10,6 @@ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc
Source2: nss_wrapper.keyring
Patch0: https://gitlab.com/cwrap/nss_wrapper/commit/9d72b6e5dac0e07be468122c0a909341cbf942bc.patch
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gnupg2
@ -76,7 +74,7 @@ make test
popd
%files
%doc AUTHORS README.md ChangeLog
%doc AUTHORS README.md CHANGELOG
%license LICENSE
%{_bindir}/nss_wrapper.pl
%{_libdir}/libnss_wrapper.so*
@ -87,6 +85,10 @@ popd
%{_mandir}/man1/nss_wrapper.1*
%changelog
* Mon Feb 17 2020 Andreas Schneider <asn@redhat.com> - 1.1.8-1
- Update to version 1.1.8
- resolves: #1799808
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (nss_wrapper-1.1.7.tar.gz) = 306f5d77f2e4263d36cad67cbd61a1fa54a672541e881849c5d5c73cc9b3a1bacb2605a247ea7f81e9b381e14ac0ae0d1e063b2ee48a151eea3d3a8f7c8c90c2
SHA512 (nss_wrapper-1.1.7.tar.gz.asc) = da6ff22435691a9fe8f4dc0a689c467d3468754263fd1ba9012e4176c7803b3db3751feccfd6e24966e2990e0be19dc1ff71159d2139d5ab6b6b5780215ea812
SHA512 (nss_wrapper-1.1.8.tar.gz) = 8e586e18cf05b117d137e5dda751a6094f53d080e590fdfc8ac1709cbd50dee484f06bddff837632caf86a777d3d61d276b792467063c60fd78a7a66821df75d
SHA512 (nss_wrapper-1.1.8.tar.gz.asc) = b527a6833f3f1aac657b1102c09383a5bb22c646d6f9810578dc75825fc7437f7c0c7ed6a14bd8e040873e62d513cb8e4d965ba6cb9b00cd4b366e4ad673afd1