Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2013 10:58:10 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r333199 - in head/security/sssd: . files
Message-ID:  <201311081058.rA8AwA6B042497@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Fri Nov  8 10:58:10 2013
New Revision: 333199
URL: http://svnweb.freebsd.org/changeset/ports/333199

Log:
  security/sssd: update to 1.9.6
  
  - Update to 1.9.6
  - Remove FreeBSD < 8.0-RELEASE check (unsupported)
  
  PR:		ports/183750
  Submitted by:	Lukas Slebodnik <lukas.slebodnik intrak.sk> (maintainer)

Added:
  head/security/sssd/files/patch-src__external__inotify.m4   (contents, props changed)
  head/security/sssd/files/patch-src__providers__krb5__krb5_delayed_online_authentication.c   (contents, props changed)
  head/security/sssd/files/sss_bsd_errno.h   (contents, props changed)
Deleted:
  head/security/sssd/files/patch-configure.ac
  head/security/sssd/files/patch-src__lib__idmap__sss_idmap_conv.c
  head/security/sssd/files/patch-src__monitor__monitor.c
  head/security/sssd/files/patch-src__providers__data_provider_be.c
  head/security/sssd/files/patch-src__providers__ipa__ipa_hbac.h
  head/security/sssd/files/patch-src__providers__ldap__ldap_child.c
  head/security/sssd/files/patch-src__providers__ldap__ldap_common.c
  head/security/sssd/files/patch-src__providers__proxy__proxy_init.c
  head/security/sssd/files/patch-src__responder__common__responder_common.c
  head/security/sssd/files/patch-src__responder__common__responder_dp.c
  head/security/sssd/files/patch-src__responder__common__responder_packet.c
  head/security/sssd/files/patch-src__responder__pac__pacsrv_utils.c
  head/security/sssd/files/patch-src__util__murmurhash3.c
  head/security/sssd/files/patch-src__util__util.c
Modified:
  head/security/sssd/Makefile
  head/security/sssd/distinfo
  head/security/sssd/files/bsdnss.c
  head/security/sssd/files/patch-Makefile.am
  head/security/sssd/files/patch-src__confdb__confdb.c
  head/security/sssd/files/patch-src__providers__fail_over.c
  head/security/sssd/files/patch-src__providers__ldap__sdap_access.c
  head/security/sssd/files/patch-src__sss_client__common.c
  head/security/sssd/files/patch-src__sss_client__nss_group.c
  head/security/sssd/files/patch-src__util__crypto__libcrypto__crypto_sha512crypt.c
  head/security/sssd/files/patch-src__util__crypto__nss__nss_sha512crypt.c
  head/security/sssd/files/patch-src__util__find_uid.c
  head/security/sssd/files/patch-src__util__server.c
  head/security/sssd/files/patch-src__util__util.h
  head/security/sssd/pkg-plist

Modified: head/security/sssd/Makefile
==============================================================================
--- head/security/sssd/Makefile	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/Makefile	Fri Nov  8 10:58:10 2013	(r333199)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	sssd
-DISTVERSION=	1.9.5
+DISTVERSION=	1.9.6
 CATEGORIES=	security
 MASTER_SITES=   https://fedorahosted.org/released/${PORTNAME}/ \
 		http://mirrors.rit.edu/zi/
@@ -15,7 +15,6 @@ LICENSE=	GPLv3
 LIB_DEPENDS=	libpopt.so:${PORTSDIR}/devel/popt \
 		libtalloc.so:${PORTSDIR}/devel/talloc \
 		libtevent.so:${PORTSDIR}/devel/tevent \
-		libxslt.so:${PORTSDIR}/textproc/libxslt \
 		libtdb.so:${PORTSDIR}/databases/tdb \
 		libldb.so:${PORTSDIR}/databases/ldb \
 		libcares.so:${PORTSDIR}/dns/c-ares \
@@ -30,6 +29,7 @@ LIB_DEPENDS=	libpopt.so:${PORTSDIR}/deve
 		libinotify.so:${PORTSDIR}/devel/libinotify
 BUILD_DEPENDS=	xmlcatalog:${PORTSDIR}/textproc/libxml2 \
 		docbook-xsl>=1:${PORTSDIR}/textproc/docbook-xsl \
+		xsltproc:${PORTSDIR}/textproc/libxslt \
 		xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr \
 		krb5>=1.10:${PORTSDIR}/security/krb5 \
 		nsupdate:${PORTSDIR}/dns/bind99
@@ -44,14 +44,13 @@ CONFIGURE_ARGS=	--with-selinux=no --with
 		--with-db-path=/var/db/sss --with-pipe-path=/var/run/sss \
 		--with-pubconf-path=/var/run/sss --with-mcache-path=/var/db/sss_mc \
 		--with-unicode-lib=libunistring --with-autofs=no
-CFLAGS+=	 -fstack-protector-all -Wno-format
-LDFLAGS+=	-L${LOCALBASE}/lib -linotify
+CFLAGS=		-fstack-protector-all
 PLIST_SUB=	PYTHON_VER=${PYTHON_VER}
 #DEBUG_FLAGS=  -g
 MAKE_ENV+=	LINGUAS="bg de eu es fr hu id it ja nb nl pl pt ru sv tg tr uk zh_CN zh_TW"
 SUB_FILES=	pkg-message
 
-USE_AUTOTOOLS=	autoconf automake aclocal
+USE_AUTOTOOLS=	autoconf automake aclocal libtool
 AUTOMAKE_ARGS= --add-missing
 USE_LDCONFIG=	yes
 USE_PYTHON=	yes
@@ -63,9 +62,6 @@ PORTDATA=	*
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 800107
-IGNORE=		is not supported prior to 8.0-RELEASE
-.endif
 .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
 BROKEN=		Does not link on ia64, powerpc, or sparc64
 .endif
@@ -73,11 +69,11 @@ BROKEN=		Does not link on ia64, powerpc,
 post-patch:
 	@${REINPLACE_CMD} -e 's|SIGCLD|SIGCHLD|g' ${WRKSRC}/src/util/signal.c
 	@${REINPLACE_CMD} -e '/#define SIZE_T_MAX ((size_t) -1)/d' \
