2 # - no need to have have the shell in /bin, as it needs running sshd
3 # to work, which itself needs /usr to be mounted. for nice trigger
4 # see cvsspam.spec or scponly.spec
5 Summary: A restricted shell for assigning scp- or sftp-only access
6 Summary(pl): Okrojona pow³oka daj±ca dostêp tylko do scp i/lub sftp
11 Group: Applications/Shells
12 Source0: http://dl.sourceforge.net/rssh/%{name}-%{version}.tar.gz
13 # Source0-md5: 29e98453a9d9926af97c5386620e7841
14 Patch0: %{name}-userbuild.patch
15 Patch1: %{name}-mkchroot.patch
16 URL: http://www.pizzashack.org/rssh/
17 BuildRequires: autoconf
18 BuildRequires: automake
19 BuildRequires: openssh-clients >= 3.5p1
20 Conflicts: openssh-server < 3.5p1
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 rssh is a small shell that provides the ability for system
27 administrators to give specific users access to a given system via scp
31 rssh jest ma³ym shellem, który pozwala administratorowi ograniczyæ
32 dostêp na danym koncie tylko do scp i/lub sftp.
44 --with-scp=/usr/bin/scp \
45 --with-sftp-server=/usr/%{_lib}/openssh/sftp-server
50 rm -rf $RPM_BUILD_ROOT
53 DESTDIR=$RPM_BUILD_ROOT
55 ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/scpsh
56 ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/sftpsh
59 rm -rf $RPM_BUILD_ROOT
63 if [ ! -f /etc/shells ]; then
64 echo "%{_bindir}/%{name}" > /etc/shells
65 echo "%{_bindir}/scpsh" >> /etc/shells
66 echo "%{_bindir}/sftpsh" >> /etc/shells
68 if ! grep -q '^%{_bindir}/%{name}$' /etc/shells; then
69 echo "%{_bindir}/%{name}" >> /etc/shells
71 if ! grep -q '^%{_bindir}/scpsh$' /etc/shells; then
72 echo "%{_bindir}/scpsh" >> /etc/shells
74 if ! grep -q '^%{_bindir}/sftpsh$' /etc/shells; then
75 echo "%{_bindir}/sftpsh" >> /etc/shells
81 if [ "$1" = "0" ]; then
82 grep -v %{_bindir}/%{name} /etc/shells | grep -v %{_bindir}/scpsh | grep -v %{_bindir}/sftpsh > /etc/shells.new
83 mv -f /etc/shells.new /etc/shells
87 %defattr(644,root,root,755)
88 %doc AUTHORS ChangeLog README CHROOT SECURITY mkchroot.sh
89 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/rssh.conf
90 %attr(755,root,root) %{_bindir}/%{name}
91 %attr(755,root,root) %{_bindir}/scpsh
92 %attr(755,root,root) %{_bindir}/sftpsh
93 %attr(4755,root,root) %{_libdir}/rssh_chroot_helper