Blob Blame History Raw
%define	_snapshot	-pre20000412

Summary: Clients for remote access commands (rsh, rlogin, rcp).
Name: rsh
Version: 0.17
Release: 2.2
Copyright: BSD
Group: Applications/Internet
Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-rsh-%{version}%{_snapshot}.tar.gz
Source1: rexec.pam
Source2: rlogin.pam
Source3: rsh.pam
Source4: http://www.tc.cornell.edu/~sadd/rexec-1.5.tar.gz
Source5: rsh-xinetd
Source6: rlogin-xinetd
Source7: rexec-xinetd
Patch2: netkit-rsh-0.10-sectty.patch
Patch3: netkit-rsh-0.10-rexec.patch
Patch4: netkit-rsh-0.10-stdarg.patch
Patch5: netkit-rsh-0.16-jbj.patch
Patch6: netkit-rsh-0.16-pamfix.patch
Patch7: netkit-rsh-0.16-jbj2.patch
Patch8: netkit-rsh-0.16-jbj3.patch
Patch9: netkit-rsh-0.16-jbj4.patch
Patch10: netkit-rsh-0.16-prompt.patch
Patch11: netkit-rsh-0.16-rlogin=rsh.patch
Patch12: netkit-rsh-0.16-nokrb.patch
Patch13: netkit-rsh-0.17-pre20000412-jbj5.patch
Patch14: netkit-rsh-0.17-pre20000412-glibc22.patch
BuildRoot: %{_tmppath}/%{name}-root

%description
The rsh package contains a set of programs which allow users to run
commmands on remote machines, login to other machines and copy files
between machines (rsh, rlogin and rcp).  All three of these commands
use rhosts style authentication.  This package contains the clients
needed for all of these services.
The rsh package should be installed to enable remote access to other
machines.

%package server
Summary: Servers for remote access commands (rsh, rlogin, rcp).
Group: System Environment/Daemons
Requires: pam >= 0.59, /etc/pam.d/system-auth

%description server
The rsh-server package contains a set of programs which allow users
to run commmands on remote machines, login to other machines and copy
files between machines (rsh, rlogin and rcp).  All three of these
commands use rhosts style authentication.  This package contains the
servers needed for all of these services.  It also contains a server
for rexec, an alternate method of executing remote commands.
All of these servers are run by inetd and configured using
/etc/inetd.conf and PAM.  The rexecd server is disabled by default,
but the other servers are enabled.

The rsh-server package should be installed to enable remote access
from other machines.

%prep
%setup -q -n netkit-rsh-%{version}%{_snapshot} -a 4
%patch2 -p1 -b .sectty
%patch3 -p1 -b .rexec
%patch4 -p1 -b .stdarg
%patch5 -p1 -b .jbj

# XXX patches {6,7,8} not applied
#%patch6 -p1 -b .pamfix
#%patch7 -p1 -b .jbj2
#%patch8 -p1 -b .jbj3

%patch9 -p1 -b .jbj4
%patch10 -p1 -b .prompt
%patch11 -p1 -b .rsh
%patch12 -p1 -b .rsh.nokrb

%patch13 -p1 -b .jbj5
%patch14 -p1 -b .glibc22

# No, I don't know what this is doing in the tarball.
rm -f rexec/rexec

%build
sh configure
perl -pi -e '
    s,^CC=.*$,CC=cc,;
    s,-O2,\$(RPM_OPT_FLAGS),;
    s,^BINDIR=.*$,BINDIR=%{_bindir},;
    s,^MANDIR=.*$,MANDIR=%{_mandir},;
    s,^SBINDIR=.*$,SBINDIR=%{_sbindir},;
    ' MCONFIG

make

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,5,8}
mkdir -p ${RPM_BUILD_ROOT}/etc/pam.d

make INSTALLROOT=${RPM_BUILD_ROOT} BINDIR=%{_bindir} MANDIR=%{_mandir} install

install -m 644 $RPM_SOURCE_DIR/rexec.pam ${RPM_BUILD_ROOT}/etc/pam.d/rexec
install -m 644 $RPM_SOURCE_DIR/rlogin.pam ${RPM_BUILD_ROOT}/etc/pam.d/rlogin
install -m 644 $RPM_SOURCE_DIR/rsh.pam ${RPM_BUILD_ROOT}/etc/pam.d/rsh