-	    	${WRKSRC}/src/util/util.h
+		${WRKSRC}/src/util/util.h
 	@${REINPLACE_CMD} -e '/pam_misc/d' \
-	    	${WRKSRC}/src/sss_client/pam_test_client.c
+		${WRKSRC}/src/sss_client/pam_test_client.c
 	@${REINPLACE_CMD} -e 's|security/pam_misc.h||g' \
-	    	${WRKSRC}/configure* ${WRKSRC}/src/external/pam.m4
+		${WRKSRC}/configure* ${WRKSRC}/src/external/pam.m4
 	@${REINPLACE_CMD} -e 's|NSS_STATUS_NOTFOUND|NS_NOTFOUND|g' \
 		-e 's|NSS_STATUS_UNAVAIL|NS_UNAVAIL|g' \
 		-e 's|NSS_STATUS_TRYAGAIN|NS_TRYAGAIN|g' \
@@ -85,7 +81,7 @@ post-patch:
 		-e 's|NSS_STATUS_SUCCESS|NS_SUCCESS|g' \
 		${WRKSRC}/src/sss_client/common.c
 	@${REINPLACE_CMD} -e 's|security/_pam_macros.h|pam_macros.h|g' \
-	    	${WRKSRC}/src/sss_client/sss_pam_macros.h
+		${WRKSRC}/src/sss_client/sss_pam_macros.h
 	@${REINPLACE_CMD} -e 's|#include <security/pam_modutil.h>||g' \
 		-e 's|PAM_BAD_ITEM|PAM_USER_UNKNOWN|g' \
 		-e 's|security/pam_ext.h|security/pam_appl.h|g' \
@@ -93,7 +89,7 @@ post-patch:
 		-e 's|pam_vsyslog(pamh,|vsyslog(|g' \
 		${WRKSRC}/src/sss_client/pam_sss.c
 	@${REINPLACE_CMD} -e '/..MAKE. ..AM_MAKEFLAGS. install-data-hook/d' \
-	    	${WRKSRC}/Makefile.in
+		${WRKSRC}/Makefile.in
 	@${REINPLACE_CMD} -e 's|libdir)/pkgconfig|prefix)/libdata/pkgconfig|' \
 		-e 's|install-data-hook install-dist_initSCRIPTS|install-dist_initSCRIPTS|g' \
 		-e 's|install-data-hook|notinstall-data-hook|g' \
