From 7b98b7dc007f4de8421d4102d94d54f3dc748dfe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 8 Sep 2022 09:51:21 -0400 Subject: [PATCH] Fix wrong uid after duplicate identity check --- confluent_server/confluent/sshutil.py | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_server/confluent/sshutil.py b/confluent_server/confluent/sshutil.py index 670a2ac6..0a52fe81 100644 --- a/confluent_server/confluent/sshutil.py +++ b/confluent_server/confluent/sshutil.py @@ -82,6 +82,7 @@ def initialize_ca(): if os.path.exists('/etc/confluent/ssh/ca.pub'): cafilename = '/var/lib/confluent/public/site/ssh/{0}.ca'.format(myname) shutil.copy('/etc/confluent/ssh/ca.pub', cafilename) + os.seteuid(ouid) raise AlreadyExists() try: os.makedirs('/etc/confluent/ssh', mode=0o700)