1 Star 0 Fork 19

eaglegai/sendmail

forked from src-openEuler/sendmail 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
sendmail-8.14.8-sasl2-in-etc.patch 927 Bytes
Copy Edit Raw Blame History
eaglegai authored 2020-08-03 19:17 . update sendmail to 8.16.1
diff --git a/sendmail/usersmtp.c b/sendmail/usersmtp.c
index c217ffa..e4dadd3 100644
--- a/sendmail/usersmtp.c
+++ b/sendmail/usersmtp.c
@@ -1331,9 +1331,7 @@ safesaslfile(context, file)
{
long sff;
int r;
-#if SASL <= 10515
size_t len;
-#endif
char *p;
if (file == NULL || *file == '\0')
@@ -1369,9 +1367,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));
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/eaglegai/sendmail.git
git@gitee.com:eaglegai/sendmail.git
eaglegai
sendmail
sendmail
master

Search