@@ -104,6 +100,7 @@ post-patch:
 		${WRKSRC}/src/man/*xml
 	@${CP} ${FILESDIR}/pam_macros.h ${WRKSRC}/pam_macros.h
 	@${CP} ${FILESDIR}/bsdnss.c ${WRKSRC}/src/sss_client/bsdnss.c
+	@${CP} ${FILESDIR}/sss_bsd_errno.h ${WRKSRC}/src/util/sss_bsd_errno.h
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/src/examples/sssd-example.conf ${STAGEDIR}${ETCDIR}/sssd.conf.sample

Modified: head/security/sssd/distinfo
==============================================================================
--- head/security/sssd/distinfo	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/distinfo	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,2 +1,2 @@
-SHA256 (sssd-1.9.5.tar.gz) = a377c436901e92d689de811d48e37d88764460e889e47bfddd90626f0a8a015c
-SIZE (sssd-1.9.5.tar.gz) = 3106988
+SHA256 (sssd-1.9.6.tar.gz) = ca96e8d98eb4113396b13d9601dbdd20f4b2f2613d0f29a0157ffd05e3748601
+SIZE (sssd-1.9.6.tar.gz) = 3180066

Modified: head/security/sssd/files/bsdnss.c
==============================================================================
--- head/security/sssd/files/bsdnss.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/bsdnss.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -7,37 +7,43 @@
 #include <netdb.h>
 
 extern enum nss_status _nss_sss_getgrent_r(struct group *, char *, size_t,
-    int *);
+                                           int *);
 extern enum nss_status _nss_sss_getgrnam_r(const char *, struct group *,
-    char *, size_t, int *);
+                                           char *, size_t, int *);
 extern enum nss_status _nss_sss_getgrgid_r(gid_t gid, struct group *, char *,
-    size_t, int *);
+                                           size_t, int *);
 extern enum nss_status _nss_sss_setgrent(void);
 extern enum nss_status _nss_sss_endgrent(void);
 
 extern enum nss_status _nss_sss_getpwent_r(struct passwd *, char *, size_t,
-    int *);
+                                           int *);
 extern enum nss_status _nss_sss_getpwnam_r(const char *, struct passwd *,
-    char *, size_t, int *);
+                                           char *, size_t, int *);
 extern enum nss_status _nss_sss_getpwuid_r(gid_t gid, struct passwd *, char *,
-    size_t, int *);
+                                           size_t, int *);
 extern enum nss_status _nss_sss_setpwent(void);
 extern enum nss_status _nss_sss_endpwent(void);
 
-extern enum nss_status _nss_sss_gethostbyname_r (const char *name, struct hostent * result,
-			   char *buffer, size_t buflen, int *errnop,
-			   int *h_errnop);
-
-extern enum nss_status _nss_sss_gethostbyname2_r (const char *name, int af, struct hostent * result,
-			    char *buffer, size_t buflen, int *errnop,
-			    int *h_errnop);
-extern enum nss_status _nss_sss_gethostbyaddr_r (struct in_addr * addr, int len, int type,
-			   struct hostent * result, char *buffer,
-			   size_t buflen, int *errnop, int *h_errnop);
-
-extern enum nss_status _nss_sss_getgroupmembership(const char *uname, gid_t agroup, gid_t *groups,
-						   int maxgrp, int *grpcnt);
-
+extern enum nss_status _nss_sss_gethostbyname_r(const char *name,
+                                                struct hostent * result,
+                                                char *buffer, size_t buflen,
+                                                int *errnop,
+                                                int *h_errnop);
+
+extern enum nss_status _nss_sss_gethostbyname2_r(const char *name, int af,
+                                                 struct hostent * result,
+                                                 char *buffer, size_t buflen,
+                                                 int *errnop,
+                                                 int *h_errnop);
+extern enum nss_status _nss_sss_gethostbyaddr_r(struct in_addr * addr, int len,
+                                                int type,
+                                                struct hostent * result,
+                                                char *buffer, size_t buflen,
+                                                int *errnop, int *h_errnop);
+
+extern enum nss_status _nss_sss_getgroupmembership(const char *uname,
+                                                   gid_t agroup, gid_t *groups,
+                                                   int maxgrp, int *grpcnt);
 
 NSS_METHOD_PROTOTYPE(__nss_compat_getgroupmembership);
 NSS_METHOD_PROTOTYPE(__nss_compat_getgrnam_r);
@@ -91,24 +97,24 @@ static ns_mtab methods[] = {
 
 ns_mtab *
 nss_module_register(const char *source, unsigned int *mtabsize,
-    nss_module_unregister_fn *unreg)
+                    nss_module_unregister_fn *unreg)
 {
-	*mtabsize = sizeof(methods)/sizeof(methods[0]);
-	*unreg = NULL;
-	return (methods);
+    *mtabsize = sizeof(methods)/sizeof(methods[0]);
+    *unreg = NULL;
+    return (methods);
 }
 
 int __nss_compat_getgroupmembership(void *retval, void *mdata, va_list ap)
 {
   int (*fn)(const char *, gid_t, gid_t *, int, int *);
-  
-  const char      *uname;
-  gid_t           agroup;
-  gid_t           *groups;
-  int             maxgrp;
-  int             *grpcnt;
-  int 		errnop;
-  enum nss_status  status;
+
+  const char *uname;
+  gid_t agroup;
+  gid_t *groups;
+  int maxgrp;
+  int *grpcnt;
+  int errnop = 0;
+  enum nss_status status;
 
   fn = mdata;
   uname = va_arg(ap, const char *);
@@ -123,65 +129,68 @@ int __nss_compat_getgroupmembership(void
 
 int __nss_compat_gethostbyname(void *retval, void *mdata, va_list ap)
 {
-	enum nss_status 	(*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
-	const char 	*name;
-	struct hostent 	*result;
-	char 		buffer[1024];
-	size_t 		buflen = 1024;
-	int 		errnop;
-	int		h_errnop;
-	int		af;
-	enum nss_status	status;
-	fn = mdata;
-	name = va_arg(ap, const char*);
-	af = va_arg(ap,int);
-	result = va_arg(ap,struct hostent *);
-	status = fn(name, result, buffer, buflen, &errnop, &h_errnop);
-	status = __nss_compat_result(status,errnop);
-	h_errno = h_errnop;
-	return (status);
+    enum nss_status (*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
+    const char *name;
+    struct hostent *result;
+    char buffer[1024];
+    size_t buflen = 1024;
+    int errnop;
+    int h_errnop;
+    int af;
+    enum nss_status status;
+
+    fn = mdata;
+    name = va_arg(ap, const char*);
+    af = va_arg(ap,int);
+    result = va_arg(ap,struct hostent *);
+    status = fn(name, result, buffer, buflen, &errnop, &h_errnop);
+    status = __nss_compat_result(status,errnop);
+    h_errno = h_errnop;
+    return (status);
 }
 
 int __nss_compat_gethostbyname2(void *retval, void *mdata, va_list ap)
 {
-	enum nss_status 	(*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
-	const char 	*name;
-	struct hostent 	*result;
-	char 		buffer[1024];
-	size_t 		buflen = 1024;
-	int 		errnop;
-	int		h_errnop;
-	int		af;
-	enum nss_status	status;
-	fn = mdata;
-	name = va_arg(ap, const char*);
-	af = va_arg(ap,int);
-	result = va_arg(ap,struct hostent *);
-	status = fn(name, result, buffer, buflen, &errnop, &h_errnop);
-	status = __nss_compat_result(status,errnop);
-	h_errno = h_errnop;
-	return (status);
+    enum nss_status (*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
+    const char *name;
+    struct hostent *result;
+    char buffer[1024];
+    size_t buflen = 1024;
+    int errnop;
+    int h_errnop;
+    int af;
+    enum nss_status status;
+
+    fn = mdata;
+    name = va_arg(ap, const char*);
+    af = va_arg(ap,int);
+    result = va_arg(ap,struct hostent *);
+    status = fn(name, result, buffer, buflen, &errnop, &h_errnop);
+    status = __nss_compat_result(status,errnop);
+    h_errno = h_errnop;
+    return (status);
 }
 
 int __nss_compat_gethostbyaddr(void *retval, void *mdata, va_list ap)
 {
-	struct in_addr 	*addr;
-	int 		len;
-	int 		type;
-	struct hostent	*result;
-	char 		buffer[1024];
-	size_t		buflen = 1024;
-	int		errnop;
-	int		h_errnop;
-	enum nss_status (*fn)(struct in_addr *, int, int, struct hostent *, char *, size_t, int *, int *);
-	enum nss_status status;
-	fn = mdata;
-	addr = va_arg(ap, struct in_addr*);
-	len = va_arg(ap,int);
-	type = va_arg(ap,int);
-	result = va_arg(ap, struct hostent*);
-	status = fn(addr, len, type, result, buffer, buflen, &errnop, &h_errnop);
-	status = __nss_compat_result(status,errnop);
-	h_errno = h_errnop;
-	return (status);
+    struct in_addr *addr;
+    int len;
+    int type;
+    struct hostent *result;
+    char buffer[1024];
+    size_t buflen = 1024;
+    int errnop;
+    int h_errnop;
+    enum nss_status (*fn)(struct in_addr *, int, int, struct hostent *, char *, size_t, int *, int *);
+    enum nss_status status;
+
+    fn = mdata;
+    addr = va_arg(ap, struct in_addr*);
+    len = va_arg(ap,int);
+    type = va_arg(ap,int);
+    result = va_arg(ap, struct hostent*);
+    status = fn(addr, len, type, result, buffer, buflen, &errnop, &h_errnop);
+    status = __nss_compat_result(status,errnop);
+    h_errno = h_errnop;
+    return (status);
 }

Modified: head/security/sssd/files/patch-Makefile.am
==============================================================================
--- head/security/sssd/files/patch-Makefile.am	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-Makefile.am	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,34 +1,25 @@
-From 2f2d2045b64edf63bbfb845095dbfaf754dc5ad3 Mon Sep 17 00:00:00 2001
+From e40f55767383f300f71103ca404b7839b8499104 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:11 +0200
-Subject: [PATCH 01/34] patch-Makefile.am
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 01/25] patch-Makefile.am
 
 ---
- Makefile.am | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
+ Makefile.am | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
 
 diff --git Makefile.am Makefile.am
-index f0ee88b..10e1e73 100644
+index 04df7cb..e2558f7 100644
 --- Makefile.am
 +++ Makefile.am
-@@ -649,7 +649,6 @@ sssd_be_SOURCES = \
-     src/providers/data_provider_callbacks.c \
-     $(SSSD_FAILOVER_OBJ)
- sssd_be_LDADD = \
--    -ldl \
-     $(SSSD_LIBS) \
-     $(CARES_LIBS) \
-     libsss_util.la
-@@ -772,7 +771,7 @@ sss_sudo_cli_SOURCES = \
-     src/sss_client/sudo/sss_sudo_response.c \
-     src/sss_client/sudo_testcli/sudo_testcli.c
- sss_sudo_cli_CFLAGS = $(AM_CFLAGS)
--sss_sudo_cli_LDFLAGS = $(CLIENT_LIBS)
-+sss_sudo_cli_LDFLAGS = $(CLIENT_LIBS) -lintl
- endif
- 
- if BUILD_SSH
-@@ -1159,7 +1158,7 @@ noinst_PROGRAMS += autofs_test_client
+@@ -369,6 +369,7 @@ dist_noinst_HEADERS = \
+     src/util/sss_selinux.h \
+     src/util/sss_utf8.h \
+     src/util/sss_ssh.h \
++    src/util/sss_bsd_errno.h \
+     src/util/refcount.h \
+     src/util/find_uid.h \
+     src/util/user_info_msg.h \
+@@ -1170,7 +1171,7 @@ noinst_PROGRAMS += autofs_test_client
  endif
  
  pam_test_client_SOURCES = src/sss_client/pam_test_client.c
@@ -37,7 +28,7 @@ index f0ee88b..10e1e73 100644
  
  if BUILD_AUTOFS
  autofs_test_client_SOURCES = src/sss_client/autofs/autofs_test_client.c \
-@@ -1173,9 +1172,10 @@ endif
+@@ -1184,9 +1185,10 @@ endif
  # Client Libraries #
  ####################
  
@@ -50,7 +41,7 @@ index f0ee88b..10e1e73 100644
      src/sss_client/nss_passwd.c \
      src/sss_client/nss_group.c \
      src/sss_client/nss_netgroup.c \
-@@ -1187,7 +1187,7 @@ libnss_sss_la_SOURCES = \
+@@ -1198,7 +1200,7 @@ libnss_sss_la_SOURCES = \
      src/sss_client/nss_mc_passwd.c \
      src/sss_client/nss_mc_group.c \
      src/sss_client/nss_mc.h
@@ -59,23 +50,6 @@ index f0ee88b..10e1e73 100644
      $(CLIENT_LIBS) \
      -module \
      -version-info 2:0:0 \
-@@ -1203,6 +1203,7 @@ pam_sss_la_SOURCES = \
- 
- pam_sss_la_LDFLAGS = \
-     $(CLIENT_LIBS) \
-+    -lintl \
-     -lpam \
-     -module \
-     -avoid-version \
-@@ -1727,7 +1728,7 @@ else
- 	mkdir -p $(DESTDIR)$(initdir)
- endif
- 
--install-data-hook:
-+nopenopeinstall-data-hook:
- 	rm $(DESTDIR)/$(nsslibdir)/libnss_sss.so.2 \
-        $(DESTDIR)/$(nsslibdir)/libnss_sss.so
- 	mv $(DESTDIR)/$(nsslibdir)/libnss_sss.so.2.0.0 $(DESTDIR)/$(nsslibdir)/libnss_sss.so.2
 -- 
 1.8.0
 

Modified: head/security/sssd/files/patch-src__confdb__confdb.c
==============================================================================
--- head/security/sssd/files/patch-src__confdb__confdb.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__confdb__confdb.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,14 +1,14 @@
-From 18614fe436d525826e260e7a0e8334c41bd2ce37 Mon Sep 17 00:00:00 2001
+From 756e37d0ef957b15d782d5dd87d24e9359541931 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:11 +0200
-Subject: [PATCH 03/34] patch-src__confdb__confdb.c
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 02/25] patch-src__confdb__confdb.c
 
 ---
  src/confdb/confdb.c | 5 +++++
  1 file changed, 5 insertions(+)
 
 diff --git src/confdb/confdb.c src/confdb/confdb.c
-index d70dc36..9ee1f8c 100644
+index 72c74fe..78b69b8 100644
 --- src/confdb/confdb.c
 +++ src/confdb/confdb.c
 @@ -28,6 +28,11 @@
@@ -17,7 +17,7 @@ index d70dc36..9ee1f8c 100644
  
 +char *strchrnul(const char *s, int ch) {
 +       char *ret = strchr(s, ch);
-+       return ret == NULL ? ((char *)s) + strlen(s) : ret;
++       return ret == NULL ? discard_const_p(char, s) + strlen(s) : ret;
 +}
 +
  #define CONFDB_ZERO_CHECK_OR_JUMP(var, ret, err, label) do { \

Added: head/security/sssd/files/patch-src__external__inotify.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/sssd/files/patch-src__external__inotify.m4	Fri Nov  8 10:58:10 2013	(r333199)
@@ -0,0 +1,29 @@
+From 558989d6ac329b4036e02873fb7c981c5912040c Mon Sep 17 00:00:00 2001
+From: Lukas Slebodnik <lslebodn@redhat.com>
+Date: Thu, 7 Nov 2013 13:28:13 +0100
+Subject: [PATCH] patch-src__external__inotify.m4
+
+---
+ src/external/inotify.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git src/external/inotify.m4 src/external/inotify.m4
+index 9572f6d2fefedf8a1d6a2468c712a83e7db2969f..2a5a8cf00d80e0979dca50fd102c3dc2872b2970 100644
+--- src/external/inotify.m4
++++ src/external/inotify.m4
+@@ -20,10 +20,10 @@ int main () {
+     AS_IF([test x"$inotify_works" != xyes],
+           [AC_CHECK_LIB([inotify],
+                         [inotify_init],
+-                        [INOTIFY_LIBS="$sss_extra_libdir -linotify"
++                        [INOTIFY_LIBS="-L$sss_extra_libdir -linotify"
+                          inotify_works=yes],
+                         [inotify_works=no],
+-                        [$sss_extra_libdir])]
++                        [-L$sss_extra_libdir])]
+     )
+ 
+     AS_IF([test x"$inotify_works" = xyes],
+-- 
+1.8.3.1
+

Modified: head/security/sssd/files/patch-src__providers__fail_over.c
==============================================================================
--- head/security/sssd/files/patch-src__providers__fail_over.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__providers__fail_over.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,26 +1,26 @@
-From 9c10da92d16e5daa9589ca0e3e5f43f399844071 Mon Sep 17 00:00:00 2001
+From 08bc75705abe29a9e046a0a8871adcf42eeee35c Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:11 +0200
-Subject: [PATCH 06/34] patch-src__providers__fail_over.c
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 07/25] patch-src__providers__fail_over.c
 
 ---
  src/providers/fail_over.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git src/providers/fail_over.c src/providers/fail_over.c
-index e7c4417..120022a 100644
+index 59cbacd..197c0ef 100644
 --- src/providers/fail_over.c
 +++ src/providers/fail_over.c
-@@ -1320,7 +1320,7 @@ resolve_srv_recv(struct tevent_req *req, struct fo_server **server)
+@@ -1331,7 +1331,7 @@ resolve_srv_recv(struct tevent_req *req, struct fo_server **server)
   *******************************************************************/
  struct resolve_get_domain_state {
      char *fqdn;
 -    char hostname[HOST_NAME_MAX];
-+    char hostname[_POSIX_HOST_NAME_MAX];
++    char hostname[_POSIX_HOST_NAME_MAX + 1];
  };
  
  static void resolve_get_domain_done(struct tevent_req *subreq);
