File: AuthRealm.p0

package info (click to toggle)
sendmail 8.18.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,268 kB
  • sloc: ansic: 106,906; perl: 7,504; sh: 5,488; makefile: 888
file content (43 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Patch from John Marshall (slightly modified).
Modified for 8.16.1 by Anne Bennett.

--- a/sendmail/srvrsmtp.c	2020-09-28 17:51:12.497535563 -0400
+++ b/sendmail/srvrsmtp.c	2020-09-28 18:21:30.482890337 -0400
@@ -116,7 +116,7 @@
 	do							\
 	{							\
 		RESET_AUTH_FAIL_LOG_USER;			\
-		result = reset_saslconn(&conn, AuthRealm, remoteip, \
+		result = reset_saslconn(&conn, hostname, remoteip, \
 					localip, auth_id, &ext_ssf); \
 		if (result != SASL_OK)				\
 			sasl_ok = false;			\
@@ -1018,8 +1018,6 @@
 	e->e_features = features;
 	hostname = macvalue('j', e);
 #if SASL
-	if (AuthRealm == NULL)
-		AuthRealm = hostname;
 	sasl_ok = bitset(SRV_OFFER_AUTH, features);
 	n_mechs = 0;
 	authenticating = SASL_NOT_AUTH;
@@ -1028,8 +1026,8 @@
 	if (sasl_ok)
 	{
 # if SASL >= 20000
-		result = sasl_server_new("smtp", AuthRealm, NULL, NULL, NULL,
-					 NULL, 0, &conn);
+		result = sasl_server_new("smtp", hostname, AuthRealm, NULL,
+					 NULL, NULL, 0, &conn);
 # elif SASL > 10505
 		/* use empty realm: only works in SASL > 1.5.5 */
 		result = sasl_server_new("smtp", AuthRealm, "", NULL, 0, &conn);
@@ -5559,7 +5557,7 @@
 
 	sasl_dispose(conn);
 # if SASL >= 20000
-	result = sasl_server_new("smtp", hostname, NULL, NULL, NULL,
+	result = sasl_server_new("smtp", hostname, AuthRealm, NULL, NULL,
 				 NULL, 0, conn);
 # elif SASL > 10505
 	/* use empty realm: only works in SASL > 1.5.5 */