almost working
This commit is contained in:
@ -1,32 +0,0 @@
|
||||
--- src/smtp_in.c.orig 2017-03-08 16:31:57.587957000 +0000
|
||||
+++ src/smtp_in.c 2017-03-08 16:43:44.934346000 +0000
|
||||
@@ -2246,6 +2246,9 @@
|
||||
#ifdef USE_TCP_WRAPPERS
|
||||
struct request_info tcpwrap_ri;
|
||||
#endif
|
||||
+#ifdef USE_TCP_WRAPPERS
|
||||
+struct request_info tcpwrap_ri;
|
||||
+#endif
|
||||
|
||||
smtp_connection_start = time(NULL);
|
||||
for (smtp_ch_index = 0; smtp_ch_index < SMTP_HBUFF_SIZE; smtp_ch_index++)
|
||||
@@ -2602,11 +2605,14 @@
|
||||
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Expansion of \"%s\" "
|
||||
"(tcp_wrappers_name) failed: %s", string_printing(tcp_wrappers_name),
|
||||
expand_string_message);
|
||||
-
|
||||
- if (!hosts_ctl(tcp_wrappers_name,
|
||||
- sender_host_name ? CS sender_host_name : STRING_UNKNOWN,
|
||||
- sender_host_address ? CS sender_host_address : STRING_UNKNOWN,
|
||||
- sender_ident ? CS sender_ident : STRING_UNKNOWN))
|
||||
+ request_init(&tcpwrap_ri,
|
||||
+ RQ_DAEMON, tcp_wrappers_name,
|
||||
+ RQ_FILE, fileno(smtp_out),
|
||||
+ RQ_CLIENT_NAME, (sender_host_name == NULL)? STRING_UNKNOWN : CS sender_host_name,
|
||||
+ RQ_CLIENT_ADDR, (sender_host_address == NULL)? STRING_UNKNOWN : CS sender_host_address,
|
||||
+ RQ_USER, (sender_ident == NULL)? STRING_UNKNOWN : CS sender_ident,
|
||||
+ 0);
|
||||
+ if (!hosts_access(&tcpwrap_ri))
|
||||
{
|
||||
if (errno == 0 || errno == ENOENT)
|
||||
{
|
||||
@ -1,92 +0,0 @@
|
||||
--- src/auths/call_radius.c.orig 2020-05-30 22:35:38.000000000 +0200
|
||||
+++ src/auths/call_radius.c 2020-06-01 19:54:14.402105000 +0200
|
||||
@@ -113,37 +113,37 @@
|
||||
|
||||
#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 = US"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))
|
||||
- *errptr = US"RADIUS: add user name failed";
|
||||
+ *errptr = string_sprintf("%s", "RADIUS: add user name failed\n");
|
||||
|
||||
else if (!rc_avpair_add(&send, PW_USER_PASSWORD, CS radius_args, 0))
|
||||
- *errptr = US"RADIUS: add password failed");
|
||||
+ *errptr = string_sprintf("%s", "RADIUS: add password failed\n");
|
||||
|
||||
else if (!rc_avpair_add(&send, PW_SERVICE_TYPE, &service, 0))
|
||||
- *errptr = US"RADIUS: add service type failed";
|
||||
+ *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)))
|
||||
- *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 = US"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))
|
||||
- *errptr = US"RADIUS: add user name failed";
|
||||
+ *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))
|
||||
- *errptr = US"RADIUS: add password failed";
|
||||
+ *errptr = string_sprintf("%s", "RADIUS: add password failed\n");
|
||||
|
||||
else if (!rc_avpair_add(h, &send, PW_SERVICE_TYPE, &service, 0, 0))
|
||||
- *errptr = US"RADIUS: add service type failed";
|
||||
+ *errptr = string_sprintf("%s", "RADIUS: add service type failed\n");
|
||||
|
||||
#endif /* RADIUS_LIB_RADIUSCLIENT */
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
case BADRESP_RC:
|
||||
default:
|
||||
- *errptr = string_sprintf("RADIUS: unexpected response (%d)", result);
|
||||
+ *errptr = string_sprintf("%s", "RADIUS: unexpected response (%d)", result);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
if (!(h = rad_auth_open()))
|
||||
{
|
||||
- *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 @@
|
||||
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
|
||||
@@ -211,12 +211,12 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user