-@@ -1340,13 +1340,13 @@ resolve_get_domain_send(TALLOC_CTX *mem_ctx,
+@@ -1351,13 +1351,13 @@ resolve_get_domain_send(TALLOC_CTX *mem_ctx,
          return NULL;
      }
  
@@ -32,7 +32,7 @@ index e7c4417..120022a 100644
          return NULL;
      }
 -    state->hostname[HOST_NAME_MAX-1] = '\0';
-+    state->hostname[_POSIX_HOST_NAME_MAX-1] = '\0';
++    state->hostname[_POSIX_HOST_NAME_MAX] = '\0';
      DEBUG(7, ("Host name is: %s\n", state->hostname));
  
      subreq = resolv_gethostbyname_send(state, ev, resolv,

Added: head/security/sssd/files/patch-src__providers__krb5__krb5_delayed_online_authentication.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/sssd/files/patch-src__providers__krb5__krb5_delayed_online_authentication.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -0,0 +1,32 @@
+From eba3efda911eb0212a98353740e13ad619aaa282 Mon Sep 17 00:00:00 2001
+From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 09/25] patch-src__providers__krb5__krb5_delayed_online_authentication.c
+
+---
+ src/providers/krb5/krb5_delayed_online_authentication.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git src/providers/krb5/krb5_delayed_online_authentication.c src/providers/krb5/krb5_delayed_online_authentication.c
+index d5dea3b..da6b6bb 100644
+--- src/providers/krb5/krb5_delayed_online_authentication.c
++++ src/providers/krb5/krb5_delayed_online_authentication.c
+@@ -296,6 +296,7 @@ errno_t init_delayed_online_authentication(struct krb5_ctx *krb5_ctx,
+                                            struct tevent_context *ev)
+ {
+     int ret;
++#ifdef __linux__
+     hash_table_t *tmp_table;
+ 
+     ret = get_uid_table(krb5_ctx, &tmp_table);
+@@ -314,6 +315,7 @@ errno_t init_delayed_online_authentication(struct krb5_ctx *krb5_ctx,
+         DEBUG(1, ("hash_destroy failed [%s].\n", hash_error_string(ret)));
+         return EFAULT;
+     }
++#endif /* __linux__ */
+ 
+     krb5_ctx->deferred_auth_ctx = talloc_zero(krb5_ctx,
+                                           struct deferred_auth_ctx);
+-- 
+1.8.0
+

Modified: head/security/sssd/files/patch-src__providers__ldap__sdap_access.c
==============================================================================
--- head/security/sssd/files/patch-src__providers__ldap__sdap_access.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__providers__ldap__sdap_access.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,14 +1,14 @@
-From cebca2806d06fce5a5c610a39044a5a4039f71ef Mon Sep 17 00:00:00 2001
+From 9a3d9a05b2c8790c771c166b42f8b80e76b4b336 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:11 +0200
-Subject: [PATCH 12/34] patch-src__providers__ldap__sdap_access.c
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 11/25] patch-src__providers__ldap__sdap_access.c
 
 ---
