1 Star 0 Fork 19

Apricity/sendmail

forked from src-openEuler/sendmail 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sendmail-8.14.8-sasl2-in-etc.patch 927 Bytes
一键复制 编辑 原始数据 按行查看 历史
eaglegai 提交于 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/zengwefeng/sendmail.git
git@gitee.com:zengwefeng/sendmail.git
zengwefeng
sendmail
sendmail
master

搜索帮助