提交 0c4aec29 编写于 作者: D Daniel P. Berrange

Block all use of libvirt.so in setuid programs

Avoid people introducing security flaws in their apps by
forbidding the use of libvirt.so in setuid programs, with
a check in virInitialize.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 9cd6a57d)
上级 54b33cc9
......@@ -409,6 +409,14 @@ virGlobalInit(void)
virErrorInitialize() < 0)
goto error;
#ifndef IN_VIRT_LOGIN_SHELL
if (virIsSUID()) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("libvirt.so is not safe to use from setuid programs"));
goto error;
}
#endif
#ifdef WITH_GNUTLS_GCRYPT
/*
* This sequence of API calls it copied exactly from
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册