Fixes several style issues and removes "DEF" (what is it supposed to
mean anyway?) from debug messages.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/security/security_dac.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 7200a1a..dfdeffd 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -856,14 +856,13 @@ virSecurityDACSetChardevLabel(virSecurityManagerPtr mgr,
break;
case VIR_DOMAIN_CHR_TYPE_PIPE:
- if ((virAsprintf(&in, "%s.in", dev_source->data.file.path) <
0) ||
- (virAsprintf(&out, "%s.out", dev_source->data.file.path)
< 0))
+ if (virAsprintf(&in, "%s.in", dev_source->data.file.path) < 0
||
+ virAsprintf(&out, "%s.out", dev_source->data.file.path) <
0)
goto done;
if (virFileExists(in) && virFileExists(out)) {
- if ((virSecurityDACSetOwnership(priv, NULL, in, user, group) < 0) ||
- (virSecurityDACSetOwnership(priv, NULL, out, user, group) < 0)) {
+ if (virSecurityDACSetOwnership(priv, NULL, in, user, group) < 0 ||
+ virSecurityDACSetOwnership(priv, NULL, out, user, group) < 0)
goto done;
- }
} else if (virSecurityDACSetOwnership(priv, NULL,
dev_source->data.file.path,
user, group) < 0) {
@@ -927,14 +926,13 @@ virSecurityDACRestoreChardevLabel(virSecurityManagerPtr mgr,
break;
case VIR_DOMAIN_CHR_TYPE_PIPE:
- if ((virAsprintf(&out, "%s.out", dev_source->data.file.path)
< 0) ||
- (virAsprintf(&in, "%s.in", dev_source->data.file.path) <
0))
+ if (virAsprintf(&out, "%s.out", dev_source->data.file.path) <
0 ||
+ virAsprintf(&in, "%s.in", dev_source->data.file.path) <
0)
goto done;
if (virFileExists(in) && virFileExists(out)) {
- if ((virSecurityDACRestoreSecurityFileLabel(priv, out) < 0) ||
- (virSecurityDACRestoreSecurityFileLabel(priv, in) < 0)) {
+ if (virSecurityDACRestoreSecurityFileLabel(priv, out) < 0 ||
+ virSecurityDACRestoreSecurityFileLabel(priv, in) < 0)
goto done;
- }
} else if (virSecurityDACRestoreSecurityFileLabel(priv,
dev_source->data.file.path) < 0) {
goto done;
}
@@ -1213,7 +1211,7 @@ virSecurityDACSetProcessLabel(virSecurityManagerPtr mgr,
if (virSecurityDACGetIds(secdef, priv, &user, &group, &groups,
&ngroups) < 0)
return -1;
- VIR_DEBUG("Dropping privileges of DEF to %u:%u, %d supplemental groups",
+ VIR_DEBUG("Dropping privileges to %u:%u, %d supplemental groups",
(unsigned int) user, (unsigned int) group, ngroups);
if (virSetUIDGID(user, group, groups, ngroups) < 0)
@@ -1238,7 +1236,7 @@ virSecurityDACSetChildProcessLabel(virSecurityManagerPtr mgr,
if (virSecurityDACGetIds(secdef, priv, &user, &group, NULL, NULL))
return -1;
- VIR_DEBUG("Setting child to drop privileges of DEF to %u:%u",
+ VIR_DEBUG("Setting child to drop privileges to %u:%u",
(unsigned int) user, (unsigned int) group);
virCommandSetUID(cmd, user);
--
2.6.3