[libnfsidmap/f21] Updated to latest rc release: libnfsidmap-0-27-rc1

Steve Dickson steved at fedoraproject.org
Fri Oct 24 12:36:12 UTC 2014


commit 98e743ae7f80be114a8d753d5a4fb97b972abbaa
Author: Steve Dickson <steved at redhat.com>
Date:   Thu Oct 9 17:33:54 2014 -0400

    Updated to latest rc release: libnfsidmap-0-27-rc1
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 libnfsidmap-0.27-rc1.patch |  269 ++++++++++++++++++++++++++++++++++++++++++++
 libnfsidmap.spec           |    9 ++-
 2 files changed, 277 insertions(+), 1 deletions(-)
---
diff --git a/libnfsidmap-0.27-rc1.patch b/libnfsidmap-0.27-rc1.patch
new file mode 100644
index 0000000..e9eef05
--- /dev/null
+++ b/libnfsidmap-0.27-rc1.patch
@@ -0,0 +1,269 @@
+diff -up libnfsidmap-0.26/configure.ac.orig libnfsidmap-0.26/configure.ac
+--- libnfsidmap-0.26/configure.ac.orig	2014-10-09 17:29:01.651649607 -0400
++++ libnfsidmap-0.26/configure.ac	2014-10-09 17:29:01.651649607 -0400
+@@ -0,0 +1,68 @@
++#                                               -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++
++AC_PREREQ([2.66])
++AC_INIT([libnfsidmap],[0.26],[linux-nfs at vger.kernel.org])
++AC_CONFIG_AUX_DIR([build-aux])
++AC_CONFIG_SRCDIR([nfsidmap.h])
++AC_CONFIG_MACRO_DIR([m4])
++AM_INIT_AUTOMAKE([foreign])
++LT_INIT
++
++# Checks for programs.
++AC_PROG_CC
++
++# Checks for libraries.
++
++AC_ARG_ENABLE([ldap],
++	[AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:@default=detect@:>@])])
++if test "x$enable_ldap" != "xno" ; then
++	AC_CHECK_HEADER([ldap.h],
++		[AC_CHECK_LIB([ldap], [ldap_initialize],
++		              [have_ldap="yes"],[have_ldap="no"])],
++		[have_ldap="no"])
++	if test "x$have_ldap" = "xyes" ; then
++		AC_DEFINE([ENABLE_LDAP], 1, [Enable LDAP Support])
++	elif test "x$enable_ldap$have_ldap" = "xyesno" ; then
++		AC_MSG_ERROR(LDAP support not found!)
++	fi
++fi
++AM_CONDITIONAL(ENABLE_LDAP, test "x$have_ldap" = "xyes")
++
++# Should we build gums mapping library?
++AC_ARG_ENABLE([gums],
++	[AS_HELP_STRING([--enable-gums],[Enable support for the GUMS mapping library @<:@default=false@:>@])])
++if test "x$enable_gums" = "xyes" ; then
++	AC_DEFINE([ENABLE_GUMS], 1, [Enable GUMS mapping library support])
++fi
++AM_CONDITIONAL(ENABLE_GUMS, test "x$enable_gums" = "xyes")
++
++#Where do the Plugins live
++AC_ARG_WITH(pluginpath,
++    [AS_HELP_STRING([--with-pluginpath=/foo],[Causes the library to look in /foo instead of /usr/lib/libnfsidmap for plugins
++    ])],
++    path_plugins=$withval,
++    path_plugins=""
++    )
++if test -n "$path_plugins" ; then
++	AC_DEFINE_UNQUOTED(PATH_PLUGINS, "$path_plugins",
++		[Define this to change the plugins path])
++fi
++AM_CONDITIONAL(PATH_PLUGINS, test -n "$path_plugins")
++
++AC_CONFIG_HEADERS([./config.h])
++# Checks for header files.
++AC_HEADER_STDC
++AC_CHECK_HEADERS([stdlib.h string.h unistd.h errno.h])
++
++# Checks for typedefs, structures, and compiler characteristics.
++AC_TYPE_UID_T
++AC_TYPE_SIZE_T
++
++# Checks for library functions.
++AC_FUNC_MALLOC
++AC_CHECK_FUNCS([strchr strdup])
++
++AC_CONFIG_FILES([Makefile])
++AC_CONFIG_FILES([libnfsidmap.pc])
++AC_OUTPUT
+diff -up libnfsidmap-0.26/.gitignore.orig libnfsidmap-0.26/.gitignore
+--- libnfsidmap-0.26/.gitignore.orig	2014-08-13 12:42:14.000000000 -0400
++++ libnfsidmap-0.26/.gitignore	2014-10-09 17:29:01.650649605 -0400
+@@ -1,15 +1,9 @@
+ Makefile.in
+-aclocal.m4
+-autom4te.cache/
+-config.guess
+-config.sub
++/aclocal.m4
++/autom4te.cache/
++/build-aux/
+ configure
+-depcomp
+-ltmain.sh
+-missing
+-install-sh
+ Makefile
+-install-sh
+ .deps/
+ config.log
+ config.status
+@@ -21,7 +15,6 @@ nsswitch.la
+ static.la
+ umich_ldap.la
+ configure.in~
+-m4/
+ *.o
+ *.lo
+ cscope.*
+diff -up libnfsidmap-0.26/libnfsidmap.c.orig libnfsidmap-0.26/libnfsidmap.c
+--- libnfsidmap-0.26/libnfsidmap.c.orig	2014-08-13 12:42:14.000000000 -0400
++++ libnfsidmap-0.26/libnfsidmap.c	2014-10-09 17:29:08.213670157 -0400
+@@ -98,7 +98,7 @@ static char * toupper_str(char *s)
+ 	return s;
+ }
+ 
+-static int id_as_chars(char *name, int *id)
++static int id_as_chars(char *name, uid_t *id)
+ {
+ 	long int value = strtol(name, NULL, 10);
+ 
+@@ -494,7 +494,7 @@ int nfs4_name_to_gid(char *name, gid_t *
+ 	RUN_TRANSLATIONS(name_to_gid, 0, name, gid);
+ }
+ 
+-static int set_id_to_nobody(int *id, int is_uid)
++static int set_id_to_nobody(uid_t *id, uid_t is_uid)
+ {
+ 	int rc = 0;
+ 	const char name[] = "nobody@";
+@@ -504,10 +504,10 @@ static int set_id_to_nobody(int *id, int
+          * configured, before we try to do a full lookup for the
+          * NFS nobody user. */
+ 	if (is_uid && nobody_uid != (uid_t)-1) {
+-		*id = (int)nobody_uid;
++		*id = (uid_t)nobody_uid;
+ 		return 0;
+ 	} else if (!is_uid && nobody_gid != (gid_t)-1) {
+-		*id = (int)nobody_gid;
++		*id = (uid_t)nobody_gid;
+ 		return 0;
+ 	}
+ 
+@@ -542,7 +542,7 @@ int nfs4_group_owner_to_gid(char *name,
+ 	if (rc && id_as_chars(name, gid))
+ 		rc = 0;
+ 	else if (rc)
+-		rc = set_id_to_nobody(gid, 0);
++		rc = set_id_to_nobody((uid_t *)gid, 0);
+ 	return rc;
+ }
+ 
+diff -up libnfsidmap-0.26/m4/.gitignore.orig libnfsidmap-0.26/m4/.gitignore
+--- libnfsidmap-0.26/m4/.gitignore.orig	2014-10-09 17:29:08.213670157 -0400
++++ libnfsidmap-0.26/m4/.gitignore	2014-10-09 17:29:08.213670157 -0400
+@@ -0,0 +1,2 @@
++/libtool.m4
++/lt*.m4
+diff -up libnfsidmap-0.26/Makefile.am.orig libnfsidmap-0.26/Makefile.am
+--- libnfsidmap-0.26/Makefile.am.orig	2014-08-13 12:42:14.000000000 -0400
++++ libnfsidmap-0.26/Makefile.am	2014-10-09 17:29:01.650649605 -0400
+@@ -26,8 +26,9 @@ pkglib_LTLIBRARIES = nsswitch.la static.
+ #  		by this library.
+ 
+ libnfsidmap_la_SOURCES = libnfsidmap.c cfg.c strlcpy.c cfg.h nfsidmap_internal.h queue.h
+-libnfsidmap_la_LDFLAGS = -version-info 3:0:3
++libnfsidmap_la_LDFLAGS = -version-info 3:0:3 -Wl,--version-script=$(srcdir)/nfsidmap.map
+ libnfsidmap_la_LIBADD = -ldl
++libnfsidmap_la_DEPENDENCIES = nfsidmap.map
+ 
+ nsswitch_la_SOURCES = nss.c
+ nsswitch_la_LDFLAGS = -module -avoid-version
+@@ -59,3 +60,4 @@ dist-hook:
+ pkgconfigdir=$(libdir)/pkgconfig
+ pkgconfig_DATA = libnfsidmap.pc
+ 
++$(pkgconfig_DATA): $(top_builddir)/config.status
+diff -up libnfsidmap-0.26/nfsidmap.map.orig libnfsidmap-0.26/nfsidmap.map
+--- libnfsidmap-0.26/nfsidmap.map.orig	2014-10-09 17:29:08.213670157 -0400
++++ libnfsidmap-0.26/nfsidmap.map	2014-10-09 17:29:08.213670157 -0400
+@@ -0,0 +1,27 @@
++V_0.26 {
++global:
++	nfs4_init_name_mapping;
++	nfs4_get_default_domain;
++	nfs4_uid_to_name;
++	nfs4_gid_to_name;
++	nfs4_uid_to_owner;
++	nfs4_gid_to_group_owner;
++	nfs4_name_to_uid;
++	nfs4_name_to_gid;
++	nfs4_owner_to_uid;
++	nfs4_owner_to_gid;
++	nfs4_group_owner_to_gid;
++	nfs4_gss_princ_to_ids;
++	nfs4_gss_princ_to_grouplist;
++	nfs4_gss_princ_to_ids_ex;
++	nfs4_gss_princ_to_grouplist_ex;
++	nfs4_set_debug;
++local:
++	*;
++};
++/*
++V_0.27 {
++global:
++	...
++} V_0.26;
++*/
+diff -up libnfsidmap-0.26/static.c.orig libnfsidmap-0.26/static.c
+--- libnfsidmap-0.26/static.c.orig	2014-08-13 12:42:14.000000000 -0400
++++ libnfsidmap-0.26/static.c	2014-10-09 17:29:08.214670160 -0400
+@@ -39,6 +39,7 @@
+ #include <pwd.h>
+ #include <grp.h>
+ #include <errno.h>
++#include <err.h>
+ 
+ #include "queue.h"
+ #include "cfg.h"
+@@ -268,7 +269,6 @@ static int static_name_to_gid(char *name
+ 
+ static int static_uid_to_name(uid_t uid, char *domain, char *name, size_t len)
+ {
+-	struct passwd *pw;
+ 	struct uid_mapping * um;
+ 
+ 	for (um = LIST_FIRST (&uid_mappings[uid_hash (uid)]); um;
+@@ -284,7 +284,6 @@ static int static_uid_to_name(uid_t uid,
+ 
+ static int static_gid_to_name(gid_t gid, char *domain, char *name, size_t len)
+ {
+-	struct group *gr;
+ 	struct gid_mapping * gm;
+ 
+ 	for (gm = LIST_FIRST (&gid_mappings[gid_hash (gid)]); gm;
+@@ -305,7 +304,6 @@ static int static_gid_to_name(gid_t gid,
+ 
+ static int static_init() {	
+ 	int err;
+-	uid_t uid;
+ 	struct conf_list * princ_list = NULL;
+ 	struct conf_list_node * cln, *next;
+ 	struct uid_mapping * unode;
+@@ -367,7 +365,7 @@ static int static_init() {
+ 		next = TAILQ_NEXT (cln, link); 
+ 
+ 		gr = static_getgrnam(cln->field, NULL, &err);
+-		if (!pw) {
++		if (!gr) {
+ 			continue;
+ 		}
+ 		
+@@ -376,19 +374,19 @@ static int static_init() {
+ 		{
+ 			warnx("static_init: calloc (1, %lu) failed",
+ 				(unsigned long)sizeof *gnode);
+-			free(pw);
++			free(gr);
+ 			return -ENOMEM;
+ 		}
+-		gnode->gid = pw->pw_uid;
++		gnode->gid = gr->gr_gid;
+ 		gnode->principal = strdup(cln->field);
+ 
+ 		gnode->localgroup = conf_get_str("Static", cln->field);
+ 		if (!gnode->localgroup) {
+-			free(pw);
++			free(gr);
+ 			return -ENOENT;
+ 		}
+ 
+-		free(pw);
++		free(gr);
+ 
+ 		LIST_INSERT_HEAD (&gid_mappings[gid_hash(gnode->gid)], gnode, link);
+ 	}
diff --git a/libnfsidmap.spec b/libnfsidmap.spec
index 0026e01..a635c8a 100644
--- a/libnfsidmap.spec
+++ b/libnfsidmap.spec
@@ -3,7 +3,7 @@
 Summary: NFSv4 User and Group ID Mapping Library
 Name: libnfsidmap
 Version: 0.26
-Release: 0.1%{?dist}
+Release: 1.0%{?dist}
 Provides: nfs-utils-lib
 Obsoletes: nfs-utils-lib
 URL: http://www.citi.umich.edu/projects/nfsv4/linux/
@@ -28,6 +28,8 @@ Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: pkgconfig
 
+Patch001: libnfsidmap-0.27-rc1.patch
+
 %description devel
 This package includes header files and libraries necessary for
 developing programs which use the libnfsidmap library.
@@ -35,6 +37,8 @@ developing programs which use the libnfsidmap library.
 %prep
 %setup -q 
 
+%patch001 -p1
+
 %build
 ./autogen.sh
 %configure --disable-static  --with-pluginpath=%{_root_libdir}/%name
@@ -76,6 +80,9 @@ rm -rf %{buildroot}
 %{_root_libdir}/*.so
 
 %changelog
+* Thu Oct  9 2014  Steve Dickson <steved at redhat.com>  0.26.1.0
+- Updated to latest rc release: libnfsidmap-0-27-rc1 
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.26-0.1
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list