summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-26 22:29:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-26 22:29:52 +0000
commita5c238cd76430a317d5f627d2c59ca9a6d0c2867 (patch)
treec4cd94642cc7bbd07716df2d99d8c56ebf261200
parent7624221d731444b77bd3f827c209177fd34b2e48 (diff)
distribution target
-rw-r--r--usr.bin/ssh/Makefile14
-rw-r--r--usr.bin/ssh/Makefile.inc4
-rw-r--r--usr.bin/ssh/ssh/Makefile96
-rw-r--r--usr.bin/ssh/ssh_config (renamed from usr.bin/ssh/host_config.sample)0
-rw-r--r--usr.bin/ssh/sshd_config (renamed from usr.bin/ssh/server_config.sample)0
5 files changed, 15 insertions, 99 deletions
diff --git a/usr.bin/ssh/Makefile b/usr.bin/ssh/Makefile
index 291be696b9f..84ae1c06796 100644
--- a/usr.bin/ssh/Makefile
+++ b/usr.bin/ssh/Makefile
@@ -1,7 +1,19 @@
-# $OpenBSD: Makefile,v 1.2 1999/09/26 21:47:52 deraadt Exp $
+# $OpenBSD: Makefile,v 1.3 1999/09/26 22:29:50 deraadt Exp $
.include <bsd.own.mk>
SUBDIR= ssh sshd ssh-add ssh-keygen ssh-agent scp
+generate-host-key:
+ -@if [ -f ${DESTDIR}/etc/ssh_host_key ]; then \
+ echo "Host key exists in ${DESTDIR}/etc/ssh_host_key."; \
+ else \
+ umask 022; echo "Generating 1024 bit host key."; \
+ ssh-keygen -b 1024 -f ${DESTDIR}/etc/ssh_host_key -N ''; \
+ fi
+
+distribution:
+ install -C -o root -g wheel -m 0644 ${.CURDIR}/etc/ssh_config /etc
+ install -C -o root -g wheel -m 0644 ${.CURDIR}/etc/sshd_config /etc
+
.include <bsd.subdir.mk>
diff --git a/usr.bin/ssh/Makefile.inc b/usr.bin/ssh/Makefile.inc
index 7cd77c4911d..edbb0c94f6b 100644
--- a/usr.bin/ssh/Makefile.inc
+++ b/usr.bin/ssh/Makefile.inc
@@ -1,7 +1,3 @@
-HOST_KEY_FILE = $(etcdir)/ssh_host_key
-HOST_CONFIG_FILE = $(etcdir)/ssh_config
-SERVER_CONFIG_FILE = $(etcdir)/sshd_config
-
CFLAGS= -I${.OBJDIR} -I${.CURDIR}/..
USER_SHELLS = sh jsh ksh csh tcsh bash zsh ash
diff --git a/usr.bin/ssh/ssh/Makefile b/usr.bin/ssh/ssh/Makefile
index b2ac2af8c05..341527c1507 100644
--- a/usr.bin/ssh/ssh/Makefile
+++ b/usr.bin/ssh/ssh/Makefile
@@ -6,6 +6,8 @@ BINMODE=4555
BINDIR= /usr/bin
LDADD= -lkrb -lcrypto -ldes -lgmp -lutil -lz
MAN= ssh.1
+LINKS= ${BINDIR}/ssh ${BINDIR}/slogin
+MLINKS= ssh.1 slogin.1
SRCS= ssh.c sshconnect.c log-client.c readconf.c hostfile.c readpass.c \
tildexpand.c uidswap.c clientloop.c canohost.c rsa.c randoms.c \
@@ -18,98 +20,4 @@ minfd.o: minfd.h
minfd.h: gen_minfd
./gen_minfd $(USER_SHELLS) > minfd.h
-########################
-
-# Creates /etc/ssh_host_key
-generate-host-key:
- -@if test -f $(install_prefix)$(HOST_KEY_FILE); \
- then echo "You already have a host key in $(install_prefix)$(HOST_KEY_FILE)."; \
- else \
- umask 022; echo "Generating 1024 bit host key."; \
- ./ssh-keygen -b 1024 -f $(install_prefix)$(HOST_KEY_FILE) -N ''; \
- fi
-
-# Ssh is much to large and hairy to be installed suid root by
-# default. Disabled for now/bg. If you really need rhosts
-# authentication do a manual chmod u+s $(install_prefix)$(bindir)/ssh.
-#
-# Ssh is preferably installed suid root. It can also be used non-root,
-# but then it cannot connect from a privileged socket, and rhosts
-# authentication will be disabled.
-#
-# Sshd is not suid root, but should preferably be run as root
-# (otherwise it can only log in as the user it runs as, and must be
-# bound to a non-privileged port). Also, password authentication may
-# not be available if non-root and using shadow passwords.
-fuck-install: $(PROGRAMS) make-dirs generate-host-key
- $(INSTALL_PROGRAM) -o root -m 0755 ssh $(install_prefix)$(bindir)/ssh
- -if test "`echo ssh | sed '$(transform)'`" '!=' ssh; then \
- rm -f $(install_prefix)$(bindir)/`echo ssh | sed '$(transform)'`; \
- $(LN_S) ssh \
- $(install_prefix)$(bindir)/`echo ssh | sed '$(transform)'`; fi
- rm -f $(install_prefix)$(bindir)/slogin
- $(LN_S) ssh $(install_prefix)$(bindir)/slogin
- -if test "`echo slogin | sed '$(transform)'`" '!=' slogin; then \
- rm -f $(install_prefix)$(bindir)/`echo slogin | sed '$(transform)'`;\
- $(LN_S) ssh \
- $(install_prefix)$(bindir)/`echo slogin | sed '$(transform)'`; fi
- -for p in $(NORMAL_PROGRAMS); do \
- $(INSTALL_PROGRAM) -m 0755 $$p $(install_prefix)$(bindir)/$$p; \
- if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
- rm -f $(install_prefix)$(bindir)/`echo $$p | sed '$(transform)'`; \
- $(LN_S) $$p \
- $(install_prefix)$(bindir)/`echo $$p | sed '$(transform)'`; fi; \
- done
-# Remove $(etcdir)/sshd_pid as it is now $(bindir)/sshd.pid
- -rm -f $(install_prefix)$(etcdir)/sshd_pid
-# Remove $(bindir)/sshd to avoid confusion since it is now in $(sbindir)
- -rm -f $(install_prefix)$(bindir)/sshd
- -rm -f $(install_prefix)$(bindir)/`echo sshd | sed '$(transform)'`
- -for p in $(SBIN_PROGRAMS); do \
- $(INSTALL_PROGRAM) -m 0755 $$p $(install_prefix)$(sbindir)/$$p; \
- if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
- rm -f $(install_prefix)$(sbindir)/`echo $$p | sed '$(transform)'`;\
- $(LN_S) $$p \
- $(install_prefix)$(sbindir)/`echo $$p | sed '$(transform)'`; fi;\
- done
- -for p in $(MAN1PAGES); do \
- $(INSTALL_DATA) -m 0644 $(srcdir)/$$p $(install_prefix)$(man1dir)/$$p ; \
- if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
- rm -f $(install_prefix)$(man1dir)/`echo $$p | sed '$(transform)'`;\
- $(LN_S) $$p \
- $(install_prefix)$(man1dir)/`echo $$p | sed '$(transform)'`; \
- fi; \
- done
- rm -f $(install_prefix)$(man1dir)/slogin.1
- $(LN_S) ssh.1 $(install_prefix)$(man1dir)/slogin.1
- if test "`echo slogin.1 | sed '$(transform)'`" '!=' slogin.1; then \
- rm -f $(install_prefix)$(man1dir)/`echo slogin.1 | sed '$(transform)'`;\
- $(LN_S) ssh.1 \
- $(install_prefix)$(man1dir)/`echo slogin.1 | sed '$(transform)'`; \
- fi
- -for p in $(MAN1GENERATED); do \
- $(INSTALL_DATA) -m 0644 $$p $(install_prefix)$(man1dir)/$$p ; \
- if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
- rm -f $(install_prefix)$(man1dir)/`echo $$p | sed '$(transform)'`;\
- $(LN_S) $$p \
- $(install_prefix)$(man1dir)/`echo $$p | sed '$(transform)'`; \
- fi; \
- done
- -for p in $(MAN8GENERATED); do \
- $(INSTALL_DATA) -m 0644 $$p $(install_prefix)$(man8dir)/$$p; \
- if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
- rm -f $(install_prefix)$(man8dir)/`echo $$p | sed '$(transform)'`;\
- $(LN_S) $$p \
- $(install_prefix)$(man8dir)/`echo $$p | sed '$(transform)'`; fi;\
- done
- -if test '!' -f $(install_prefix)$(HOST_CONFIG_FILE); then \
- $(INSTALL_DATA) -m 0644 $(srcdir)/host_config.sample \
- $(install_prefix)$(HOST_CONFIG_FILE); fi
- -if test '!' -f $(install_prefix)$(SERVER_CONFIG_FILE); then \
- cat $(srcdir)/server_config.sample | \
- sed "s#_ETCDIR_#$(etcdir)#g" >/tmp/ssh_inst.$$; \
- $(INSTALL_DATA) -m 0644 /tmp/ssh_inst.$$ \
- $(install_prefix)$(SERVER_CONFIG_FILE); \
- rm -f /tmp/ssh_inst.$$; fi
-
.include<bsd.prog.mk>
diff --git a/usr.bin/ssh/host_config.sample b/usr.bin/ssh/ssh_config
index 3d9d600de6f..3d9d600de6f 100644
--- a/usr.bin/ssh/host_config.sample
+++ b/usr.bin/ssh/ssh_config
diff --git a/usr.bin/ssh/server_config.sample b/usr.bin/ssh/sshd_config
index 54deaa6251a..54deaa6251a 100644
--- a/usr.bin/ssh/server_config.sample
+++ b/usr.bin/ssh/sshd_config