mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-02-27 19:31:11 +00:00
- (djm) Automatically generate host key during "make install". Suggested
by Gary E. Miller <gem@rellim.com> - (djm) Paranoia before kill() system call
This commit is contained in:
parent
2f02295d31
commit
099f505f95
@ -1,3 +1,8 @@
|
|||||||
|
20000622
|
||||||
|
- (djm) Automatically generate host key during "make install". Suggested
|
||||||
|
by Gary E. Miller <gem@rellim.com>
|
||||||
|
- (djm) Paranoia before kill() system call
|
||||||
|
|
||||||
20000620
|
20000620
|
||||||
- (djm) Replace use of '-o' and '-a' logical operators in configure tests
|
- (djm) Replace use of '-o' and '-a' logical operators in configure tests
|
||||||
with '||' and '&&'. As suggested by Jim Knoble <jmknoble@pint-stowp.cx>
|
with '||' and '&&'. As suggested by Jim Knoble <jmknoble@pint-stowp.cx>
|
||||||
|
17
Makefile.in
17
Makefile.in
@ -112,7 +112,9 @@ catman-do:
|
|||||||
>$${f%%.[18]}.0 ; \
|
>$${f%%.[18]}.0 ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install: manpages $(TARGETS)
|
install: manpages $(TARGETS) install-files host-key
|
||||||
|
|
||||||
|
install-files:
|
||||||
./mkinstalldirs $(DESTDIR)$(bindir)
|
./mkinstalldirs $(DESTDIR)$(bindir)
|
||||||
./mkinstalldirs $(DESTDIR)$(sbindir)
|
./mkinstalldirs $(DESTDIR)$(sbindir)
|
||||||
./mkinstalldirs $(DESTDIR)$(mandir)
|
./mkinstalldirs $(DESTDIR)$(mandir)
|
||||||
@ -134,7 +136,6 @@ install: manpages $(TARGETS)
|
|||||||
ln -s ssh $(DESTDIR)$(bindir)/slogin
|
ln -s ssh $(DESTDIR)$(bindir)/slogin
|
||||||
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||||
ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
|
||||||
|
|
||||||
if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config -a ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
|
if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config -a ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
|
||||||
./mkinstalldirs $(DESTDIR)$(sysconfdir); \
|
./mkinstalldirs $(DESTDIR)$(sysconfdir); \
|
||||||
$(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
|
$(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
|
||||||
@ -146,6 +147,18 @@ install: manpages $(TARGETS)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
host-key: ssh-keygen
|
host-key: ssh-keygen
|
||||||
|
if [ -f "$(sysconfdir)/ssh_host_key" ] ; then \
|
||||||
|
echo "$(sysconfdir)/ssh_host_key already exists, skipping." ; \
|
||||||
|
else \
|
||||||
|
./ssh-keygen -b 1024 -f $(sysconfdir)/ssh_host_key -N "" ; \
|
||||||
|
fi ; \
|
||||||
|
if [ -f $(sysconfdir)/ssh_host_dsa_key ] ; then \
|
||||||
|
echo "$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
|
||||||
|
else \
|
||||||
|
./ssh-keygen -d -f $(sysconfdir)/ssh_host_dsa_key -N "" ; \
|
||||||
|
fi ;
|
||||||
|
|
||||||
|
host-key-force: ssh-keygen
|
||||||
./ssh-keygen -b 1024 -f $(sysconfdir)/ssh_host_key -N ""
|
./ssh-keygen -b 1024 -f $(sysconfdir)/ssh_host_key -N ""
|
||||||
./ssh-keygen -d -f $(sysconfdir)/ssh_host_dsa_key -N ""
|
./ssh-keygen -d -f $(sysconfdir)/ssh_host_dsa_key -N ""
|
||||||
|
|
||||||
|
@ -1608,7 +1608,9 @@ session_close_by_channel(int id, void *arg)
|
|||||||
session_close(s);
|
session_close(s);
|
||||||
} else {
|
} else {
|
||||||
/* notify child, delay session cleanup */
|
/* notify child, delay session cleanup */
|
||||||
if (kill(s->pid, (s->ttyfd == -1) ? SIGTERM : SIGHUP) < 0)
|
if (s->pid <= 1)
|
||||||
|
error("session_close_by_channel: Unsafe s->pid = %d", s->pid);
|
||||||
|
else if (kill(s->pid, (s->ttyfd == -1) ? SIGTERM : SIGHUP) < 0)
|
||||||
error("session_close_by_channel: kill %d: %s",
|
error("session_close_by_channel: kill %d: %s",
|
||||||
s->pid, strerror(errno));
|
s->pid, strerror(errno));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user