diff --git a/.cvsignore b/.cvsignore index e69de29..12bd7e5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +rssh-2.3.2.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..7c67213 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +rssh-2_3_2-4_fc10:HEAD:rssh-2.3.2-4.fc10.src.rpm:1222661136 diff --git a/rssh-2.3.2-makefile.patch b/rssh-2.3.2-makefile.patch new file mode 100644 index 0000000..c28167e --- /dev/null +++ b/rssh-2.3.2-makefile.patch @@ -0,0 +1,11 @@ +--- rssh-2.3.2/Makefile.in.old 2008-07-21 19:52:51.000000000 -0400 ++++ rssh-2.3.2/Makefile.in 2008-07-21 19:52:54.000000000 -0400 +@@ -728,7 +728,7 @@ + $(CC) -c $(DEFS) $(ourdefs) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< + + install-exec-hook: +- chmod u+s $(libexecdir)/rssh_chroot_helper ++ chmod u+s $(DESTDIR)$(libexecdir)/rssh_chroot_helper + + rpm: dist + rpmbuild -ta --sign $(base).tar.gz diff --git a/rssh.spec b/rssh.spec new file mode 100644 index 0000000..22fd0eb --- /dev/null +++ b/rssh.spec @@ -0,0 +1,88 @@ +Name: rssh +Version: 2.3.2 +Release: 4%{?dist} +Summary: Restricted shell for use with OpenSSH, allowing only scp and/or sftp +Group: Applications/Internet +License: BSD +URL: http://www.pizzashack.org/rssh/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: rssh-2.3.2-makefile.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: openssh-server, openssh-clients +BuildRequires: cvs rsync rdist +Requires: openssh-server +Requires(pre): shadow-utils + +%description + +rssh is a restricted shell for use with OpenSSH, allowing only scp +and/or sftp. For example, if you have a server which you only want +to allow users to copy files off of via scp, without providing shell +access, you can use rssh to do that. It is a alternative to scponly. + + +%prep +%setup -q +%patch0 -p1 -b .makefile + +chmod 644 conf_convert.sh +chmod 644 mkchroot.sh + + +%build +%configure +make %{?_smp_mflags} + + +%install +rm -rf %{buildroot} +make install INSTALL="%{__install} -p" DESTDIR=%{buildroot} + +%clean +rm -rf %{buildroot} + +%pre +getent group rsshusers >/dev/null || groupadd -r rsshusers +exit 0 + +%post +# Add rssh to the list of allowed shells in /etc/shells +if ! grep %_bindir/rssh %_sysconfdir/shells >/dev/null; then + echo %_bindir/rssh >>%_sysconfdir/shells +fi + +%postun +# Remove rssh from the list of allowed shells in /etc/shells +if [ "$1" = 0 ]; then + grep -v %_bindir/rssh %_sysconfdir/shells >%_sysconfdir/rssh.tmp + mv %_sysconfdir/rssh.tmp %_sysconfdir/shells +fi + + +%files +%defattr(-, root, root, -) +%doc AUTHORS ChangeLog CHROOT COPYING NEWS README SECURITY TODO +%doc conf_convert.sh mkchroot.sh +%doc %{_mandir}/man1/rssh.1* +%doc %{_mandir}/man5/rssh.conf.5* +%config(noreplace) %{_sysconfdir}/rssh.conf +%attr(750, root, rsshusers) %{_bindir}/rssh +%attr(4750, root, rsshusers) %{_libexecdir}/rssh_chroot_helper + + +%changelog + +* Wed Aug 11 2008 Rahul Sundaram - 2.3.2-4 +- Fix review issues and apply patch + +* Wed Aug 07 2008 Rahul Sundaram - 2.3.2-3 +- Fix postun to remove rssh shell + +* Wed Jul 30 2008 Rahul Sundaram - 2.3.2-2 +- Fix BR and defattr. Added a group and shell + +* Tue Jul 22 2008 Rahul Sundaram - 2.3.2-1 +- initial spec + + diff --git a/sources b/sources index e69de29..ac344c7 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +65712f2c06ff5fc6fc783bc8c2e4e1ba rssh-2.3.2.tar.gz