From d63810f84b39033b7c8c31d726e54a08f535d08c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 03:39:47 +0000 Subject: import libnfsidmap-0.25-12.el7 --- diff --git a/SOURCES/libnfsidmap-0.25-nullnames.patch b/SOURCES/libnfsidmap-0.25-nullnames.patch new file mode 100644 index 0000000..0fb07cc --- /dev/null +++ b/SOURCES/libnfsidmap-0.25-nullnames.patch @@ -0,0 +1,42 @@ +commit 82718594eb8e6afabc572cea2da1caab69e9a720 +Author: Steve Dickson +Date: Thu Apr 30 13:55:32 2015 -0400 + + Handle NULL names better + + Detect when an application passes in NULL names + and fail gracefully instead of crashing hard. + + Signed-off-by: Steve Dickson + +diff --git a/libnfsidmap.c b/libnfsidmap.c +index 833f94c..a8a9229 100644 +--- a/libnfsidmap.c ++++ b/libnfsidmap.c +@@ -100,8 +100,11 @@ static char * toupper_str(char *s) + + static int id_as_chars(char *name, uid_t *id) + { +- long int value = strtol(name, NULL, 10); ++ long int value; + ++ if (name == NULL) ++ return 0; ++ value = strtol(name, NULL, 10); + if (value == 0) { + /* zero value ids are valid */ + if (strcmp(name, "0") != 0) +diff --git a/nss.c b/nss.c +index f8129fe..b3fef5a 100644 +--- a/nss.c ++++ b/nss.c +@@ -135,6 +135,9 @@ static char *strip_domain(const char *name, const char *domain) + char *l = NULL; + int len; + ++ if (name == NULL) ++ goto out; ++ + c = strrchr(name, '@'); + if (c == NULL && domain != NULL) + goto out; diff --git a/SPECS/libnfsidmap.spec b/SPECS/libnfsidmap.spec index 6f87062..88e02b4 100644 --- a/SPECS/libnfsidmap.spec +++ b/SPECS/libnfsidmap.spec @@ -3,8 +3,8 @@ Summary: NFSv4 User and Group ID Mapping Library Name: libnfsidmap Version: 0.25 -Release: 11%{?dist} -Provides: nfs-utils-lib +Release: 12%{?dist} +Provides: libnfsidmap Obsoletes: nfs-utils-lib URL: http://www.citi.umich.edu/projects/nfsv4/linux/ License: BSD @@ -16,6 +16,10 @@ Patch002: libnfsidmap-0.25-zero-ids.patch Patch003: libnfsidmap-0.25-nobody.patch Patch004: libnfsidmap-0.25-strrchr.patch Patch005: libnfsidmap-0.25-warnings.patch +# +# RHEL7.2 +# +Patch006: libnfsidmap-0.25-nullnames.patch Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -54,6 +58,8 @@ developing programs which use the libnfsidmap library. %patch004 -p1 # 1152658 - A large number of warning occur when the source is compiled %patch005 -p1 +# 1214882 - libnfsidmap: crash due to not checking argument +%patch006 -p1 rm -f configure.in %build @@ -97,6 +103,9 @@ rm -rf %{buildroot} %{_root_libdir}/*.so %changelog +* Mon May 4 2015 Steve Dickson 0.25-12 +- Handle NULL names better (bz 1214882) + * Tue Oct 21 2014 Steve Dickson 0.25-11 - Accept full qualified usernames a a user (bz 1114053) - Removed a number of warnings (bz 1152658)