summarylogtreecommitdiffstats
path: root/sendmail-8.17.1-sasl2-in-etc.patch
blob: 5b18c996589750970c28dda125bc484bcc2c8df9 (plain)
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
diff --git a/sendmail/usersmtp.c b/sendmail/usersmtp.c
index 5fe0791..2417558 100644
--- a/sendmail/usersmtp.c
+++ b/sendmail/usersmtp.c
@@ -1374,9 +1374,7 @@ safesaslfile(context, file)
 {
 	long sff;
 	int r;
-# if SASL <= 10515
 	size_t len;
-# endif
 	char *p;
 
 	if (SM_IS_EMPTY(file))
@@ -1414,9 +1414,16 @@ safesaslfile(context, file)
 # endif /* SASL <= 10515 */
 
 	p = (char *) file;
+	len = strlen(p);
 	if ((r = safefile(p, RunAsUid, RunAsGid, RunAsUserName, sff,
 			  S_IRUSR, NULL)) == 0)
 		return SASL_OK;
+#if SASL > 10515
+	/* Expect /usr/lib/sasl2/Sendmail.conf to be missing - config now in /etc/sasl2 */
+	if (type == SASL_VRFY_CONF && r == ENOENT &&
+            len >= 8 && strncmp(p, "/usr/lib", 8) == 0)
+		return SASL_CONTINUE;
+#endif /* SASL > 10515 */
 	if (LogLevel > (r != ENOENT ? 8 : 10))
 		sm_syslog(LOG_WARNING, NOQID, "error: safesasl(%s) failed: %s",
 			  p, sm_errstring(r));