1 Star 0 Fork 71

tzr/libvirt

forked from src-openEuler/libvirt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
qemu-Drop-unused-qemuSecuritySetSavedStateLabel.patch 2.60 KB
一键复制 编辑 原始数据 按行查看 历史
From 11481239cc36aa9076a1eb44b4dbaa2968c248cb Mon Sep 17 00:00:00 2001
From: Michal Privoznik <mprivozn@redhat.com>
Date: Wed, 17 Jun 2020 11:10:49 +0200
Subject: [PATCH 010/108] qemu: Drop unused qemuSecuritySetSavedStateLabel()
After previous commit this function is used no more.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
(cherry picked from commit 3cc557c7faeeaf503ca22dac8e9c7bb9c43740e0)
---
src/qemu/qemu_security.c | 31 -------------------------------
src/qemu/qemu_security.h | 4 ----
2 files changed, 35 deletions(-)
diff --git a/src/qemu/qemu_security.c b/src/qemu/qemu_security.c
index e7f38cb69b..5cfbcbd592 100644
--- a/src/qemu/qemu_security.c
+++ b/src/qemu/qemu_security.c
@@ -607,37 +607,6 @@ qemuSecurityDomainSetPathLabel(virQEMUDriverPtr driver,
}
-int
-qemuSecuritySetSavedStateLabel(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- const char *savefile)
-{
- qemuDomainObjPrivatePtr priv = vm->privateData;
- pid_t pid = -1;
- int ret = -1;
-
- if (qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT))
- pid = vm->pid;
-
- if (virSecurityManagerTransactionStart(driver->securityManager) < 0)
- goto cleanup;
-
- if (virSecurityManagerSetSavedStateLabel(driver->securityManager,
- vm->def,
- savefile) < 0)
- goto cleanup;
-
- if (virSecurityManagerTransactionCommit(driver->securityManager,
- pid, priv->rememberOwner) < 0)
- goto cleanup;
-
- ret = 0;
- cleanup:
- virSecurityManagerTransactionAbort(driver->securityManager);
- return ret;
-}
-
-
int
qemuSecurityRestoreSavedStateLabel(virQEMUDriverPtr driver,
virDomainObjPtr vm,
diff --git a/src/qemu/qemu_security.h b/src/qemu/qemu_security.h
index 89dca61c3a..738c6b2ab7 100644
--- a/src/qemu/qemu_security.h
+++ b/src/qemu/qemu_security.h
@@ -101,10 +101,6 @@ int qemuSecurityDomainSetPathLabel(virQEMUDriverPtr driver,
const char *path,
bool allowSubtree);
-int qemuSecuritySetSavedStateLabel(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- const char *savefile);
-
int qemuSecurityRestoreSavedStateLabel(virQEMUDriverPtr driver,
virDomainObjPtr vm,
const char *savefile);
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tom0392/libvirt.git
git@gitee.com:tom0392/libvirt.git
tom0392
libvirt
libvirt
master

搜索帮助