diff options
author | Bill Marquette <billm@pfsense.org> | 2008-05-17 20:08:34 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2008-05-17 20:08:34 +0000 |
commit | 90ebd0b36a1a9804f4869f5508c4bbf88f653b33 (patch) | |
tree | 728f6466a0f6a28465f678ae90cca46f475e6042 | |
parent | a2086c54dfedf480300b6e797479c775bbeaae84 (diff) | |
download | pfsense-90ebd0b36a1a9804f4869f5508c4bbf88f653b33.zip pfsense-90ebd0b36a1a9804f4869f5508c4bbf88f653b33.tar.gz |
Ticket #1697 - rm authorized key file if keys don't exist in config.xml
MFC: for 1.2.1
-rwxr-xr-x | etc/sshd | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -117,6 +117,10 @@ fwrite($fd, $authorizedkeys); pclose($fd); chmod("/root/.ssh/authorized_keys",0644); + } else { + if(file_exists("/root/.ssh/authorized_keys")) { + unlink("/root/.ssh/authorized_keys"); + } } /* mop up from a badly implemented ssh keys -> cf backup */ @@ -274,4 +278,4 @@ system("/usr/sbin/sshd"); echo "done.\n"; -?>
\ No newline at end of file +?> |