提交 db36449f 编写于 作者: D Doug Goldstein 提交者: Eric Blake

remote: check actual access to the cert

Instead of calling stat(), check that we'll actually be able to access
and read the file.
Signed-off-by: NDoug Goldstein <cardoe@gentoo.org>
上级 f84fe150
......@@ -1140,8 +1140,7 @@ static gnutls_certificate_credentials_t x509_cred;
static int
check_cert_file(const char *type, const char *file)
{
struct stat sb;
if (stat(file, &sb) < 0) {
if (access(file, R_OK)) {
virReportSystemError(errno,
_("Cannot access %s '%s'"),
type, file);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册