[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Make sure /var/log/lastlog is there so we don't have ugly logs.



Right now when you ssh in, you get errors in the log because sshd wants
to interact with /var/log/lastlog.  These errors will just confuse
people, so create /var/log/lastlog when we start sshd.
---
 anaconda |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/anaconda b/anaconda
index 21b4d4b..2f0ca53 100755
--- a/anaconda
+++ b/anaconda
@@ -430,6 +430,8 @@ def startSsh():
 
     childpid = os.fork()
     if not childpid:
+        os.mkdir("/var/log", 0755)
+        os.open("/var/log/lastlog", os.O_RDWR | os.O_CREAT, 0644)
         ssh_keys = {
             'rsa1':'ssh_host_key',
             'rsa':'ssh_host_rsa_key',
-- 
1.6.5.rc2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]