summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-03-21 17:18:30 +0100
committerMartin Kosek <mkosek@redhat.com>2011-05-13 13:27:04 +0200
commite96d0776f8fd7703a4ca6794f6766fa8577db6f5 (patch)
treef4db3d5d0993abaf0a3a40dae86784fe2f4bdb87
parent2cbc6fd6a2c33b46f97658b613bfca9182a5b518 (diff)
downloadfreeipa-e96d0776f8fd7703a4ca6794f6766fa8577db6f5.tar.gz
freeipa-e96d0776f8fd7703a4ca6794f6766fa8577db6f5.tar.xz
freeipa-e96d0776f8fd7703a4ca6794f6766fa8577db6f5.zip
Running ipa-replica-manage as non-root cause errors
Logging errors are printed out when ipa-replica-manage is run as a non-root user. Log has been disabled in such case to prevent such messages. https://fedorahosted.org/freeipa/ticket/1046
-rwxr-xr-xinstall/tools/ipa-replica-manage9
1 files changed, 8 insertions, 1 deletions
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index 87c994aa5..1adf0cebb 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import sys
+import os
import getpass, ldap, re, krbV
import traceback, logging
@@ -415,7 +416,13 @@ def main():
# Just initialize the environment. This is so the installer can have
# access to the plugin environment
- api.bootstrap(in_server=True)
+ api_env = {}
+ api_env['in_server'] = True
+
+ if os.getegid() != 0:
+ api_env['log'] = None # turn off logging for non-root
+
+ api.bootstrap(**api_env)
api.finalize()
dirman_passwd = None