1 Star 0 Fork 19

yu_boyun/sendmail

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

搜索帮助