Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
53611889
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看板
提交
53611889
编写于
12月 17, 2008
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add missing checks for read-only connection flag (CVE-2008-5086)
上级
ed671f0e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
70 addition
and
0 deletion
+70
-0
ChangeLog
ChangeLog
+5
-0
src/libvirt.c
src/libvirt.c
+65
-0
未找到文件。
ChangeLog
浏览文件 @
53611889
Wed Dec 17 16:43:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/libvirt.c: Add missing checks for read-only connection
flag (CVE-2008-5086)
Wed Dec 17 17:07:39 CET 2008 Daniel Veillard <veillard@redhat.com>
* configure.in: detect syslog.h
...
...
src/libvirt.c
浏览文件 @
53611889
...
...
@@ -2299,6 +2299,16 @@ virDomainMigrate (virDomainPtr domain,
return
NULL
;
}
if
(
domain
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
domain
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
NULL
;
}
if
(
dconn
->
flags
&
VIR_CONNECT_RO
)
{
/* NB, delibrately report error against source object, not dest here */
virLibDomainError
(
domain
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
NULL
;
}
/* Check that migration is supported by both drivers. */
if
(
VIR_DRV_SUPPORTS_FEATURE
(
conn
->
driver
,
conn
,
VIR_DRV_FEATURE_MIGRATION_V1
)
&&
...
...
@@ -2426,6 +2436,11 @@ virDomainMigratePrepare (virConnectPtr dconn,
return
-
1
;
}
if
(
dconn
->
flags
&
VIR_CONNECT_RO
)
{
virLibConnError
(
dconn
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
-
1
;
}
if
(
dconn
->
driver
->
domainMigratePrepare
)
return
dconn
->
driver
->
domainMigratePrepare
(
dconn
,
cookie
,
cookielen
,
uri_in
,
uri_out
,
...
...
@@ -2457,6 +2472,11 @@ virDomainMigratePerform (virDomainPtr domain,
}
conn
=
domain
->
conn
;
if
(
domain
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
domain
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
-
1
;
}
if
(
conn
->
driver
->
domainMigratePerform
)
return
conn
->
driver
->
domainMigratePerform
(
domain
,
cookie
,
cookielen
,
uri
,
...
...
@@ -2485,6 +2505,11 @@ virDomainMigrateFinish (virConnectPtr dconn,
return
NULL
;
}
if
(
dconn
->
flags
&
VIR_CONNECT_RO
)
{
virLibConnError
(
dconn
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
NULL
;
}
if
(
dconn
->
driver
->
domainMigrateFinish
)
return
dconn
->
driver
->
domainMigrateFinish
(
dconn
,
dname
,
cookie
,
cookielen
,
...
...
@@ -2517,6 +2542,11 @@ virDomainMigratePrepare2 (virConnectPtr dconn,
return
-
1
;
}
if
(
dconn
->
flags
&
VIR_CONNECT_RO
)
{
virLibConnError
(
dconn
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
-
1
;
}
if
(
dconn
->
driver
->
domainMigratePrepare2
)
return
dconn
->
driver
->
domainMigratePrepare2
(
dconn
,
cookie
,
cookielen
,
uri_in
,
uri_out
,
...
...
@@ -2547,6 +2577,11 @@ virDomainMigrateFinish2 (virConnectPtr dconn,
return
NULL
;
}
if
(
dconn
->
flags
&
VIR_CONNECT_RO
)
{
virLibConnError
(
dconn
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
NULL
;
}
if
(
dconn
->
driver
->
domainMigrateFinish2
)
return
dconn
->
driver
->
domainMigrateFinish2
(
dconn
,
dname
,
cookie
,
cookielen
,
...
...
@@ -2905,6 +2940,11 @@ virDomainBlockPeek (virDomainPtr dom,
}
conn
=
dom
->
conn
;
if
(
dom
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
dom
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
(
-
1
);
}
if
(
!
path
)
{
virLibDomainError
(
dom
,
VIR_ERR_INVALID_ARG
,
_
(
"path is NULL"
));
...
...
@@ -2980,6 +3020,11 @@ virDomainMemoryPeek (virDomainPtr dom,
}
conn
=
dom
->
conn
;
if
(
dom
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
dom
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
(
-
1
);
}
/* Flags must be VIR_MEMORY_VIRTUAL at the moment.
*
* Note on access to physical memory: A VIR_MEMORY_PHYSICAL flag is
...
...
@@ -3247,6 +3292,11 @@ virDomainSetAutostart(virDomainPtr domain,
conn
=
domain
->
conn
;
if
(
domain
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
domain
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
(
-
1
);
}
if
(
conn
->
driver
->
domainSetAutostart
)
return
conn
->
driver
->
domainSetAutostart
(
domain
,
autostart
);
...
...
@@ -4197,6 +4247,11 @@ virNetworkSetAutostart(virNetworkPtr network,
return
(
-
1
);
}
if
(
network
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibNetworkError
(
network
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
(
-
1
);
}
conn
=
network
->
conn
;
if
(
conn
->
networkDriver
&&
conn
->
networkDriver
->
networkSetAutostart
)
...
...
@@ -4395,6 +4450,11 @@ virConnectFindStoragePoolSources(virConnectPtr conn,
return
NULL
;
}
if
(
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibConnError
(
conn
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
NULL
;
}
if
(
conn
->
storageDriver
&&
conn
->
storageDriver
->
findPoolSources
)
return
conn
->
storageDriver
->
findPoolSources
(
conn
,
type
,
srcSpec
,
flags
);
...
...
@@ -5068,6 +5128,11 @@ virStoragePoolSetAutostart(virStoragePoolPtr pool,
return
(
-
1
);
}
if
(
pool
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibStoragePoolError
(
pool
,
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
return
(
-
1
);
}
conn
=
pool
->
conn
;
if
(
conn
->
storageDriver
&&
conn
->
storageDriver
->
poolSetAutostart
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录