diff options
author | Darren Tucker <dtucker@zip.com.au> | 2006-03-04 08:50:31 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2006-03-04 08:50:31 +1100 |
commit | 18614c254d83466ab706ffd0d4f58a8a018dcddf (patch) | |
tree | a10658d13b726620f2d2f615eb84466a4492ca51 | |
parent | 54b75fe742c43aeaca7277a4c310eba43d057e4d (diff) |
- (dtucker) [contrib/cygwin/ssh-host-config] Require use of lastlog as a
file rather than directory, required as Cygwin will be importing lastlog(1).
Also tightens up permissions on the file. Patch from vinschen@redhat.com.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | contrib/cygwin/ssh-host-config | 40 |
2 files changed, 31 insertions, 16 deletions
@@ -1,3 +1,8 @@ | |||
1 | 20060304 | ||
2 | - (dtucker) [contrib/cygwin/ssh-host-config] Require use of lastlog as a | ||
3 | file rather than directory, required as Cygwin will be importing lastlog(1). | ||
4 | Also tightens up permissions on the file. Patch from vinschen@redhat.com. | ||
5 | |||
1 | 20060226 | 6 | 20060226 |
2 | - (dtucker) [configure.ac] Bug #1156: QNX apparently needs SSHD_ACQUIRES_CTTY | 7 | - (dtucker) [configure.ac] Bug #1156: QNX apparently needs SSHD_ACQUIRES_CTTY |
3 | patch from kraai at ftbfs.org. | 8 | patch from kraai at ftbfs.org. |
@@ -3885,4 +3890,4 @@ | |||
3885 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 3890 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
3886 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 3891 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
3887 | 3892 | ||
3888 | $Id: ChangeLog,v 1.4135 2006/02/26 01:31:48 dtucker Exp $ | 3893 | $Id: ChangeLog,v 1.4136 2006/03/03 21:50:31 dtucker Exp $ |
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config index 0540890e6..09cc3fcf0 100644 --- a/contrib/cygwin/ssh-host-config +++ b/contrib/cygwin/ssh-host-config | |||
@@ -153,22 +153,31 @@ fi | |||
153 | 153 | ||
154 | # Create /var/log and /var/log/lastlog if not already existing | 154 | # Create /var/log and /var/log/lastlog if not already existing |
155 | 155 | ||
156 | if [ -f ${LOCALSTATEDIR}/log ] | 156 | if [ -e ${LOCALSTATEDIR}/log -a ! -d ${LOCALSTATEDIR}/log ] |
157 | then | 157 | then |
158 | echo "Creating ${LOCALSTATEDIR}/log failed!" | 158 | echo |
159 | else | 159 | echo "${LOCALSTATEDIR}/log is existant but not a directory." |
160 | if [ ! -d ${LOCALSTATEDIR}/log ] | 160 | echo "Cannot create ssh host configuration." |
161 | then | 161 | echo |
162 | mkdir -p ${LOCALSTATEDIR}/log | 162 | exit 1 |
163 | fi | 163 | fi |
164 | if [ -d ${LOCALSTATEDIR}/log/lastlog ] | 164 | if [ ! -e ${LOCALSTATEDIR}/log ] |
165 | then | 165 | then |
166 | chmod 777 ${LOCALSTATEDIR}/log/lastlog | 166 | mkdir -p ${LOCALSTATEDIR}/log |
167 | elif [ ! -f ${LOCALSTATEDIR}/log/lastlog ] | 167 | fi |
168 | then | 168 | |
169 | cat /dev/null > ${LOCALSTATEDIR}/log/lastlog | 169 | if [ -e ${LOCALSTATEDIR}/log/lastlog -a ! -f ${LOCALSTATEDIR}/log/lastlog ] |
170 | chmod 666 ${LOCALSTATEDIR}/log/lastlog | 170 | then |
171 | fi | 171 | echo |
172 | echo "${LOCALSTATEDIR}/log/lastlog exists, but is not a file." | ||
173 | echo "Cannot create ssh host configuration." | ||
174 | echo | ||
175 | exit 1 | ||
176 | fi | ||
177 | if [ ! -e ${LOCALSTATEDIR}/log/lastlog ] | ||
178 | then | ||
179 | cat /dev/null > ${LOCALSTATEDIR}/log/lastlog | ||
180 | chmod 644 ${LOCALSTATEDIR}/log/lastlog | ||
172 | fi | 181 | fi |
173 | 182 | ||
174 | # Create /var/empty file used as chroot jail for privilege separation | 183 | # Create /var/empty file used as chroot jail for privilege separation |
@@ -578,6 +587,7 @@ then | |||
578 | fi | 587 | fi |
579 | chown "${_user}" ${SYSCONFDIR}/ssh* | 588 | chown "${_user}" ${SYSCONFDIR}/ssh* |
580 | chown "${_user}".544 ${LOCALSTATEDIR}/empty | 589 | chown "${_user}".544 ${LOCALSTATEDIR}/empty |
590 | chown "${_user}".544 ${LOCALSTATEDIR}/log/lastlog | ||
581 | if [ -f ${LOCALSTATEDIR}/log/sshd.log ] | 591 | if [ -f ${LOCALSTATEDIR}/log/sshd.log ] |
582 | then | 592 | then |
583 | chown "${_user}".544 ${LOCALSTATEDIR}/log/sshd.log | 593 | chown "${_user}".544 ${LOCALSTATEDIR}/log/sshd.log |