svn commit: r526974 - in head/mail/exim: . files
Dima Panov
fluffy at FreeBSD.org
Mon Feb 24 15:32:56 UTC 2020
Author: fluffy
Date: Mon Feb 24 15:32:55 2020
New Revision: 526974
URL: https://svnweb.freebsd.org/changeset/ports/526974
Log:
mail/exim: unbreak with AUTH_RADIUS
- bump PORTREVISION for radius users only
- allow to build with net/freeradius-client instead of abandonware net/radiusclient-ng
- Do not invoke printf-like function without parameter in call_radius.c
With exim 4.93, string_sprintf() requires at least two arguments
- take maintainership, discussed with vsevolod@ via private mail
PR: 244287, 244299
Reported by: pi, Victor Sudakov
Approved by: maintainer
Added:
head/mail/exim/files/patch-src-auths-call_radius.c (contents, props changed)
Modified:
head/mail/exim/Makefile
Modified: head/mail/exim/Makefile
==============================================================================
--- head/mail/exim/Makefile Mon Feb 24 15:12:22 2020 (r526973)
+++ head/mail/exim/Makefile Mon Feb 24 15:32:55 2020 (r526974)
@@ -12,7 +12,7 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:exim
DIST_SUBDIR= exim
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= vsevolod at FreeBSD.org
+MAINTAINER= fluffy at FreeBSD.org
COMMENT?= High performance MTA for Unix systems on the Internet
LICENSE= GPLv2
@@ -381,15 +381,16 @@ SEDLIST+= -e 's,^\# (AUTH_CYRUS_SASL=),\1,' \
.endif
.if ${PORT_OPTIONS:MAUTH_RADIUS}
+PORTREVISION?= 1
WITH_RADIUS_TYPE?= RADLIB
.if ${WITH_RADIUS_TYPE:tl} == radlib
SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,-lradius,' \
-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1/etc/radius.conf,' \
-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADLIB,'
.elif ${WITH_RADIUS_TYPE:tl} == radiusclient
-LIB_DEPENDS+= libradiusclient-ng.so:net/radiusclient
-SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib -lradiusclient-ng,' \
- -e 's,^\# (RADIUS_CONFIG_FILE=).*,\1${LOCALBASE:S/,/\\,/g}/etc/radiusclient-ng/radiusclient.conf,' \
+LIB_DEPENDS+= libfreeradius-client.so:net/freeradius-client
+SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,-L${LOCALBASE:S/,/\\,/g}/lib -lfreeradius-client,' \
+ -e 's,^\# (RADIUS_CONFIG_FILE=).*,\1${LOCALBASE:S/,/\\,/g}/etc/radiusclient/radiusclient.conf,' \
-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADIUSCLIENTNEW,'
.else
IGNORE= the variable WITH_RADIUS_TYPE must be either RADLIB or RADIUSCLIENT
Added: head/mail/exim/files/patch-src-auths-call_radius.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/exim/files/patch-src-auths-call_radius.c Mon Feb 24 15:32:55 2020 (r526974)
@@ -0,0 +1,92 @@
+--- src/auths/call_radius.c.orig 2019-12-08 12:53:48 UTC
++++ src/auths/call_radius.c
+@@ -112,37 +112,37 @@ rc_openlog("exim");
+
+ #ifdef RADIUS_LIB_RADIUSCLIENT
+ if (rc_read_config(RADIUS_CONFIG_FILE) != 0)
+- *errptr = string_sprintf("RADIUS: can't open %s", RADIUS_CONFIG_FILE);
++ *errptr = string_sprintf("%s", "RADIUS: can't open %s", RADIUS_CONFIG_FILE);
+
+ else if (rc_read_dictionary(rc_conf_str("dictionary")) != 0)
+- *errptr = string_sprintf("RADIUS: can't read dictionary");
++ *errptr = string_sprintf("%s", "RADIUS: can't read dictionary");
+
+ else if (rc_avpair_add(&send, PW_USER_NAME, user, 0) == NULL)
+- *errptr = string_sprintf("RADIUS: add user name failed\n");
++ *errptr = string_sprintf("%s", "RADIUS: add user name failed\n");
+
+ else if (rc_avpair_add(&send, PW_USER_PASSWORD, CS radius_args, 0) == NULL)
+- *errptr = string_sprintf("RADIUS: add password failed\n");
++ *errptr = string_sprintf("%s", "RADIUS: add password failed\n");
+
+ else if (rc_avpair_add(&send, PW_SERVICE_TYPE, &service, 0) == NULL)
+- *errptr = string_sprintf("RADIUS: add service type failed\n");
++ *errptr = string_sprintf("%s", "RADIUS: add service type failed\n");
+
+ #else /* RADIUS_LIB_RADIUSCLIENT unset => RADIUS_LIB_RADIUSCLIENT2 */
+
+ if ((h = rc_read_config(RADIUS_CONFIG_FILE)) == NULL)
+- *errptr = string_sprintf("RADIUS: can't open %s", RADIUS_CONFIG_FILE);
++ *errptr = string_sprintf("%s", "RADIUS: can't open %s", RADIUS_CONFIG_FILE);
+
+ else if (rc_read_dictionary(h, rc_conf_str(h, "dictionary")) != 0)
+- *errptr = string_sprintf("RADIUS: can't read dictionary");
++ *errptr = string_sprintf("%s", "RADIUS: can't read dictionary");
+
+ else if (rc_avpair_add(h, &send, PW_USER_NAME, user, Ustrlen(user), 0) == NULL)
+- *errptr = string_sprintf("RADIUS: add user name failed\n");
++ *errptr = string_sprintf("%s", "RADIUS: add user name failed\n");
+
+ else if (rc_avpair_add(h, &send, PW_USER_PASSWORD, CS radius_args,
+ Ustrlen(radius_args), 0) == NULL)
+- *errptr = string_sprintf("RADIUS: add password failed\n");
++ *errptr = string_sprintf("%s", "RADIUS: add password failed\n");
+
+ else if (rc_avpair_add(h, &send, PW_SERVICE_TYPE, &service, 0, 0) == NULL)
+- *errptr = string_sprintf("RADIUS: add service type failed\n");
++ *errptr = string_sprintf("%s", "RADIUS: add service type failed\n");
+
+ #endif /* RADIUS_LIB_RADIUSCLIENT */
+
+@@ -175,7 +175,7 @@ switch (result)
+
+ default:
+ case BADRESP_RC:
+- *errptr = string_sprintf("RADIUS: unexpected response (%d)", result);
++ *errptr = string_sprintf("%s", "RADIUS: unexpected response (%d)", result);
+ return ERROR;
+ }
+
+@@ -186,7 +186,7 @@ switch (result)
+ h = rad_auth_open();
+ if (h == NULL)
+ {
+- *errptr = string_sprintf("RADIUS: can't initialise libradius");
++ *errptr = string_sprintf("%s", "RADIUS: can't initialise libradius");
+ return ERROR;
+ }
+ if (rad_config(h, RADIUS_CONFIG_FILE) != 0 ||
+@@ -196,7 +196,7 @@ if (rad_config(h, RADIUS_CONFIG_FILE) != 0 ||
+ rad_put_int(h, RAD_SERVICE_TYPE, RAD_AUTHENTICATE_ONLY) != 0 ||
+ rad_put_string(h, RAD_NAS_IDENTIFIER, CS primary_hostname) != 0)
+ {
+- *errptr = string_sprintf("RADIUS: %s", rad_strerror(h));
++ *errptr = string_sprintf("%s", "RADIUS: %s", rad_strerror(h));
+ result = ERROR;
+ }
+ else
+@@ -214,12 +214,12 @@ else
+ break;
+
+ case -1:
+- *errptr = string_sprintf("RADIUS: %s", rad_strerror(h));
++ *errptr = string_sprintf("%s", "RADIUS: %s", rad_strerror(h));
+ result = ERROR;
+ break;
+
+ default:
+- *errptr = string_sprintf("RADIUS: unexpected response (%d)", result);
++ *errptr = string_sprintf("%s", "RADIUS: unexpected response (%d)", result);
+ result= ERROR;
+ break;
+ }
More information about the svn-ports-all
mailing list