mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
parent
2cbc6fd6a2
commit
e96d0776f8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user