summaryrefslogtreecommitdiff
path: root/contrib/caldera
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-01-04 22:54:50 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-01-04 22:54:50 +0000
commit91c2a985f9d00247ba2fda6aebbffaeac609f328 (patch)
tree3088f4d4c8e1c7d49cd61918d31444739749dda7 /contrib/caldera
parentf1aa21f18f381b3dbc9c619699baa62298364072 (diff)
20010105
- (bal) contrib/caldera/ provided by Tim Rice <tim@multitalents.net>
Diffstat (limited to 'contrib/caldera')
-rw-r--r--contrib/caldera/openssh.spec334
-rw-r--r--contrib/caldera/sshd.daemons6
-rwxr-xr-xcontrib/caldera/sshd.init99
-rw-r--r--contrib/caldera/sshd.pam8
4 files changed, 447 insertions, 0 deletions
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
new file mode 100644
index 000000000..3191c6744
--- /dev/null
+++ b/contrib/caldera/openssh.spec
@@ -0,0 +1,334 @@
1# Version of OpenSSH
2%define oversion 2.3.0p2
3
4# Version of ssh-askpass
5%define aversion 1.1.1
6
7# Do we want to disable building of x11-askpass? (1=yes 0=no)
8%define no_x11_askpass 0
9
10# Do we want to disable building of gnome-askpass? (1=yes 0=no)
11%define no_gnome_askpass 1
12
13# Do we want to include contributed programs? (1=yes 0=no)
14%define contrib_programs 1
15
16Summary: OpenSSH free Secure Shell (SSH) implementation
17Name: openssh
18Version: %{oversion}
19Release: 1
20Packager: Damien Miller <djm@mindrot.org>
21URL: http://www.openssh.com/
22Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{oversion}.tar.gz
23Source1: http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/x11-ssh-askpass-%{aversion}.tar.gz
24Copyright: BSD
25Group: Applications/Internet
26BuildRoot: /var/tmp/openssh-%{Version}-buildroot
27#BuildRoot: /tmp/openssh-%{Version}-buildroot
28Obsoletes: ssh
29PreReq: openssl >= 0.9.5a
30Requires: openssl >= 0.9.5a
31BuildPreReq: perl, openssl-devel, tcp_wrappers
32BuildPreReq: /bin/login, /usr/bin/rsh, /usr/include/security/pam_appl.h
33%if ! %{no_gnome_askpass}
34BuildPreReq: gnome-libs-devel
35%endif
36
37%package clients
38Summary: OpenSSH Secure Shell protocol clients
39Requires: openssh = %{Version}-%{release}
40Group: Applications/Internet
41Obsoletes: ssh-clients
42
43%package server
44Summary: OpenSSH Secure Shell protocol server (sshd)
45Group: System Environment/Daemons
46Obsoletes: ssh-server
47#PreReq: openssh chkconfig >= 0.9
48
49%package askpass
50Summary: OpenSSH X11 passphrase dialog
51Group: Applications/Internet
52Requires: openssh = %{Version}-%{release}
53Obsoletes: ssh-extras
54
55%package askpass-gnome
56Summary: OpenSSH GNOME passphrase dialog
57Group: Applications/Internet
58Requires: openssh = %{Version}-%{release}
59Obsoletes: ssh-extras
60
61%description
62Ssh (Secure Shell) a program for logging into a remote machine and for
63executing commands in a remote machine. It is intended to replace
64rlogin and rsh, and provide secure encrypted communications between
65two untrusted hosts over an insecure network. X11 connections and
66arbitrary TCP/IP ports can also be forwarded over the secure channel.
67
68OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
69up to date in terms of security and features, as well as removing all
70patented algorithms to separate libraries (OpenSSL).
71
72This package includes the core files necessary for both the OpenSSH
73client and server. To make this package useful, you should also
74install openssh-clients, openssh-server, or both.
75
76%description clients
77Ssh (Secure Shell) a program for logging into a remote machine and for
78executing commands in a remote machine. It is intended to replace
79rlogin and rsh, and provide secure encrypted communications between
80two untrusted hosts over an insecure network. X11 connections and
81arbitrary TCP/IP ports can also be forwarded over the secure channel.
82
83OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
84up to date in terms of security and features, as well as removing all
85patented algorithms to separate libraries (OpenSSL).
86
87This package includes the clients necessary to make encrypted connections
88to SSH servers.
89
90%description server
91Ssh (Secure Shell) a program for logging into a remote machine and for
92executing commands in a remote machine. It is intended to replace
93rlogin and rsh, and provide secure encrypted communications between
94two untrusted hosts over an insecure network. X11 connections and
95arbitrary TCP/IP ports can also be forwarded over the secure channel.
96
97OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
98up to date in terms of security and features, as well as removing all
99patented algorithms to separate libraries (OpenSSL).
100
101This package contains the secure shell daemon. The sshd is the server
102part of the secure shell protocol and allows ssh clients to connect to
103your host.
104
105%description askpass
106Ssh (Secure Shell) a program for logging into a remote machine and for
107executing commands in a remote machine. It is intended to replace
108rlogin and rsh, and provide secure encrypted communications between
109two untrusted hosts over an insecure network. X11 connections and
110arbitrary TCP/IP ports can also be forwarded over the secure channel.
111
112OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
113up to date in terms of security and features, as well as removing all
114patented algorithms to separate libraries (OpenSSL).
115
116This package contains Jim Knoble's <jmknoble@pobox.com> X11 passphrase
117dialog.
118
119%description askpass-gnome
120Ssh (Secure Shell) a program for logging into a remote machine and for
121executing commands in a remote machine. It is intended to replace
122rlogin and rsh, and provide secure encrypted communications between
123two untrusted hosts over an insecure network. X11 connections and
124arbitrary TCP/IP ports can also be forwarded over the secure channel.
125
126OpenSSH is OpenBSD's rework of the last free version of SSH, bringing it
127up to date in terms of security and features, as well as removing all
128patented algorithms to separate libraries (OpenSSL).
129
130This package contains the GNOME passphrase dialog.
131
132%prep
133
134%setup -a 1
135
136%build
137
138%define _sysconfdir /etc/ssh
139
140CFLAGS="$RPM_OPT_FLAGS" \
141 ./configure \
142 --prefix=/usr \
143 --sysconfdir=/etc/ssh \
144 --libexecdir=%{_libexecdir}/openssh \
145 --with-tcp-wrappers \
146 --with-ipv4-default \
147 --with-rsh=/usr/bin/rsh
148
149make
150
151%if ! %{no_x11_askpass}
152cd x11-ssh-askpass-%{aversion}
153xmkmf -a
154make
155cd ..
156%endif
157
158%if ! %{no_gnome_askpass}
159cd contrib
160gcc -O -g `gnome-config --cflags gnome gnomeui` \
161 gnome-ssh-askpass.c -o gnome-ssh-askpass \
162 `gnome-config --libs gnome gnomeui`
163cd ..
164%endif
165
166%install
167rm -rf $RPM_BUILD_ROOT
168make install DESTDIR=$RPM_BUILD_ROOT/
169
170# setup the environment we want
171perl -pi -e "s,PermitRootLogin yes,PermitRootLogin no,;" \
172 -e "s,X11Forwarding no,X11Forwarding yes,;" \
173 -e "s,CheckMail no,CheckMail yes,;" \
174 -e "s,^#Subsystem sftp,Subsystem sftp,;" \
175 $RPM_BUILD_ROOT/etc/ssh/sshd_config
176
177install -d $RPM_BUILD_ROOT/etc/pam.d/
178install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
179install -d $RPM_BUILD_ROOT/etc/sysconfig/daemons
180install -d $RPM_BUILD_ROOT%{_libexecdir}/openssh
181install -d $RPM_BUILD_ROOT/usr/local/bin
182install -d $RPM_BUILD_ROOT/usr/local/man/man1
183install -m644 contrib/caldera/sshd.pam $RPM_BUILD_ROOT/etc/pam.d/sshd
184install -m755 contrib/caldera/sshd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
185install -m755 contrib/caldera/sshd.daemons $RPM_BUILD_ROOT/etc/sysconfig/daemons/sshd
186perl -pi -e "s,\@OPENSSH_VERSION\@,%{Name}-%{Version},g" \
187 $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
188perl -pi -e "s,\@OPENSSH_VERSION\@,%{Name}-%{Version},g" \
189 $RPM_BUILD_ROOT/etc/sysconfig/daemons/sshd
190%if %{contrib_programs}
191install -m755 contrib/make-ssh-known-hosts.pl $RPM_BUILD_ROOT/usr/local/bin
192install -m644 contrib/make-ssh-known-hosts.1 $RPM_BUILD_ROOT/usr/local/man/man1
193install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT/usr/local/bin
194install -m644 contrib/ssh-copy-id.1 $RPM_BUILD_ROOT/usr/local/man/man1
195%endif
196
197%if ! %{no_x11_askpass}
198install -s x11-ssh-askpass-%{aversion}/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/x11-ssh-askpass
199ln -s /usr/libexec/openssh/x11-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/ssh-askpass
200install -d $RPM_BUILD_ROOT/usr/X11R6/man/man1
201install -c -m 0444 x11-ssh-askpass-%{aversion}/x11-ssh-askpass.man $RPM_BUILD_ROOT/usr/X11R6/man/man1/x11-ssh-askpass.1x
202ln -s /usr/X11R6/man/man1/x11-ssh-askpass.1x $RPM_BUILD_ROOT/usr/X11R6/man/man1/ssh-askpass.1x
203%endif
204
205%if ! %{no_gnome_askpass}
206install -s contrib/gnome-ssh-askpass $RPM_BUILD_ROOT/usr/libexec/openssh/gnome-ssh-askpass
207%endif
208
209%clean
210##rm -rf $RPM_BUILD_ROOT
211
212%post server
213if [ "$1" = 1 ]; then
214 echo "Creating SSH stop/start scripts in the rc directories..."
215# /sbin/chkconfig --add sshd
216 lisa --SysV-init install sshd S90 2:3:4:5 K05 0:1:6
217fi
218if test -r /var/run/sshd.pid
219then
220 echo "Restarting the running SSH daemon..."
221 /etc/rc.d/init.d/sshd restart >&2
222else
223 echo "Starting the SSH daemon..."
224 /etc/rc.d/init.d/sshd start >&2
225fi
226
227%preun server
228if [ "$1" = 0 ] ; then
229 echo "Stopping the SSH daemon..."
230 /etc/rc.d/init.d/sshd stop >&2
231 echo "Removing SSH stop/start scripts from the rc directories..."
232# /sbin/chkconfig --del sshd
233 lisa --SysV-init remove sshd $1
234fi
235
236%files
237%defattr(-,root,root)
238%doc ChangeLog OVERVIEW README* INSTALL
239%doc CREDITS LICENCE
240%attr(0755,root,root) %{_bindir}/ssh-keygen
241%attr(0755,root,root) %{_bindir}/scp
242%attr(0755,root,root) %{_bindir}/ssh-keyscan
243%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
244%attr(0644,root,root) %{_mandir}/man1/ssh-keyscan.1*
245%attr(0644,root,root) %{_mandir}/man1/scp.1*
246%attr(0755,root,root) %dir %{_sysconfdir}
247%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/primes
248%attr(0755,root,root) %dir %{_libexecdir}/openssh
249
250%files clients
251%defattr(-,root,root)
252%attr(4755,root,root) %{_bindir}/ssh
253%attr(0755,root,root) %{_bindir}/ssh-agent
254%attr(0755,root,root) %{_bindir}/ssh-add
255%attr(0644,root,root) %{_mandir}/man1/ssh.1*
256%attr(0644,root,root) %{_mandir}/man1/ssh-agent.1*
257%attr(0644,root,root) %{_mandir}/man1/ssh-add.1*
258%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/ssh_config
259%attr(-,root,root) %{_bindir}/slogin
260%attr(-,root,root) %{_mandir}/man1/slogin.1*
261%if %{contrib_programs}
262%attr(0755,root,root) /usr/local/bin/make-ssh-known-hosts.pl
263%attr(0644,root,root) /usr/local/man/man1/make-ssh-known-hosts.1
264%attr(0755,root,root) /usr/local/bin/ssh-copy-id
265%attr(0644,root,root) /usr/local/man/man1/ssh-copy-id.1
266%endif
267
268%files server
269%defattr(-,root,root)
270%attr(0751,root,root) %{_sbindir}/sshd
271%attr(0755,root,root) %{_libexecdir}/openssh/sftp-server
272%attr(0644,root,root) %{_mandir}/man8/sshd.8*
273%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
274%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sshd_config
275%attr(0600,root,root) %config(noreplace) /etc/pam.d/sshd
276%attr(0755,root,root) %config /etc/rc.d/init.d/sshd
277%attr(0755,root,root) %config /etc/sysconfig/daemons/sshd
278
279%if ! %{no_x11_askpass}
280%files askpass
281%defattr(-,root,root)
282%doc x11-ssh-askpass-%{aversion}/README
283%doc x11-ssh-askpass-%{aversion}/ChangeLog
284%doc x11-ssh-askpass-%{aversion}/SshAskpass*.ad
285%attr(0755,root,root) %{_libexecdir}/openssh/ssh-askpass
286%attr(0755,root,root) %{_libexecdir}/openssh/x11-ssh-askpass
287%attr(0644,root,root) /usr/X11R6/man/man1/x11-ssh-askpass.1x
288%attr(-,root,root) /usr/X11R6/man/man1/ssh-askpass.1x
289%endif
290
291%if ! %{no_gnome_askpass}
292%files askpass-gnome
293%defattr(-,root,root)
294%attr(0755,root,root) %{_libexecdir}/openssh/gnome-ssh-askpass
295%endif
296
297%changelog
298* Mon Oct 18 2000 Damien Miller <djm@mindrot.org>
299- Merge some of Nalin Dahyabhai <nalin@redhat.com> changes from the
300 Redhat 7.0 spec file
301* Tue Sep 05 2000 Damien Miller <djm@mindrot.org>
302- Use RPM configure macro
303* Tue Aug 08 2000 Damien Miller <djm@mindrot.org>
304- Some surgery to sshd.init (generate keys at runtime)
305- Cleanup of groups and removal of keygen calls
306* Wed Jul 12 2000 Damien Miller <djm@mindrot.org>
307- Make building of X11-askpass and gnome-askpass optional
308* Mon Jun 12 2000 Damien Miller <djm@mindrot.org>
309- Glob manpages to catch compressed files
310* Wed Mar 15 2000 Damien Miller <djm@ibs.com.au>
311- Updated for new location
312- Updated for new gnome-ssh-askpass build
313* Sun Dec 26 1999 Damien Miller <djm@mindrot.org>
314- Added Jim Knoble's <jmknoble@pobox.com> askpass
315* Mon Nov 15 1999 Damien Miller <djm@mindrot.org>
316- Split subpackages further based on patch from jim knoble <jmknoble@pobox.com>
317* Sat Nov 13 1999 Damien Miller <djm@mindrot.org>
318- Added 'Obsoletes' directives
319* Tue Nov 09 1999 Damien Miller <djm@ibs.com.au>
320- Use make install
321- Subpackages
322* Mon Nov 08 1999 Damien Miller <djm@ibs.com.au>
323- Added links for slogin
324- Fixed perms on manpages
325* Sat Oct 30 1999 Damien Miller <djm@ibs.com.au>
326- Renamed init script
327* Fri Oct 29 1999 Damien Miller <djm@ibs.com.au>
328- Back to old binary names
329* Thu Oct 28 1999 Damien Miller <djm@ibs.com.au>
330- Use autoconf
331- New binary names
332* Wed Oct 27 1999 Damien Miller <djm@ibs.com.au>
333- Initial RPMification, based on Jan "Yenya" Kasprzak's <kas@fi.muni.cz> spec.
334
diff --git a/contrib/caldera/sshd.daemons b/contrib/caldera/sshd.daemons
new file mode 100644
index 000000000..b75150408
--- /dev/null
+++ b/contrib/caldera/sshd.daemons
@@ -0,0 +1,6 @@
1IDENT=sshd
2SHORT="sshd"
3DESCRIPTIVE="@OPENSSH_VERSION@"
4DAEMON=/usr/sbin/sshd
5# DAEMON_ARGS="-p some_other_port"
6ONBOOT=yes
diff --git a/contrib/caldera/sshd.init b/contrib/caldera/sshd.init
new file mode 100755
index 000000000..17643391b
--- /dev/null
+++ b/contrib/caldera/sshd.init
@@ -0,0 +1,99 @@
1#! /bin/sh
2#
3# Generic network daemon RC script. If installed as /etc/rc.d/init.d/foobar,
4# it source /etc/sysconfig/daemons/foobar and looks at the
5# variable definitions (Bourne shell syntax). Variables marked with an
6# asterisk are required.
7#
8# * IDENT=sshd
9# DESCRIPTIVE="@OPENSSH_VERSION@"
10# * DAEMON=/usr/sbin/sshd
11# DAEMON_ARGS="-p some_other_port"
12# ONBOOT=yes
13#
14
15# Source networking configuration.
16. /etc/sysconfig/network
17
18# Check that networking is up.
19[ ${NETWORKING} = "no" ] && exit 0
20
21# Source function library, check sysconfig/daemon file and source it.
22. /etc/rc.d/init.d/functions
23
24[ -x $DAEMON ] || exit 0
25
26# Some functions to make the below more readable
27KEYGEN=/usr/bin/ssh-keygen
28RSA1_KEY=/etc/ssh/ssh_host_key
29RSA_KEY=/etc/ssh/ssh_host_rsa_key
30DSA_KEY=/etc/ssh/ssh_host_dsa_key
31PID_FILE=/var/run/sshd.pid
32do_rsa1_keygen() {
33 if ! test -f $RSA1_KEY ; then
34 echo -n "Generating SSH1 RSA host key: "
35 if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
36 echo "RSA1 key generation success"
37 else
38 echo "RSA1 key generation failure"
39 exit 1
40 fi
41 fi
42}
43do_rsa_keygen() {
44 if ! test -f $RSA_KEY ; then
45 echo -n "Generating SSH2 RSA host key: "
46 if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
47 echo "RSA key generation success"
48 else
49 echo "RSA key generation failure"
50 exit 1
51 fi
52 fi
53}
54do_dsa_keygen() {
55 if ! test -f $DSA_KEY ; then
56 echo -n "Generating SSH2 DSA host key: "
57 if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
58 echo "DSA key generation success"
59 else
60 echo "DSA key generation failure"
61 exit 1
62 fi
63 fi
64}
65
66# See how we were called.
67case "$1" in
68 start)
69 # Create keys if necessary
70 do_rsa1_keygen
71 do_rsa_keygen
72 do_dsa_keygen
73
74 # Start daemons.
75 [ ! -e $LOCK ] || exit 1
76 echo -n "Starting $SUBSYS services: "
77 start-stop-daemon -S -n $IDENT -x $DAEMON -- $DAEMON_ARGS
78 sleep 1
79 echo .
80 touch $LOCK
81 ;;
82 stop)
83 # Stop daemons.
84 [ -e $LOCK ] || exit 0
85 echo -n "Stopping $SUBSYS services: "
86 start-stop-daemon -K -n $IDENT -x $DAEMON
87 echo
88 rm -f $LOCK
89 ;;
90 restart)
91 $0 stop
92 $0 start
93 ;;
94 *)
95 echo "Usage: $SUBSYS {start|stop|restart}"
96 exit 1
97esac
98
99exit 0
diff --git a/contrib/caldera/sshd.pam b/contrib/caldera/sshd.pam
new file mode 100644
index 000000000..26dcb34d9
--- /dev/null
+++ b/contrib/caldera/sshd.pam
@@ -0,0 +1,8 @@
1#%PAM-1.0
2auth required /lib/security/pam_pwdb.so shadow nodelay
3auth required /lib/security/pam_nologin.so
4account required /lib/security/pam_pwdb.so
5password required /lib/security/pam_cracklib.so
6password required /lib/security/pam_pwdb.so shadow nullok use_authtok
7session required /lib/security/pam_pwdb.so
8session required /lib/security/pam_limits.so