From 19402a47cde972ed7ea2dfc95bc0e3d887500036 Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Sun, 4 Nov 2012 09:44:38 +0000 Subject: [PATCH] Ensure user owns their ssh key directory on creation Lost section from commit 8049777 --- library/user | 1 + 1 file changed, 1 insertion(+) diff --git a/library/user b/library/user index 06dc717780b..c699f8db136 100755 --- a/library/user +++ b/library/user @@ -430,6 +430,7 @@ class User(object): if not os.path.exists(ssh_dir): try: os.mkdir(ssh_dir, 0700) + os.chown(ssh_dir, info[2], info[3]) except OSError, e: return (1, '', 'Failed to create %s: %s' % (ssh_dir, str(e))) if os.path.exists(ssh_key_file):