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

Change subject: packaging: yumpackger: do not attempt to use yum if running as 
non root
......................................................................

packaging: yumpackger: do not attempt to use yum if running as non root

Change-Id: Id0ebb08313795c2135f5b75f9024f1f2a60cbd91
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M ChangeLog
M src/plugins/otopi/packagers/yumpackager.py
2 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/96/13296/1

diff --git a/ChangeLog b/ChangeLog
index 3b2edb2..17dd195 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
 ????-??-?? - Version 1.0.1
 
+ * packagers: yum: do not enable if running non root.
+
 2013-02-14 - Version 1.0.0
 
 Alon Bar-Lev <[email protected]>
diff --git a/src/plugins/otopi/packagers/yumpackager.py 
b/src/plugins/otopi/packagers/yumpackager.py
index eb55296..07ad977 100644
--- a/src/plugins/otopi/packagers/yumpackager.py
+++ b/src/plugins/otopi/packagers/yumpackager.py
@@ -21,6 +21,7 @@
 """yum packager provider."""
 
 
+import os
 import gettext
 _ = lambda m: gettext.dgettext(message=m, domain='otopi')
 
@@ -81,8 +82,9 @@
 
             # the following will trigger the NOTIFY_REEXEC
             # and then reexecute
-            self._miniyum.selinux_role()
-            self._enabled = True
+            if os.geteuid() == 0:
+                self._miniyum.selinux_role()
+                self._enabled = True
         except ImportError:
             self.logger.debug('Cannot import miniyumlocal', exc_info=True)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id0ebb08313795c2135f5b75f9024f1f2a60cbd91
Gerrit-PatchSet: 1
Gerrit-Project: otopi
Gerrit-Branch: otopi-1.0
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to