freeradius3: update to 3.0.17
authorEneas U de Queiroz <cote2004-github@yahoo.com>
Fri, 25 May 2018 20:33:12 +0000 (17:33 -0300)
committerEneas U de Queiroz <cote2004-github@yahoo.com>
Fri, 25 May 2018 20:33:12 +0000 (17:33 -0300)
Latest stable release, support for openssl 1.1

Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
net/freeradius3/Makefile
net/freeradius3/patches/002-disable-session-cache-CVE-2017-9148.patch
net/freeradius3/patches/003-freeradius-fix-error-for-expansion-of-macro.patch [new file with mode: 0644]

index 20d1dc5e2e7d8cccbcc3b288eaed7412f51f5419..21c97496637a32179a048b8b8d60195fe91d42cf 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=freeradius3
-PKG_VERSION:=release_3_0_11
-PKG_RELEASE:=3
+PKG_VERSION:=release_3_0_17
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/FreeRADIUS/freeradius-server/archive
-PKG_HASH:=f0b32edb90368c3b9523e2baa792a1794d8bad662407f0d210a6c460541379b7
+PKG_HASH:=5b2382f08c0d9d064298281c1fb8348fc13df76550ce7a5cfc47ea91361fad91
 
 PKG_MAINTAINER:=Lucile Quirion <lucile.quirion@savoirfairelinux.com>
 PKG_LICENSE:=GPL-2.0
@@ -488,6 +488,13 @@ else
   CONFIGURE_ARGS+= --without-rlm_ldap
 endif
 
+ifeq ($(CONFIG_USE_GLIBC),y)
+  TARGET_CFLAGS+= -DLIBBSD_OVERLAY -I$(STAGING_DIR)/usr/include/bsd \
+       -D_RPC_NETDB_H
+       #^^^^^^^^^^^^^ avoid inclusion of librpc's netdb.h
+  CONFIGURE_LIBS+= -Wl,--push-state,--as-needed -lbsd -Wl,--pop-state
+endif
+
 CONFIGURE_VARS+= \
        LDFLAGS="$$$$LDFLAGS" \
        LIBS="$(CONFIGURE_LIBS)" \
index 458eeba212cef9d459226dad5a67eb859b67a91c..b909e1df4bfb321cf6a4dff8a353954cd51d993e 100644 (file)
@@ -9,7 +9,7 @@ Last-Update: 2017-05-30
 
 --- a/src/main/tls.c
 +++ b/src/main/tls.c
-@@ -369,7 +369,7 @@ tls_session_t *tls_new_session(TALLOC_CT
+@@ -594,7 +594,7 @@ tls_session_t *tls_new_session(TALLOC_CT
         *
         *      FIXME: Also do it every N sessions?
         */
@@ -18,7 +18,7 @@ Last-Update: 2017-05-30
            ((conf->session_last_flushed + ((int)conf->session_timeout * 1800)) <= request->timestamp)){
                RDEBUG2("Flushing SSL sessions (of #%ld)", SSL_CTX_sess_number(conf->ctx));
  
-@@ -463,7 +463,7 @@ tls_session_t *tls_new_session(TALLOC_CT
+@@ -689,7 +689,7 @@ tls_session_t *tls_new_session(TALLOC_CT
                state->mtu = vp->vp_integer;
        }
  
@@ -27,7 +27,7 @@ Last-Update: 2017-05-30
  
        return state;
  }
-@@ -2675,7 +2675,7 @@ post_ca:
+@@ -3151,7 +3151,7 @@ post_ca:
        /*
         *      Callbacks, etc. for session resumption.
         */
@@ -36,7 +36,7 @@ Last-Update: 2017-05-30
                /*
                 *      Cache sessions on disk if requested.
                 */
-@@ -2745,7 +2745,7 @@ post_ca:
+@@ -3221,7 +3221,7 @@ post_ca:
        /*
         *      Setup session caching
         */
diff --git a/net/freeradius3/patches/003-freeradius-fix-error-for-expansion-of-macro.patch b/net/freeradius3/patches/003-freeradius-fix-error-for-expansion-of-macro.patch
new file mode 100644 (file)
index 0000000..10ac890
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/src/include/threads.h
++++ b/src/include/threads.h
+@@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pt
+ #  define fr_thread_local_get(_n) _n
+ #elif defined(HAVE_PTHREAD_H)
+ #  include <pthread.h>
+-#  define fr_thread_local_setup(_t, _n) \
++#  define fr_thread_local_setup(_t, _n) static __thread _t _n;\
+ static pthread_key_t __fr_thread_local_key_##_n;\
+ static pthread_once_t __fr_thread_local_once_##_n = PTHREAD_ONCE_INIT;\
+ static pthread_destructor_t __fr_thread_local_destructor_##_n = NULL;\
+@@ -100,17 +100,17 @@ static void __fr_thread_local_destroy_##
+ static void __fr_thread_local_key_init_##_n(void)\
+ {\
+       (void) pthread_key_create(&__fr_thread_local_key_##_n, __fr_thread_local_destroy_##_n);\
+-      (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+ }\
+ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\
+ {\
+       __fr_thread_local_destructor_##_n = func;\
+       if (_n) return _n; \
+       (void) pthread_once(&__fr_thread_local_once_##_n, __fr_thread_local_key_init_##_n);\
++      (void) pthread_setspecific(__fr_thread_local_key_##_n, &(_n));\
+       return _n;\
+ }
+-#  define fr_thread_local_init(_n, _f)                        __fr_thread_local_init_##_n(_f)
+-#  define fr_thread_local_set(_n, _v)                 __fr_thread_local_set_##_n(_v)
+-#  define fr_thread_local_get(_n)                     __fr_thread_local_get_##_n()
++#  define fr_thread_local_init(_n, _f)        __fr_thread_local_init_##_n(_f)
++#  define fr_thread_local_set(_n, _v) ((int)!((_n = _v) || 1))
++#  define fr_thread_local_get(_n) _n
+ #endif
+ #endif