File rsh.spec of Package rsh

#
# spec file for package rsh (Version 0.17)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           rsh
BuildRequires:  ncurses-devel pam-devel
License:        BSD 3-Clause
Group:          Productivity/Networking/Other
Requires:       netcfg
Provides:       nkitb:/usr/bin/rsh
AutoReqProv:    on
Version:        0.17
Release:        706
Summary:        Clients for remote access commands (rsh, rlogin, and rcp)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
Source:         netkit-rsh-%{version}.tar.bz2
Source1:        rlogin.xinetd
Source2:        rsh.xinetd
Source3:        rexec.xinetd
Source4:        README.SuSE
Patch:          netkit-rsh-%{version}.diff
Patch1:         netkit-rsh-%{version}-pam.diff
Patch2:         netkit-rsh-%{version}-varargs.diff
Patch3:         netkit-rsh-%{version}-pam-env.diff
Patch4:         netkit-rsh-%{version}-revers.diff
Patch5:         netkit-rsh-%{version}-bigfile.diff
Patch6:         netkit-rsh-%{version}-null.diff
Patch7:         netkit-rsh-%{version}-rexec-netrc.diff
Patch8:         netkit-rsh-%{version}-checkdir.diff
Patch9:         netkit-rsh-%{version}-rexec-NPTL-signals.diff
Patch10:        netkit-rsh-%{version}-nostrip.diff
Patch11:        netkit-rsh-%{version}-realloc-assign.diff
Patch12:        netkit-rsh-%{version}-no_chown.diff
Patch13:        netkit-rsh-0.17-glibc28.patch
Patch14:        netkit-rsh-0.17-tty-4-pam.diff
Patch15:        netkit-rsh-0.17-pam-sess.patch

%description
This package contains programs that allow users to run commands on
remote machines, to log in to other machines, and to copy files between
machines (rsh, rexec, rlogin, and rcp).  These commands use rhosts
style authentication.

For secure communication, openssh (SSH) should be used.



%package server
License:        BSD 3-Clause
Version:        0.17
Release:        706
Summary:        Servers for Remote Access Commands (rsh, rlogin, rcp)
Group:          Productivity/Networking/Other
Requires:       netcfg
Provides:       nkitserv:/usr/sbin/in.rshd
AutoReqProv:    on

%description server
This package contains a set of server programs which allow users to run
commands on remote machines, log in to other machines, and copy files
between machines (rsh, rexec, rlogin, and rcp). All of these services
are run by inetd and configured using /etc/inetd.conf. PAM will be used
for authentication. SSH should be used for secure communication.



%prep
%setup -q -n netkit-rsh-%{version}
cp %SOURCE4 .
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10 -p1
%patch11 -p1
%patch12
%patch13
%patch14
%patch15

%build
CFLAGS="$RPM_OPT_FLAGS -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIE" \
./configure
echo "LDFLAGS += -pie" >> MCONFIG
make

%install
install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
install -d -m 755 $RPM_BUILD_ROOT/usr/{bin,sbin}
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8}
install -d -m 755 $RPM_BUILD_ROOT/etc/xinetd.d
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/xinetd.d/rlogin
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/xinetd.d/rsh
install -m 644 %{S:3} $RPM_BUILD_ROOT/etc/xinetd.d/rexec
make install INSTALLROOT=$RPM_BUILD_ROOT

%clean
rm -rf  %{buildroot}

%files
%defattr(-,root,root)
%{_mandir}/man1/*
%{_mandir}/man5/*
%doc BUGS ChangeLog
/usr/bin/*

%files server
%defattr(-,root,root)
%config /etc/pam.d/*
%config(noreplace) /etc/xinetd.d/*
%{_mandir}/man8/*
%doc BUGS ChangeLog README.SuSE
/usr/sbin/*

%changelog
* Thu Sep 04 2008 anosek@suse.cz
- fixed VUL-0: in.rexecd ignores /etc/security/limits.conf
  (bnc#422442) (pam-sess.patch)
* Tue May 13 2008 werner@suse.de
- Set the terminal line as item for pam (bnc#374299)
* Thu Apr 10 2008 crrodriguez@suse.de
- fix build with glibc 2.8, ARG_MAX no longer defined
* Thu Mar 29 2007 rguenther@suse.de
- add ncurses-devel BuildRequires
* Mon Feb 12 2007 ro@suse.de
- fix build as non-root
* Mon Sep 04 2006 kukuk@suse.de
- Adjust PAM config files, add pam_loginuid.so
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Dec 21 2005 mmj@suse.de
- enable debuginfo
- assign return value of realloc to pointer being realloc'ed
* Fri Sep 16 2005 od@suse.de
- fix to avoid setting handlers for signals used by NPTL (#114893)
* Wed Jun 22 2005 mjancar@suse.cz
- fix directory traversal: netkit-rsh-0.17-checkdir.diff (#84582)
* Tue Jun 21 2005 ro@suse.de
- build with fPIE/pie
* Mon Mar 07 2005 mjancar@suse.cz
- add .netrc support to rexec
* Mon Jan 24 2005 meissner@suse.de
- 0 -> NULL in 2 exec calls.
* Mon Nov 08 2004 kukuk@suse.de
- Use common-* PAM config files for PAM configuration
* Wed Sep 08 2004 mjancar@suse.cz
- support large files (#44738)
* Wed Mar 31 2004 mjancar@suse.cz
- add options to relax or skip reverse host lookup (#37096)
* Fri Jan 16 2004 kukuk@suse.de
- Add pam-devel neededforbuild
* Fri Mar 07 2003 vbobek@suse.cz
- fixed misspelling in rsh.xinetd
* Mon Feb 24 2003 vbobek@suse.cz
- updated for start from xinetd
* Fri Feb 07 2003 kukuk@suse.de
- Use pam_unix2.so instead of pam_unix.so
* Wed Feb 06 2002 cihlar@suse.cz
- added patch pam-env which makes pam_env.so working
  (by magnus@thp.uni-duisburg.de)
* Mon Nov 19 2001 cihlar@suse.cz
- split patch for varargs problem from main patch
* Fri Nov 16 2001 bk@suse.de
- rcp/s390: fix varargs problem in error():
  va_copy before changing varargs(fixes bug 12330)
* Wed Oct 24 2001 cihlar@suse.cz
- fixed problem with calling PAM function after getpwnam
* Tue Aug 14 2001 kukuk@suse.de
- Don't use absolute paths to PAM modules in PAM config files
* Sat Apr 07 2001 kukuk@suse.de
- Make rexec, rsh and rlogin IPv6 ready
- Add rexec_af as workaround for buggy glibc version
* Thu Mar 22 2001 ro@suse.de
- added split-aliases as provides
* Fri Mar 16 2001 cihlar@suse.cz
- added Url
- clean up spec file
* Tue Mar 06 2001 kukuk@suse.de
- Initial package, split from nkitb
openSUSE Build Service is sponsored by