-class Worker:
- # these semaphores are acquired before creating/destroying an account
- _create_sem = threading.Semaphore(1)
- _destroy_sem = threading.Semaphore(1)
+ auth_keys = dot_ssh + '/authorized_keys'
+ tools.write_file(auth_keys, lambda f: f.write(new_keys))
+
+ os.chmod(dot_ssh, 0700)
+ os.chmod(auth_keys, 0600)
+
+ os.chown(dot_ssh, uid, gid)
+ os.chown(auth_keys, uid, gid)
+
+ logger.log('%s: installed ssh keys' % self.name)