1 Summary: A restricted shell for assigning scp- or sftp-only access
2 Summary(pl): Okrojona pow³oka daj±ca dostêp tylko do scp i sftp
7 Group: Applications/Shells
8 Source0: http://www.pizzashack.org/rssh/%{name}-%{version}.tar.gz
9 Patch0: %{name}-Makefile.patch
10 URL: http://www.pizzashack.org/rssh/
11 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 rssh is a small shell that provides the ability for system
17 administrators to give specific users access to a given system via scp
21 rssh jest ma³ym shellem, który pozwala administratorowi ograniczyæ
22 dostêp na danym koncie tylko do scp i/lub sftp.
25 %setup -q -c -n %{name}-%{version}
29 ./configure --prefix=%{_prefix}
30 %{__make} CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}"
33 rm -rf $RPM_BUILD_ROOT
35 %{__make} install DESTDIR=$RPM_BUILD_ROOT
38 rm -rf $RPM_BUILD_ROOT
41 if [ ! -f /etc/shells ]; then
42 echo "%{_bindir}/%{name}" > /etc/shells
43 echo "%{_bindir}/scpsh" >> /etc/shells
44 echo "%{_bindir}/sftpsh" >> /etc/shells
46 if ! grep -q '^%{_bindir}/%{name}$' /etc/shells; then
47 echo "%{_bindir}/%{name}" >> /etc/shells
49 if ! grep -q '^%{_bindir}/scpsh$' /etc/shells; then
50 echo "%{_bindir}/scpsh" >> /etc/shells
52 if ! grep -q '^%{_bindir}/sftpsh$' /etc/shells; then
53 echo "%{_bindir}/sftpsh" >> /etc/shells
58 if [ "$1" = "0" ]; then
59 grep -v %{_bindir}/%{name} /etc/shells | grep -v %{_bindir}/scpsh | grep -v %{_bindir}/sftpsh > /etc/shells.new
60 mv -f /etc/shells.new /etc/shells
64 %defattr(644,root,root,755)
65 %attr(711,root,root) %{_bindir}/%{name}
66 %attr(755,root,root) %{_bindir}/scpsh
67 %attr(755,root,root) %{_bindir}/sftpsh