mkdir -p ${RPM_BUILD_ROOT}/etc/xinetd.d/
install -m644 %SOURCE5 ${RPM_BUILD_ROOT}/etc/xinetd.d/rsh
install -m644 %SOURCE6 ${RPM_BUILD_ROOT}/etc/xinetd.d/rlogin
install -m644 %SOURCE7 ${RPM_BUILD_ROOT}/etc/xinetd.d/rexec

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%attr(4755,root,root)	%{_bindir}/rcp
%{_bindir}/rexec
%attr(4755,root,root)	%{_bindir}/rlogin
%attr(4755,root,root)	%{_bindir}/rsh
%{_mandir}/man1/*.1*

%files server
%defattr(-,root,root)
%config	/etc/pam.d/rsh
%config	/etc/pam.d/rlogin
%config	/etc/pam.d/rexec
%{_sbindir}/in.rexecd
%{_sbindir}/in.rlogind
%{_sbindir}/in.rshd
/etc/xinetd.d/*
%{_mandir}/man8/*.8*

%changelog
* Fri Jul 21 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix typo in the rlogin PAM config file
- continue the tradition of messed-up release numbers

* Tue Jul 18 2000 Bill Nottingham <notting@redhat.com>
- add description & default to xinetd file

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jun 18 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.
- update to 0.17.

* Thu Jun  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- modify PAM setup to use system-auth

* Mon May 29 2000 Nalin Dahyabhai <nalin@redhat.com>
- expunge all mentions of kerberos authentication or DES encryption using
  kerberos from the man pages

* Thu May 25 2000 Trond Eivind Glomsrød <teg@redhat.com>
- switched to xinetd

* Tue Mar  7 2000 Jeff Johnson <jbj@redhat.com>
- rebuild for sparc baud rates > 38400.

* Fri Mar 04 2000 Nalin Dahyabhai <nalin@redhat.com>
- make rlogin still work correctly when argv[0] = "rsh"

* Mon Feb 28 2000 Jeff Johnson <jbj@redhat.com>
- workaround (by explicitly prompting for password) #4328 and #9715.

* Wed Feb  9 2000 Jeff Johnson <jbj@redhat.com>
- mark pam config files as %config.

* Fri Feb  4 2000 Bill Nottingham <notting@redhat.com>
- handle compressed manpages

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix description

* Sun Jan 30 2000 Bill Nottingham <notting@redhat.com>
- remove bogus rexec binary when building; it causes weirdness

* Fri Jan 28 2000 Jeff Johnson <jbj@redhat.com>
- Make sure that rshd is compiled with -DUSE_PAM.

* Mon Jan 10 2000 Jeff Johnson <jbj@redhat.com>
- Fix bug in rshd (hangs forever with zombie offspring) (#8313).

* Wed Jan  5 2000 Jeff Johnson <jbj@redhat.com>
- fix the PAM fix yet again (#8133).

* Tue Jan  4 2000 Bill Nottingham <notting@redhat.com>
- split client and server

* Tue Dec 21 1999 Jeff Johnson <jbj@redhat.com>
- update to 0.16.
- dup setuid bits into files list.

* Fri Jul 30 1999 Jeff Johnson <jbj@redhat.com>
- update to rexec-1.5 client (#4262)

* Wed May 19 1999 Jeff Johnson <jbj@redhat.com>
- fix broken rexec protocol in in.rexecd (#2318).

* Tue May  4 1999 Justin Vallon <vallon@mindspring.com>
- rcp with error was tricked by stdarg side effect (#2300)

* Thu Apr 15 1999 Michael K. Johnson <johnsonm@redhat.com>
- rlogin pam file was missing comment magic

* Tue Apr 06 1999 Preston Brown <pbrown@redhat.com>
- strip rexec

* Fri Mar 26 1999 Jeff Johnson <jbj@redhat.com>
- rexec needs pam_set_item() (#60).
- clarify protocol in rexecd.8.
- add rexec client from contrib.

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 22)

* Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
- compile for 6.0.

* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Tue Apr 14 1998 Erik Troan <ewt@redhat.com>
- built against new ncurses

* Sat Apr  5 1998 Marcelo F. Vianna <m-vianna@usa.net>
- Packaged for RH5.0 (Hurricane)

* Tue Oct 14 1997 Michael K. Johnson <johnsonm@redhat.com>
- new pam conventions

* Tue Jul 15 1997 Erik Troan <ewt@redhat.com>
- initial build