mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Don't leak passwords through kdb5_ldap_util command line arguments.
ticket 1948
This commit is contained in:
parent
f2fb6552c9
commit
0d823ddc4e
@ -295,11 +295,17 @@ class KrbInstance(service.Service):
|
|||||||
|
|
||||||
def __init_ipa_kdb(self):
|
def __init_ipa_kdb(self):
|
||||||
#populate the directory with the realm structure
|
#populate the directory with the realm structure
|
||||||
args = ["kdb5_util", "create", "-s", "-P", self.master_password,
|
args = ["kdb5_util", "create", "-s",
|
||||||
"-r", self.realm,
|
"-r", self.realm,
|
||||||
"-x", "ipa-setup-override-restrictions"]
|
"-x", "ipa-setup-override-restrictions"]
|
||||||
|
dialogue = (
|
||||||
|
# Enter KDC database master key:
|
||||||
|
self.master_password + '\n',
|
||||||
|
# Re-enter KDC database master key to verify:
|
||||||
|
self.master_password + '\n',
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
ipautil.run(args, nolog=(self.master_password))
|
ipautil.run(args, nolog=(self.master_password), stdin=''.join(dialogue))
|
||||||
except ipautil.CalledProcessError, e:
|
except ipautil.CalledProcessError, e:
|
||||||
print "Failed to initialize the realm container"
|
print "Failed to initialize the realm container"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user