Alon Bar-Lev has uploaded a new change for review.

Change subject: miniyum: we only need system_r
......................................................................

miniyum: we only need system_r

rpm_t type is added automatically by the rpm_execcon(),
question is why the system_r is not added...
the rpm_t conflict with other tasks install should do
such as interactive with dbus.

[sync miniyum with otopi]

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=904153
Change-Id: I2c9d6e3a9f1f65f403f309bf3b0e0ce2431c8b21
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M packaging/fedora/setup/miniyum.py
1 file changed, 4 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/12590/1

diff --git a/packaging/fedora/setup/miniyum.py 
b/packaging/fedora/setup/miniyum.py
index b86715b..ba7aa06 100755
--- a/packaging/fedora/setup/miniyum.py
+++ b/packaging/fedora/setup/miniyum.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 #
 # otopi -- plugable installer
-# Copyright (C) 2012 Red Hat, Inc.
+# Copyright (C) 2012-2013 Red Hat, Inc.
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -557,18 +557,10 @@
             ctx1 = selinux.context_new(ctx)
             if not ctx1:
                 raise Exception(_('Cannot create selinux context'))
-            if selinux.context_type_get(ctx1) != 'rpm_t':
-                if selinux.context_type_set(ctx1, 'rpm_t') != 0:
-                    raise Exception(
-                        _('Cannot set type within selinux context')
-                    )
+            if selinux.context_role_get(ctx1) != 'system_r':
                 if selinux.context_role_set(ctx1, 'system_r') != 0:
                     raise Exception(
                         _('Cannot set role within selinux context')
-                    )
-                if selinux.context_user_set(ctx1, 'unconfined_u') != 0:
-                    raise Exception(
-                        _('Cannot set user within selinux context')
                     )
                 if selinux.setexeccon(selinux.context_str(ctx1)) != 0:
                     raise Exception(
@@ -955,7 +947,8 @@
         with miniyum.transaction():
             miniyum.remove(('cman',), ignoreErrors=True)
             miniyum.install(('qemu-kvm-tools',))
-            miniyum.installUpdate(('vdsm', 'vdsm-cli'))
+            miniyum.install(('vdsm', 'vdsm-cli'))
+            miniyum.update(('vdsm', 'vdsm-cli'))
             if miniyum.buildTransaction():
                 miniyumsink.info('Transaction Summary:')
                 for p in miniyum.queryTransaction():


--
To view, visit http://gerrit.ovirt.org/12590
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c9d6e3a9f1f65f403f309bf3b0e0ce2431c8b21
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to