Change in ovirt-engine[master]: setup: test effective user id instead of 'root' user name

oschreib at redhat.com oschreib at redhat.com
Wed Jul 11 08:11:17 UTC 2012


Ofer Schreiber has submitted this change and it was merged.

Change subject: setup: test effective user id instead of 'root' user name
......................................................................


setup: test effective user id instead of 'root' user name

Root user or every other alias will have UID=0, better
test for UID and not user name.

In bash we have $UID, $EUID.

In POSIX sh we have $(id -u).

In Python, there is no need to convert uid to name in order
to test if we run under root.

Change-Id: Iad84de5277439b2a1aac7b5985954c1ad8ffca80
Signed-off-by: Alon Bar-Lev <alonbl at redhat.com>
---
M backend/manager/dbscripts/engine-db-install.sh
M packaging/fedora/setup/engine-cleanup.py
M packaging/fedora/setup/engine-upgrade.py
3 files changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Ofer Schreiber: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad84de5277439b2a1aac7b5985954c1ad8ffca80
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Alex Lourie <alourie at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Moran Goldboim <mgoldboi at redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschreib at redhat.com>



More information about the Engine-commits mailing list