]> git.pld-linux.org Git - packages/rssh.git/blob - rssh.spec
- SECURITY up to 2.3.1
[packages/rssh.git] / rssh.spec
1 # TODO
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
7 Name:           rssh
8 Version:        2.3.1
9 Release:        2
10 License:        BSD-like
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)
22
23 %define         _bindir         /bin
24
25 %description
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
28 or sftp only.
29
30 %description -l pl
31 rssh jest ma³ym shellem, który pozwala administratorowi ograniczyæ
32 dostêp na danym koncie tylko do scp i/lub sftp.
33
34 %prep
35 %setup -q
36 %patch0 -p1
37 %patch1
38
39 %build
40 %{__aclocal}
41 %{__automake}
42 %{__autoconf}
43 %configure \
44         --with-scp=/usr/bin/scp \
45         --with-sftp-server=/usr/%{_lib}/openssh/sftp-server
46
47 %{__make}
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51
52 %{__make} install \
53          DESTDIR=$RPM_BUILD_ROOT
54
55 ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/scpsh
56 ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/sftpsh
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %post
62 umask 022
63 if [ ! -f /etc/shells ]; then
64         echo "%{_bindir}/%{name}" > /etc/shells
65         echo "%{_bindir}/scpsh" >> /etc/shells
66         echo "%{_bindir}/sftpsh" >> /etc/shells
67 else
68         if ! grep -q '^%{_bindir}/%{name}$' /etc/shells; then
69                 echo "%{_bindir}/%{name}" >> /etc/shells
70         fi
71         if ! grep -q '^%{_bindir}/scpsh$' /etc/shells; then
72                 echo "%{_bindir}/scpsh" >> /etc/shells
73         fi
74         if ! grep -q '^%{_bindir}/sftpsh$' /etc/shells; then
75                 echo "%{_bindir}/sftpsh" >> /etc/shells
76         fi
77 fi
78
79 %preun
80 umask 022
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
84 fi
85
86 %files
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
94 %{_mandir}/man?/*
This page took 0.087963 seconds and 3 git commands to generate.