2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Move sshutil to a more practical place

This makes the keysigning function available to the server.
This commit is contained in:
Jarrod Johnson 2020-04-16 09:49:30 -04:00
parent 211b8ab7e8
commit 84988031a2

View File

@ -11,7 +11,7 @@ def normalize_uid():
curruid = os.getuid()
neededuid = os.stat('/etc/confluent').st_uid
if curruid != neededuid:
os.setuid(neededuid)
os.setuid(neededuid)
if os.getuid() != neededuid:
raise Exception('Need to run as root or owner of /etc/confluent')
@ -96,7 +96,7 @@ def initialize_root_key():
with open('/var/lib/confluent/ssh/authorized_keys', 'w') as ak:
for auth in authed:
ak.write(auth)
def ca_exists():
return os.path.exists('/etc/confluent/ssh/ca')