1 Summary: A restricted shell for assigning scp- or sftp-only access
2 Summary(pl.UTF-8): Okrojona powłoka dająca dostęp tylko do scp i/lub sftp
7 Group: Applications/Shells
8 Source0: http://dl.sourceforge.net/rssh/%{name}-%{version}.tar.gz
9 # Source0-md5: 5211f5fe206704f813a3cec61f487042
10 Patch0: %{name}-userbuild.patch
11 Patch1: %{name}-mkchroot.patch
12 Patch2: %{name}-rsync-protocol.patch
13 URL: http://www.pizzashack.org/rssh/
14 BuildRequires: autoconf
15 BuildRequires: automake
16 BuildRequires: openssh-clients >= 3.5p1
18 Requires(preun): sed >= 4.0
19 Conflicts: openssh-server < 3.5p1
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 rssh is a small shell that provides the ability for system
26 administrators to give specific users access to a given system via scp
29 %description -l pl.UTF-8
30 rssh jest małym shellem, który pozwala administratorowi ograniczyć
31 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
51 install -d $RPM_BUILD_ROOT/bin
54 DESTDIR=$RPM_BUILD_ROOT
56 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/rssh.conf{.default,}
57 ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/scpsh
58 ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/sftpsh
61 ln -s %{_bindir}/%{name} $RPM_BUILD_ROOT/bin/%{name}
62 ln -s %{_bindir}/scpsh $RPM_BUILD_ROOT/bin/scpsh
63 ln -s %{_bindir}/sftpsh $RPM_BUILD_ROOT/bin/sftpsh
67 rm -rf $RPM_BUILD_ROOT
70 if [ ! -f /etc/shells ]; then
72 echo "%{_bindir}/%{name}" > /etc/shells
73 echo "%{_bindir}/scpsh" >> /etc/shells
74 echo "%{_bindir}/sftpsh" >> /etc/shells
76 if ! grep -q '^%{_bindir}/%{name}$' /etc/shells; then
77 echo "%{_bindir}/%{name}" >> /etc/shells
79 if ! grep -q '^%{_bindir}/scpsh$' /etc/shells; then
80 echo "%{_bindir}/scpsh" >> /etc/shells
82 if ! grep -q '^%{_bindir}/sftpsh$' /etc/shells; then
83 echo "%{_bindir}/sftpsh" >> /etc/shells
88 if [ "$1" = "0" ]; then
89 %{__sed} -i -e '/^%(echo %{_bindir} | sed -e 's,/,\\/,g')\/\(%{name}\|scpsh\|sftpsh\)$/d' /etc/shells
92 %triggerpostun -- %{name} < 2.3.2-0.6
93 # make compat symlinks, the symlinks are discarded using %ghost on package uninstall
94 ln -sf %{_bindir}/%{name} /bin/%{name}
95 ln -sf %{_bindir}/scpsh /bin/scpsh
96 ln -sf %{_bindir}/sftpsh /bin/sftpsh
99 %defattr(644,root,root,755)
100 %doc AUTHORS ChangeLog README CHROOT SECURITY mkchroot.sh
101 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rssh.conf
102 %attr(755,root,root) %{_bindir}/%{name}
103 %attr(755,root,root) %{_bindir}/scpsh
104 %attr(755,root,root) %{_bindir}/sftpsh
105 %attr(4755,root,root) %{_libexecdir}/rssh_chroot_helper