diff options
author | Sam Hartman <hartmans@painless-security.com> | 2013-09-30 08:16:09 -0400 |
---|---|---|
committer | Sam Hartman <hartmans@painless-security.com> | 2013-09-30 08:16:09 -0400 |
commit | 5c48c1f34ebc0662ac24d2a92fdf89c6447a5cf8 (patch) | |
tree | 335f62a057f92f5c6f7064daf37025c2a1552373 /lib/radius | |
parent | ec43e1ae18f8b3b129ffdae83e20101edd413ff3 (diff) | |
parent | 968744389f35996a1e7133dfdaa0ff9f70b50119 (diff) |
Merge branch 'moonshot' into debian
Conflicts:
lib/Makefile.am
lib/build-aux/config.guess
lib/build-aux/config.sub
lib/build-aux/depcomp
lib/build-aux/ltmain.sh
lib/build-aux/missing
lib/m4/libtool.m4
lib/m4/ltoptions.m4
lib/m4/ltversion.m4
lib/m4/lt~obsolete.m4
lib/radsec.c
lib/radsecproxy/tlscommon.c
lib/tls.c
Diffstat (limited to 'lib/radius')
-rw-r--r-- | lib/radius/Makefile.am | 8 | ||||
-rw-r--r-- | lib/radius/client.h | 25 | ||||
-rw-r--r-- | lib/radius/radpkt.c | 6 | ||||
-rw-r--r-- | lib/radius/share/dictionary.abfab.ietf | 8 |
4 files changed, 20 insertions, 27 deletions
diff --git a/lib/radius/Makefile.am b/lib/radius/Makefile.am index 96bafae..9aafed7 100644 --- a/lib/radius/Makefile.am +++ b/lib/radius/Makefile.am @@ -1,6 +1,8 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 +BUILT_SOURCES = dictionaries.c + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) AM_CFLAGS = -Wall -g @@ -11,6 +13,7 @@ libradsec_radius_la_SOURCES = \ crypto.c \ custom.c \ dict.c \ + client.h \ id.c \ parse.c \ print.c \ @@ -18,6 +21,8 @@ libradsec_radius_la_SOURCES = \ static.c \ valuepair.c +libradsec_radius_la_SOURCES += client.h + libradsec_radius_la_CFLAGS = $(AM_CFLAGS) -DHAVE_CONFIG_H DICTIONARIES = \ @@ -27,7 +32,7 @@ DICTIONARIES = \ share/dictionary.ukerna \ share/dictionary.abfab.ietf -EXTRA_DIST = $(DICTIONARIES) +EXTRA_DIST = dictionaries.c $(DICTIONARIES) common.pl convert.pl $(top_srcdir)/include/radsec/radius.h dictionaries.c: ${DICTIONARIES} convert.pl common.pl $(srcdir)/convert.pl ${DICTIONARIES} @@ -38,4 +43,3 @@ clean-local: rm -f dictionaries.c $(libradsec_radius_la_SOURCES): $(top_srcdir)/include/radsec/radius.h - diff --git a/lib/radius/client.h b/lib/radius/client.h index aefb40d..ab4718a 100644 --- a/lib/radius/client.h +++ b/lib/radius/client.h @@ -48,6 +48,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <string.h> #endif #include <stdarg.h> +#include <sys/types.h> #ifdef HAVE_NETDB_H #include <netdb.h> #endif @@ -150,25 +151,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #ifdef WITHOUT_OPENSSL -#ifndef RS_MD5_CTX -#error RS_MD5_CTX must be defined -#endif -#ifndef RS_MD5Init -#error n_rMD5Init must be defined -#endif -#ifndef RS_MD5Update -#error RS_MD5Updyae must be defined -#endif -#ifndef RS_MD5Final -#error RS_MD5Final must be defined -#endif -#ifndef RS_MD5Transform -#error RS_MD5Transform must be defined +#include "md5.h" +#else +#include <openssl/md5.h> #endif -#else /* WITHOUT_OPENSSL */ - -#include <openssl/md5.h> /** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */ #define RS_MD5_CTX MD5_CTX /** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */ @@ -177,9 +164,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define RS_MD5Update MD5_Update /** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */ #define RS_MD5Final MD5_Final -/** Define for compile-time selection of the MD5 functions. Defaults to using the OpenSSL functions. \ingroup custom */ -#define RS_MD5Transform MD5_Transform -#endif + #ifndef RS_MAX_PACKET_LEN /** The maximum size of a packet that the library will send or receive. \ingroup custom diff --git a/lib/radius/radpkt.c b/lib/radius/radpkt.c index bb8f75e..d9486ea 100644 --- a/lib/radius/radpkt.c +++ b/lib/radius/radpkt.c @@ -871,7 +871,11 @@ ssize_t nr_packet_attr_append(RADIUS_PACKET *packet, data_len = strlen(data); } - packet->flags |= RS_PACKET_ENCODED; /* ignore any VPs */ + /* We're going to mark the whole packet as encoded so we + better not have any unencoded value-pairs attached. */ + if (packet->vps) + return -RSE_INVAL; + packet->flags |= RS_PACKET_ENCODED; attr = packet->data + packet->length; end = attr + packet->sizeof_data; diff --git a/lib/radius/share/dictionary.abfab.ietf b/lib/radius/share/dictionary.abfab.ietf index 07c432b..b60702c 100644 --- a/lib/radius/share/dictionary.abfab.ietf +++ b/lib/radius/share/dictionary.abfab.ietf @@ -1,4 +1,4 @@ -ATTRIBUTE GSS-ACCEPTOR-SERVICE-NAME 164 string -ATTRIBUTE GSS-ACCEPTOR-HOST-NAME 165 string -ATTRIBUTE GSS-ACCEPTOR-SERVICE-SPECIFICS 166 string -ATTRIBUTE GSS-ACCEPTOR-REALM-NAME 167 string +ATTRIBUTE GSS-Acceptor-Service-Name 164 string +ATTRIBUTE GSS-Acceptor-Host-Name 165 string +ATTRIBUTE GSS-Acceptor-Service-Specifics 166 string +ATTRIBUTE GSS-Acceptor-Realm-Name 167 string |