From 84988031a2aea2d254cba39ab8bd10457eac4d5f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 16 Apr 2020 09:49:30 -0400 Subject: [PATCH] Move sshutil to a more practical place This makes the keysigning function available to the server. --- {misc => confluent_server/confluent}/sshutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {misc => confluent_server/confluent}/sshutil.py (97%) diff --git a/misc/sshutil.py b/confluent_server/confluent/sshutil.py similarity index 97% rename from misc/sshutil.py rename to confluent_server/confluent/sshutil.py index bb626ad1..509eba3d 100644 --- a/misc/sshutil.py +++ b/confluent_server/confluent/sshutil.py @@ -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')