diff options
| author | Brian Elliott <brian.elliott@rackspace.com> | 2012-10-26 10:17:35 +0000 |
|---|---|---|
| committer | Brian Elliott <brian.elliott@rackspace.com> | 2012-10-26 10:58:11 +0000 |
| commit | c520403cbdb29574fa94b2436d2f0b59a167bbee (patch) | |
| tree | 338c86e7b8ee4b0faa880a7ab6d6d6d5a63a4500 | |
| parent | f5b53d743c685a171fc57daa0f3d1fd11a03ce75 (diff) | |
| download | nova-c520403cbdb29574fa94b2436d2f0b59a167bbee.tar.gz nova-c520403cbdb29574fa94b2436d2f0b59a167bbee.tar.xz nova-c520403cbdb29574fa94b2436d2f0b59a167bbee.zip | |
Make nova-rootwrap optional
Make the use of nova-rootwrap optional if the current process's
effective user id is already root.
Change-Id: I2cf5c743c6f4d6f235a54ca70c11d8191deeed6a
| -rw-r--r-- | nova/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py index 01df19b27..26637a489 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -160,7 +160,7 @@ def execute(*cmd, **kwargs): raise exception.NovaException(_('Got unknown keyword args ' 'to utils.execute: %r') % kwargs) - if run_as_root: + if run_as_root and os.geteuid() != 0: cmd = ['sudo', 'nova-rootwrap', FLAGS.rootwrap_config] + list(cmd) cmd = map(str, cmd) |