- src/providers/ldap/sdap_access.c | 43 +++++++++++++++++++---------------------
- 1 file changed, 20 insertions(+), 23 deletions(-)
+ src/providers/ldap/sdap_access.c | 46 +++++++++++++++++++---------------------
+ 1 file changed, 22 insertions(+), 24 deletions(-)
 
 diff --git src/providers/ldap/sdap_access.c src/providers/ldap/sdap_access.c
-index b198e04..37eae45 100644
+index b198e04..1eaedf7 100644
 --- src/providers/ldap/sdap_access.c
 +++ src/providers/ldap/sdap_access.c
 @@ -22,9 +22,7 @@
@@ -155,11 +155,25 @@ index b198e04..37eae45 100644
      unsigned int i;
      char *host;
 -    char hostname[HOST_NAME_MAX+1];
-+    char hostname[_POSIX_HOST_NAME_MAX+1];
++    char hostname[_POSIX_HOST_NAME_MAX + 1];
  
      req = tevent_req_create(mem_ctx, &state, struct sdap_access_host_ctx);
      if (!req) {
-@@ -1365,7 +1362,7 @@ static void sdap_access_host_done(struct tevent_req *subreq)
+@@ -1285,11 +1282,12 @@ static struct tevent_req *sdap_access_host_send(
+         goto done;
+     }
+ 
+-    if (gethostname(hostname, sizeof(hostname)) == -1) {
++    if (gethostname(hostname, _POSIX_HOST_NAME_MAX) == -1) {
+         DEBUG(1, ("Unable to get system hostname. Access denied\n"));
+         ret = EOK;
+         goto done;
+     }
++    hostname[_POSIX_HOST_NAME_MAX] = '\0';
+ 
+     /* FIXME: PADL's pam_ldap also calls gethostbyname() on the hostname
+      *        in some attempt to get aliases and/or FQDN for the machine.
+@@ -1365,7 +1363,7 @@ static void sdap_access_host_done(struct tevent_req *subreq)
      talloc_zfree(subreq);
      if (ret != EOK) {
          DEBUG(1, ("Error retrieving access check result.\n"));
@@ -168,7 +182,7 @@ index b198e04..37eae45 100644
          tevent_req_error(req, ret);
          return;
      }
-@@ -1391,7 +1388,7 @@ sdap_access_recv(struct tevent_req *req, int *pam_status)
+@@ -1391,7 +1389,7 @@ sdap_access_recv(struct tevent_req *req, int *pam_status)
  static void sdap_access_done(struct tevent_req *req)
  {
      errno_t ret;
@@ -177,7 +191,7 @@ index b198e04..37eae45 100644
      struct be_req *breq =
              tevent_req_callback_data(req, struct be_req);
  
-@@ -1399,7 +1396,7 @@ static void sdap_access_done(struct tevent_req *req)
+@@ -1399,7 +1397,7 @@ static void sdap_access_done(struct tevent_req *req)
      talloc_zfree(req);
      if (ret != EOK) {
          DEBUG(1, ("Error retrieving access check result.\n"));

Modified: head/security/sssd/files/patch-src__sss_client__common.c
==============================================================================
--- head/security/sssd/files/patch-src__sss_client__common.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__sss_client__common.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,14 +1,14 @@
-From f40ad7e39f68345f3bfec169556463c1a13706e0 Mon Sep 17 00:00:00 2001
+From 6874fb930a30eac6fe12104923ab97083f58bcf9 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:11 +0200
-Subject: [PATCH 18/34] patch-src__sss_client__common.c
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 14/25] patch-src__sss_client__common.c
 
 ---
- src/sss_client/common.c | 20 +++++++++++---------
- 1 file changed, 11 insertions(+), 9 deletions(-)
+ src/sss_client/common.c | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
 
 diff --git src/sss_client/common.c src/sss_client/common.c
-index 6639ae1..d0b5c6d 100644
+index ec5c708..5d17eed 100644
 --- src/sss_client/common.c
 +++ src/sss_client/common.c
 @@ -25,6 +25,7 @@
@@ -19,18 +19,15 @@ index 6639ae1..d0b5c6d 100644
  #include <security/pam_modules.h>
  #include <errno.h>
  #include <sys/types.h>
-@@ -61,6 +62,10 @@
- #define SSS_DEFAULT_WRITE_FLAGS 0
- #endif
- 
-+#ifndef EOWNERDEAD
-+#define EOWNERDEAD               130
-+#endif
-+
- /* common functions */
- 
- int sss_cli_sd = -1; /* the sss client socket descriptor */
-@@ -124,7 +129,6 @@ static enum sss_status sss_cli_send_req(enum sss_cli_command cmd,
+@@ -43,6 +44,7 @@
+ #include <libintl.h>
+ #define _(STRING) dgettext (PACKAGE, STRING)
+ #include "sss_cli.h"
++#include "util/sss_bsd_errno.h"
+ 
+ #if HAVE_PTHREAD
+ #include <pthread.h>
+@@ -124,7 +126,6 @@ static enum sss_status sss_cli_send_req(enum sss_cli_command cmd,
              *errnop = error;
              break;
          case 0:
@@ -38,7 +35,7 @@ index 6639ae1..d0b5c6d 100644
              break;
          case 1:
              if (pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
-@@ -232,7 +236,6 @@ static enum sss_status sss_cli_recv_rep(enum sss_cli_command cmd,
+@@ -232,7 +233,6 @@ static enum sss_status sss_cli_recv_rep(enum sss_cli_command cmd,
              *errnop = error;
              break;
          case 0:
@@ -46,7 +43,7 @@ index 6639ae1..d0b5c6d 100644
              break;
          case 1:
              if (pfd.revents & (POLLHUP)) {
-@@ -669,7 +672,6 @@ static enum sss_status sss_cli_check_socket(int *errnop, const char *socket_name
+@@ -669,7 +669,6 @@ static enum sss_status sss_cli_check_socket(int *errnop, const char *socket_name
              *errnop = error;
              break;
          case 0:
@@ -54,7 +51,7 @@ index 6639ae1..d0b5c6d 100644
              break;
          case 1:
              if (pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) {
-@@ -719,23 +721,23 @@ enum nss_status sss_nss_make_request(enum sss_cli_command cmd,
+@@ -719,23 +718,23 @@ enum nss_status sss_nss_make_request(enum sss_cli_command cmd,
      /* avoid looping in the nss daemon */
      envval = getenv("_SSS_LOOPS");
      if (envval && strcmp(envval, "NO") == 0) {
@@ -83,15 +80,6 @@ index 6639ae1..d0b5c6d 100644
      }
  }
  
-@@ -984,7 +986,7 @@ errno_t sss_strnlen(const char *str, size_t maxlen, size_t *len)
-     *len = 0;
-     while (*len < maxlen) {
-         if (str[*len] == '\0') break;
--        len++;
-+        ++*len;
-     }
- #endif
- 
 -- 
 1.8.0
 

Modified: head/security/sssd/files/patch-src__sss_client__nss_group.c
==============================================================================
--- head/security/sssd/files/patch-src__sss_client__nss_group.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__sss_client__nss_group.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,44 +1,45 @@
-From 36ea9e6d18578237b9e7ffef382788736eab49f5 Mon Sep 17 00:00:00 2001
+From 5a0c2079efae0f9734d85932ed72645808b32091 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:11 +0200
-Subject: [PATCH 19/34] patch-src__sss_client__nss_group.c
+Date: Wed, 6 Nov 2013 22:01:20 +0100
+Subject: [PATCH 15/25] patch-src__sss_client__nss_group.c
 
 ---
- src/sss_client/nss_group.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 71 insertions(+)
+ src/sss_client/nss_group.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 70 insertions(+)
 
 diff --git src/sss_client/nss_group.c src/sss_client/nss_group.c
-index e6ea54b..88cd1ab 100644
+index e6ea54b..b27b671 100644
 --- src/sss_client/nss_group.c
 +++ src/sss_client/nss_group.c
-@@ -343,6 +343,77 @@ out:
+@@ -343,6 +343,76 @@ out:
  }
  
  
 +#define MIN(a, b)((a) < (b) ? (a) : (b))
 +
-+gr_addgid(gid_t gid, gid_t *groups, int maxgrp, int *grpcnt)
++int gr_addgid(gid_t gid, gid_t *groups, int maxgrp, int *grpcnt)
 +{
-+  int     ret, dupc;
++    int ret, dupc;
 +
-+  for (dupc = 0; dupc < MIN(maxgrp, *grpcnt); dupc++) {
-+    if (groups[dupc] == gid)
-+      return 1;
-+  }
-+
-+  ret = 1;
-+  if (*grpcnt < maxgrp)
-+    groups[*grpcnt] = gid;
-+  else
-+    ret = 0;
++    for (dupc = 0; dupc < MIN(maxgrp, *grpcnt); dupc++) {
++        if (groups[dupc] == gid)
++            return 1;
++    }
++
++    ret = 1;
++    if (*grpcnt < maxgrp)
++        groups[*grpcnt] = gid;
++    else
++        ret = 0;
 +
-+  (*grpcnt)++;
++    (*grpcnt)++;
 +
-+  return ret;
++    return ret;
 +}
 +
-+enum nss_status _nss_sss_getgroupmembership(const char *uname, gid_t agroup, gid_t *groups,
-+					    int maxgrp, int *grpcnt)
++enum nss_status _nss_sss_getgroupmembership(const char *uname, gid_t agroup,
++                                            gid_t *groups, int maxgrp,
++                                            int *grpcnt)
 +{
 +    struct sss_cli_req_data rd;
 +    uint8_t *repbuf;
@@ -57,7 +58,7 @@ index e6ea54b..88cd1ab 100644
 +    nret = sss_nss_make_request(SSS_NSS_INITGR, &rd,
 +                                &repbuf, &replen, &errnop);
 +    if (nret != NSS_STATUS_SUCCESS) {
-+        goto out;
++        goto done;
 +    }
 +
 +    /* no results if not found */
@@ -65,7 +66,7 @@ index e6ea54b..88cd1ab 100644
 +    if (num_ret == 0) {
 +        free(repbuf);
 +        nret = NSS_STATUS_NOTFOUND;
-+        goto out;
++        goto done;
 +    }
 +    max_ret = num_ret;
 +
@@ -79,11 +80,9 @@ index e6ea54b..88cd1ab 100644
 +    free(repbuf);
 +    nret = NSS_STATUS_SUCCESS;
 +
-+out:
++done:
 +    sss_nss_unlock();
 +    return nret;
-+
-+
 +}
 +
  enum nss_status _nss_sss_getgrnam_r(const char *name, struct group *result,

Modified: head/security/sssd/files/patch-src__util__crypto__libcrypto__crypto_sha512crypt.c
==============================================================================
--- head/security/sssd/files/patch-src__util__crypto__libcrypto__crypto_sha512crypt.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__util__crypto__libcrypto__crypto_sha512crypt.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,54 +1,31 @@
-From 557ea27d9f1a8f86dc769ea6c174055992ebf803 Mon Sep 17 00:00:00 2001
+From 74422233fe8c6efa826b20c6b579f4c99e45ff87 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:12 +0200
-Subject: [PATCH 22/34] patch-src__util__crypto__libcrypto__crypto_sha512crypt.c
+Date: Wed, 6 Nov 2013 22:01:21 +0100
+Subject: [PATCH 19/25] patch-src__util__crypto__libcrypto__crypto_sha512crypt.c
 
 ---
- src/util/crypto/libcrypto/crypto_sha512crypt.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ src/util/crypto/libcrypto/crypto_sha512crypt.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
 
 diff --git src/util/crypto/libcrypto/crypto_sha512crypt.c src/util/crypto/libcrypto/crypto_sha512crypt.c
-index f4c3e0d..ed77fa6 100644
+index 88628b6..4510403 100644
 --- src/util/crypto/libcrypto/crypto_sha512crypt.c
 +++ src/util/crypto/libcrypto/crypto_sha512crypt.c
-@@ -10,9 +10,7 @@
- /* SHA512-based Unix crypt implementation.
-    Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>.  */
- 
--#include "config.h"
--
--#include <endian.h>
-+#include <sys/endian.h>
- #include <errno.h>
- #include <limits.h>
- #include <stdbool.h>
-@@ -41,6 +39,8 @@ const char sha512_rounds_prefix[] = "rounds=";
- #define ROUNDS_MIN 1000
- #define ROUNDS_MAX 999999999
+@@ -28,6 +28,14 @@
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
  
 +#define __stpncpy(x, y, z) stpncpy(x, y, z)
 +
- /* Table with characters for base64 transformation.  */
- const char b64t[64] =
-     "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-@@ -198,7 +198,7 @@ static int sha512_crypt_r(const char *key,
-     /* Create byte sequence P. */
-     cp = p_bytes = alloca(key_len);
-     for (cnt = key_len; cnt >= 64; cnt -= 64) {
--        cp = mempcpy(cp, temp_result, 64);
-+	cp = (char *) memcpy(cp, temp_result, 64) + 64;
-     }
-     memcpy(cp, temp_result, cnt);
- 
-@@ -219,7 +219,7 @@ static int sha512_crypt_r(const char *key,
-     /* Create byte sequence S.  */
-     cp = s_bytes = alloca(salt_len);
-     for (cnt = salt_len; cnt >= 64; cnt -= 64) {
--        cp = mempcpy(cp, temp_result, 64);
-+	cp = (char *) memcpy(cp, temp_result, 64) + 64;
-     }
-     memcpy(cp, temp_result, cnt);
- 
++void *
++mempcpy (void *dest, const void *src, size_t n)
++{
++  return (char *) memcpy (dest, src, n) + n;
++}
++
+ /* Define our magic string to mark salt for SHA512 "encryption" replacement. */
+ const char sha512_salt_prefix[] = "$6$";
+ #define SALT_PREF_SIZE (sizeof(sha512_salt_prefix) - 1)
 -- 
 1.8.0
 

Modified: head/security/sssd/files/patch-src__util__crypto__nss__nss_sha512crypt.c
==============================================================================
--- head/security/sssd/files/patch-src__util__crypto__nss__nss_sha512crypt.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__util__crypto__nss__nss_sha512crypt.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,52 +1,31 @@
-From f5fbf2eee46f33a4614f0553403c8590ca04bb59 Mon Sep 17 00:00:00 2001
+From be27b76238aa49ac0ace123f80c9957ae25501fa Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:12 +0200
-Subject: [PATCH 23/34] patch-src__util__crypto__nss__nss_sha512crypt.c
+Date: Wed, 6 Nov 2013 22:01:21 +0100
+Subject: [PATCH 20/25] patch-src__util__crypto__nss__nss_sha512crypt.c
 
 ---
- src/util/crypto/nss/nss_sha512crypt.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ src/util/crypto/nss/nss_sha512crypt.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
 
 diff --git src/util/crypto/nss/nss_sha512crypt.c src/util/crypto/nss/nss_sha512crypt.c
-index 76eb8a6..db7582d 100644
+index 2838c47..a6cf43f 100644
 --- src/util/crypto/nss/nss_sha512crypt.c
 +++ src/util/crypto/nss/nss_sha512crypt.c
-@@ -10,7 +10,7 @@
- 
- #include "config.h"
- 
--#include <endian.h>
-+#include <sys/endian.h>
- #include <errno.h>
- #include <limits.h>
- #include <stdbool.h>
-@@ -42,6 +42,8 @@ const char sha512_rounds_prefix[] = "rounds=";
- #define ROUNDS_MIN 1000
- #define ROUNDS_MAX 999999999
+@@ -29,6 +29,14 @@
+ #include <sechash.h>
+ #include <pk11func.h>
  
 +#define __stpncpy(x, y, z) stpncpy(x, y, z)
 +
- /* Table with characters for base64 transformation.  */
- const char b64t[64] =
-     "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-@@ -205,7 +207,7 @@ static int sha512_crypt_r(const char *key,
-     /* Create byte sequence P. */
-     cp = p_bytes = alloca(key_len);
-     for (cnt = key_len; cnt >= 64; cnt -= 64) {
--        cp = mempcpy(cp, temp_result, 64);
-+	cp = (char *) memcpy(cp, temp_result, 64) + 64;
-     }
-     memcpy(cp, temp_result, cnt);
- 
-@@ -223,7 +225,7 @@ static int sha512_crypt_r(const char *key,
-     /* Create byte sequence S.  */
-     cp = s_bytes = alloca(salt_len);
-     for (cnt = salt_len; cnt >= 64; cnt -= 64) {
--        cp = mempcpy(cp, temp_result, 64);
-+	cp = (char *) memcpy(cp, temp_result, 64) + 64;
-     }
-     memcpy(cp, temp_result, cnt);
- 
++static void *
++mempcpy (void *dest, const void *src, size_t n)
++{
++  return (char *) memcpy (dest, src, n) + n;
++}
++
+ /* Define our magic string to mark salt for SHA512 "encryption" replacement. */
+ const char sha512_salt_prefix[] = "$6$";
+ #define SALT_PREF_SIZE (sizeof(sha512_salt_prefix) - 1)
 -- 
 1.8.0
 

Modified: head/security/sssd/files/patch-src__util__find_uid.c
==============================================================================
--- head/security/sssd/files/patch-src__util__find_uid.c	Fri Nov  8 10:53:05 2013	(r333198)
+++ head/security/sssd/files/patch-src__util__find_uid.c	Fri Nov  8 10:58:10 2013	(r333199)
@@ -1,14 +1,14 @@
-From 0b1b319b34db96e2088c1f71d51ce95f819ccce8 Mon Sep 17 00:00:00 2001
+From ccc51217c877dde1857300662fdacab2298f5816 Mon Sep 17 00:00:00 2001
 From: Lukas Slebodnik <lukas.slebodnik@intrak.sk>
-Date: Sat, 4 May 2013 16:08:12 +0200
-Subject: [PATCH 24/34] patch-src__util__find_uid.c
+Date: Wed, 6 Nov 2013 22:01:21 +0100
+Subject: [PATCH 21/25] patch-src__util__find_uid.c
 
 ---
- src/util/find_uid.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
+ src/util/find_uid.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git src/util/find_uid.c src/util/find_uid.c
-index d34a4ab..b309b19 100644
+index d34a4ab..9dec900 100644
 --- src/util/find_uid.c
 +++ src/util/find_uid.c
 @@ -67,7 +67,7 @@ static errno_t get_uid_from_pid(const pid_t pid, uid_t *uid)
@@ -20,7 +20,13 @@ index d34a4ab..b309b19 100644

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311081058.rA8AwA6B042497>