summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/auth.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 43edae1..381c2e5 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -420,7 +420,8 @@ function local_user_set(& $user) {
$keys = base64_decode($user['authorizedkeys']);
file_put_contents("{$user_home}/.ssh/authorized_keys", $keys);
chown("{$user_home}/.ssh/authorized_keys", $user_name);
- }
+ } else
+ unlink_if_exists("{$user_home}/.ssh/authorized_keys");
$un = $lock_account ? "" : "un";
exec("/usr/sbin/pw {$un}lock -q {$user_name}");
OpenPOWER on IntegriCloud