Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
c0a3f03f
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c0a3f03f
编写于
7月 12, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean virConnectPtr object on client disconnect. Fix cleanup when access checks fail
上级
a219c3ab
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
6 deletion
+15
-6
ChangeLog
ChangeLog
+8
-1
qemud/qemud.c
qemud/qemud.c
+7
-5
未找到文件。
ChangeLog
浏览文件 @
c0a3f03f
Thu Jul 12 10:57:17 CEST 2007 Daniel Veillard <veillard@redhat.com>
Thu Jul 12 11:02:17 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* qemud/qemud.c: Fix cleanup when client access checks fail
so we don't accidentally register a dead client with the
event loop. Force close the virConnectPtr object if it is
still open when a client connection goes away
Thu Jul 12 11:00:17 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* qemud/qemud.c: Add explicit checks for existance of x509
* qemud/qemud.c: Add explicit checks for existance of x509
certificate & key files to get better error reporting than
certificate & key files to get better error reporting than
...
...
qemud/qemud.c
浏览文件 @
c0a3f03f
...
@@ -1045,6 +1045,9 @@ static void qemudDispatchClientFailure(struct qemud_server *server, struct qemud
...
@@ -1045,6 +1045,9 @@ static void qemudDispatchClientFailure(struct qemud_server *server, struct qemud
virEventRemoveHandleImpl
(
client
->
fd
);
virEventRemoveHandleImpl
(
client
->
fd
);
if
(
client
->
conn
)
virConnectClose
(
client
->
conn
);
if
(
client
->
tls
&&
client
->
session
)
gnutls_deinit
(
client
->
session
);
if
(
client
->
tls
&&
client
->
session
)
gnutls_deinit
(
client
->
session
);
close
(
client
->
fd
);
close
(
client
->
fd
);
free
(
client
);
free
(
client
);
...
@@ -1076,7 +1079,7 @@ static int qemudClientRead(struct qemud_server *server,
...
@@ -1076,7 +1079,7 @@ static int qemudClientRead(struct qemud_server *server,
client
->
direction
=
gnutls_record_get_direction
(
client
->
session
);
client
->
direction
=
gnutls_record_get_direction
(
client
->
session
);
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
)
<
0
)
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
)
<
0
)
qemudDispatchClientFailure
(
server
,
client
);
qemudDispatchClientFailure
(
server
,
client
);
if
(
ret
<=
0
)
{
else
if
(
ret
<=
0
)
{
if
(
ret
==
0
||
(
ret
!=
GNUTLS_E_AGAIN
&&
if
(
ret
==
0
||
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
))
{
ret
!=
GNUTLS_E_INTERRUPTED
))
{
if
(
ret
!=
0
)
if
(
ret
!=
0
)
...
@@ -1188,7 +1191,7 @@ static void qemudDispatchClientRead(struct qemud_server *server, struct qemud_cl
...
@@ -1188,7 +1191,7 @@ static void qemudDispatchClientRead(struct qemud_server *server, struct qemud_cl
/* Finished. Next step is to check the certificate. */
/* Finished. Next step is to check the certificate. */
if
(
remoteCheckAccess
(
client
)
==
-
1
)
if
(
remoteCheckAccess
(
client
)
==
-
1
)
qemudDispatchClientFailure
(
server
,
client
);
qemudDispatchClientFailure
(
server
,
client
);
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
)
<
0
)
else
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
)
<
0
)
qemudDispatchClientFailure
(
server
,
client
);
qemudDispatchClientFailure
(
server
,
client
);
}
else
if
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
)
{
}
else
if
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
)
{
qemudLog
(
QEMUD_ERR
,
"TLS handshake failed: %s"
,
qemudLog
(
QEMUD_ERR
,
"TLS handshake failed: %s"
,
...
@@ -1231,7 +1234,7 @@ static int qemudClientWrite(struct qemud_server *server,
...
@@ -1231,7 +1234,7 @@ static int qemudClientWrite(struct qemud_server *server,
client
->
direction
=
gnutls_record_get_direction
(
client
->
session
);
client
->
direction
=
gnutls_record_get_direction
(
client
->
session
);
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
)
<
0
)
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
)
<
0
)
qemudDispatchClientFailure
(
server
,
client
);
qemudDispatchClientFailure
(
server
,
client
);
if
(
ret
<
0
)
{
else
if
(
ret
<
0
)
{
if
(
ret
!=
GNUTLS_E_INTERRUPTED
&&
ret
!=
GNUTLS_E_AGAIN
)
{
if
(
ret
!=
GNUTLS_E_INTERRUPTED
&&
ret
!=
GNUTLS_E_AGAIN
)
{
qemudLog
(
QEMUD_ERR
,
"gnutls_record_send: %s"
,
qemudLog
(
QEMUD_ERR
,
"gnutls_record_send: %s"
,
gnutls_strerror
(
ret
));
gnutls_strerror
(
ret
));
...
@@ -1275,8 +1278,7 @@ static void qemudDispatchClientWrite(struct qemud_server *server, struct qemud_c
...
@@ -1275,8 +1278,7 @@ static void qemudDispatchClientWrite(struct qemud_server *server, struct qemud_c
/* Finished. Next step is to check the certificate. */
/* Finished. Next step is to check the certificate. */
if
(
remoteCheckAccess
(
client
)
==
-
1
)
if
(
remoteCheckAccess
(
client
)
==
-
1
)
qemudDispatchClientFailure
(
server
,
client
);
qemudDispatchClientFailure
(
server
,
client
);
else
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
))
if
(
qemudRegisterClientEvent
(
server
,
client
,
1
))
qemudDispatchClientFailure
(
server
,
client
);
qemudDispatchClientFailure
(
server
,
client
);
}
else
if
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
)
{
}
else
if
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
)
{
qemudLog
(
QEMUD_ERR
,
"TLS handshake failed: %s"
,
qemudLog
(
QEMUD_ERR
,
"TLS handshake failed: %s"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录