[PATCH v2 07/10] security: rename 2 functions in DAC and SELinux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virSecurity{DAC,SELinux}SetImageLabelInt will be added in the next
patch, so rename virSecurity{DAC,SELinux}SetImageLabelInternal to
virSecurity{DAC,SELinux}SetImageLabelSingle to avoid confusion and keep
consistent with virSecurity{DAC,SELinux}RestoreImageLabelInt and
virSecurity{DAC,SELinux}RestoreImageLabelSingle.

Signed-off-by: Peng Liang <liangpeng10@xxxxxxxxxx>
---
 src/security/security_dac.c     | 12 ++++++------
 src/security/security_selinux.c | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index d1e1552bb683..2c0e12a6f810 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -863,11 +863,11 @@ virSecurityDACRestoreFileLabel(virSecurityManager *mgr,
 
 
 static int
-virSecurityDACSetImageLabelInternal(virSecurityManager *mgr,
-                                    virDomainDef *def,
-                                    virStorageSource *src,
-                                    virStorageSource *parent,
-                                    bool isChainTop)
+virSecurityDACSetImageLabelSingle(virSecurityManager *mgr,
+                                  virDomainDef *def,
+                                  virStorageSource *src,
+                                  virStorageSource *parent,
+                                  bool isChainTop)
 {
     virSecurityLabelDef *secdef;
     virSecurityDeviceLabelDef *disk_seclabel;
@@ -949,7 +949,7 @@ virSecurityDACSetImageLabelRelative(virSecurityManager *mgr,
     for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
         const bool isChainTop = flags & VIR_SECURITY_DOMAIN_IMAGE_PARENT_CHAIN_TOP;
 
-        if (virSecurityDACSetImageLabelInternal(mgr, def, n, parent, isChainTop) < 0)
+        if (virSecurityDACSetImageLabelSingle(mgr, def, n, parent, isChainTop) < 0)
             return -1;
 
         if (!(flags & VIR_SECURITY_DOMAIN_IMAGE_LABEL_BACKING_CHAIN))
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 5c491fc131ea..f6fa412de89a 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -1805,11 +1805,11 @@ virSecuritySELinuxRestoreImageLabel(virSecurityManager *mgr,
 
 
 static int
-virSecuritySELinuxSetImageLabelInternal(virSecurityManager *mgr,
-                                        virDomainDef *def,
-                                        virStorageSource *src,
-                                        virStorageSource *parent,
-                                        bool isChainTop)
+virSecuritySELinuxSetImageLabelSingle(virSecurityManager *mgr,
+                                      virDomainDef *def,
+                                      virStorageSource *src,
+                                      virStorageSource *parent,
+                                      bool isChainTop)
 {
     virSecuritySELinuxData *data = virSecurityManagerGetPrivateData(mgr);
     virSecurityLabelDef *secdef;
@@ -1912,7 +1912,7 @@ virSecuritySELinuxSetImageLabelRelative(virSecurityManager *mgr,
     for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
         const bool isChainTop = flags & VIR_SECURITY_DOMAIN_IMAGE_PARENT_CHAIN_TOP;
 
-        if (virSecuritySELinuxSetImageLabelInternal(mgr, def, n, parent, isChainTop) < 0)
+        if (virSecuritySELinuxSetImageLabelSingle(mgr, def, n, parent, isChainTop) < 0)
             return -1;
 
         if (!(flags & VIR_SECURITY_DOMAIN_IMAGE_LABEL_BACKING_CHAIN))
-- 
2.31.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux