1 Summary: A gateway for more secure user access to CGI scripts
2 Summary(pl.UTF-8): Bramka do bezpieczniejszego dostępu użytkowników do skryptów CGI
8 Source0: http://dl.sourceforge.net/cgiwrap/%{name}-%{version}.tar.gz
9 # Source0-md5: 14c02c57e4a0c6224951018e2f6b9211
10 Patch0: %{name}-mime_magic.patch
11 Patch1: %{name}-bs.patch
12 Patch2: %{name}-phprc.patch
13 Patch3: %{name}-customhtmlerrors.patch
14 URL: http://cgiwrap.sourceforge.net/
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: libmagic-devel
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _cgibindir /home/services/httpd/cgi-bin
23 A gateway that allows more secure user access to CGI programs on an
24 HTTPd server than is provided by the HTTP server itself. The primary
25 function of CGIwrap is to make certain that any CGI script runs with
26 the permissions of the user who installed it, and not those of the
29 %description -l pl.UTF-8
30 Bramka pozwalająca na bardziej bezpieczny dostęp użytkowników do
31 programów CGI na serwerze HTTP niż ten udostępniany przez sam serwer
32 HTTP. Główna funkcja CGIwrap to upewnienie się, że skrypt CGI działa z
33 uprawnieniami użytkownika, który go zainstalował, a nie serwera.
43 install %{_datadir}/automake/config.* .
46 --with-perl=%{_bindir}/perl \
47 --with-php=%{_bindir}/php.cgi \
48 --with-local-contact-email=root@localhost \
49 --with-httpd-user=http \
50 --with-minimum-uid=500 \
51 --with-minimum-gid=500 \
52 --with-block-svn-paths \
53 --with-block-cvs-paths \
54 --with-php-interpreter \
55 --with-soft-rlimit-only \
56 --with-cgi-dir=public_html \
57 --without-check-symlink \
58 --without-check-group \
59 --with-use-script-url \
61 --with-custom-html-errors=/etc/cgiwrap
64 LDFLAGS='%{rpmldflags} -lmagic'
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT{%{_cgibindir},%{_sysconfdir}/cgiwrap}
70 install cgiwrap $RPM_BUILD_ROOT%{_cgibindir}
71 install cgiwrap $RPM_BUILD_ROOT%{_cgibindir}/cgiwrapd
72 install cgiwrap $RPM_BUILD_ROOT%{_cgibindir}/nph-cgiwrap
73 install cgiwrap $RPM_BUILD_ROOT%{_cgibindir}/nph-cgiwrapd
74 install cgiwrap $RPM_BUILD_ROOT%{_cgibindir}/php-cgiwrap
75 install cgiwrap $RPM_BUILD_ROOT%{_cgibindir}/php-cgiwrapd
77 echo "The cgiwrap executable(s) were not made setuid-root. This is required" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/CGIWrapNotSetUID.html
78 echo "The userid that the web server ran cgiwrap as does not match the userid that was configured into the cgiwrap executable" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/ServerUserMismatch.html
79 echo "CGIWrap was configured with a server userid that does not exist" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/ServerUserNotFound.html
80 echo "Execution is not permitted" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/ExecutionNotPermitted.html
81 echo "CGIWrap access control mechanism denied execution of this script" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/AccessControl.html
82 echo "CGIWrap encountered a system error" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/SystemError.html
83 echo "CGIWrap encountered an error while attempting to execute this script" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/ExecFailed.html
84 echo "CGIWrap was unable to find the user" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/NoSuchUser.html
85 echo "The specified user does not have a script directory set up" > $RPM_BUILD_ROOT%{_sysconfdir}/cgiwrap/NoScriptDir.html
88 rm -rf $RPM_BUILD_ROOT
91 %defattr(644,root,root,755)
93 %attr(4755,root,root) %{_cgibindir}/*
94 %dir %{_sysconfdir}/cgiwrap
95 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cgiwrap/*.html