View | Details | Raw Unified | Return to bug 71188
Collapse All | Expand All

(-)cgiwrap/Makefile (-53 / +72 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	cgiwrap
8
PORTNAME=	cgiwrap
9
PORTVERSION=	3.9
9
PORTVERSION=	3.9
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	www security
11
CATEGORIES=	www security
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 18-116 Link Here
18
GNU_CONFIGURE=	yes
18
GNU_CONFIGURE=	yes
19
CONFIGURE_ARGS=	--with-httpd-user=${WWWOWN} \
19
CONFIGURE_ARGS=	--with-httpd-user=${WWWOWN} \
20
		--with-install-group=${WWWGRP} \
20
		--with-install-group=${WWWGRP} \
21
		--with-install-dir=${MAINCGIDIR} \
21
		--with-install-dir=${WITH_MAIN_CGIDIR} \
22
		--with-cgi-dir=${CGIWRAP_CGIDIR} \
22
		--with-cgi-dir=${WITH_USER_CGIDIR} \
23
		--with-local-contact=${CGIWRAP_CONTACT} \
23
		--with-local-contact=${WITH_EMAIL} \
24
		--with-allow-file=${CGIWRAP_ALLOWFILE} \
24
		--with-allow-file=${WITH_ALLOWFILE} \
25
		--with-deny-file=${CGIWRAP_DENYFILE}
25
		--with-deny-file=${WITH_DENYFILE}
26
27
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
28
PKGMESSAGE=	${WRKDIR}/pkg-message
29
30
## Available knobs:
31
##
32
##   WITH_MAIN_CGIDIR:     location of the cgiwrap binaries
33
#
34
# This is the directory where the cgiwrap binaries (i.e. the setuid
35
# root binaries) get installed to.
36
#
37
WITH_MAIN_CGIDIR?=	${PREFIX}/www/cgi-bin
26
38
39
##   WITH_USER_CGIDIR:     location of the CGI directory per user
40
##                         account (i.e. public_html/cgi-bin)
27
#
41
#
28
# Set this to the directory (relative to each user's home) where CGI
42
# Set this to the directory (relative to each user's home) where CGI
29
# scripts will be found.  Common alternate values are "www/cgi-bin"
43
# scripts will be found.  Common alternate values are "www/cgi-bin"
30
# (a.k.a. ~user/www/cgi-bin) and "cgi-bin" (a.k.a. ~user/cgi-bin)
44
# (a.k.a. ~user/www/cgi-bin) and "cgi-bin" (a.k.a. ~user/cgi-bin)
31
#
45
#
32
CGIWRAP_CGIDIR?=	public_html/cgi-bin
46
WITH_USER_CGIDIR?=	public_html/cgi-bin
33
47
48
##   WITH_ALLOWFILE:       location/name of the cgiwrap.allow ACL file
49
##   WITH_DENYFILE:        location/name of the cgiwrap.deny ACL file
34
#
50
#
35
# MAINCGIDIR is the directory the cgiwrap binaries get installed to.
51
WITH_ALLOWFILE?=	${PREFIX}/etc/${PORTNAME}.allow
36
#
52
WITH_DENYFILE?=		${PREFIX}/etc/${PORTNAME}.deny
37
MAINCGIDIR?=	${PREFIX}/www/cgi-bin
38
53
54
##   WITH_EMAIL:           cgiwrap administrator's Email address
39
#
55
#
40
# The allow and deny files control access to cgiwrap.
56
WITH_EMAIL?=		webmaster@dummy-host.example.com
41
#
42
CGIWRAP_ALLOWFILE?=	${PREFIX}/etc/${PORTNAME}.allow
43
CGIWRAP_DENYFILE?=	${PREFIX}/etc/${PORTNAME}.deny
44
45
#
46
# Set the contact Email address.
47
#
48
CGIWRAP_CONTACT?=	webmaster@dummy-host.example.com
49
57
58
##   WITH_LOGGING:         enables cgiwrap logging; specifies the
59
##                         path and filename of the logfile
50
#
60
#
51
# Define CGIWRAP_LOGGING and specify where you want the logfile.
61
.if defined(WITH_LOGGING)
52
#
62
CONFIGURE_ARGS+=	--with-logging-file=${WITH_LOGGING}
53
.if defined(CGIWRAP_LOGGING)
54
CONFIGURE_ARGS+=	--with-logging-file=${CGIWRAP_LOGGING}
55
.endif
63
.endif
56
64
65
##   WITH_DEBUG:           enables cgiwrap debugging support, via
66
##                         the 'cgiwrapd' binary
57
#
67
#
58
# Some users enjoy being able to debug their own CGI scripts, since
68
.if defined(WITH_DEBUG)
59
# the standard "Internal server error" response doesn't help much.
60
# Administrators may find this useful as well.  See the cgiwrap
61
# documentation for details on how to use this.
62
#
63
.if defined(CGIWRAP_DEBUG)
64
PLIST_SUB+=	CGIWRAPDFLAG=
69
PLIST_SUB+=	CGIWRAPDFLAG=
65
.else
70
.else
66
PLIST_SUB+=	CGIWRAPDFLAG="@comment "
71
PLIST_SUB+=	CGIWRAPDFLAG="@comment "
67
.endif
72
.endif
68
73
74
##   WITHOUT_CHECK_OWNER:  disable CGI file ownership checks
75
##   WITHOUT_CHECK_GROUP:  disable CGI file group checks
76
##   WITHOUT_CHECK_SETUID: disable CGI file setuid permissions check
77
##   WITHOUT_CHECK_SETGID: disable CGI file setgid permissions check
78
##   WITHOUT_CHECK_GROUP_WRITABLE:
79
##          disable CGI file group-writable permissions check
80
##   WITHOUT_CHECK_WORLD_WRITABLE:
81
##          disable CGI file world-writable permissions check
69
#
82
#
70
# A slew of --without-* configure flags exist for cgiwrap.  You
83
.if defined(WITHOUT_CHECK_OWNER)
71
# should refer to the cgiwrap documentation for details regarding
72
# what these do, and when (if) they're necessary.
73
#
74
###
75
.if defined(CGIWRAP_WITHOUT_CHECK_OWNER)
76
CONFIGURE_ARGS+=	--without-check-owner
84
CONFIGURE_ARGS+=	--without-check-owner
77
.endif
85
.endif
78
.if defined(CGIWRAP_WITHOUT_CHECK_GROUP)
86
.if defined(WITHOUT_CHECK_GROUP)
79
CONFIGURE_ARGS+=	--without-check-group
87
CONFIGURE_ARGS+=	--without-check-group
80
.endif
88
.endif
81
.if defined(CGIWRAP_WITHOUT_CHECK_SETUID)
89
.if defined(WITHOUT_CHECK_SETUID)
82
CONFIGURE_ARGS+=	--without-check-setuid
90
CONFIGURE_ARGS+=	--without-check-setuid
83
.endif
91
.endif
84
.if defined(CGIWRAP_WITHOUT_CHECK_SETGID)
92
.if defined(WITHOUT_CHECK_SETGID)
85
CONFIGURE_ARGS+=	--without-check-setgid
93
CONFIGURE_ARGS+=	--without-check-setgid
86
.endif
94
.endif
87
.if defined(CGIWRAP_WITHOUT_CHECK_GROUP_WRITABLE)
95
.if defined(WITHOUT_CHECK_GROUP_WRITABLE)
88
CONFIGURE_ARGS+=	--without-check-group-writable
96
CONFIGURE_ARGS+=	--without-check-group-writable
89
.endif
97
.endif
90
.if defined(CGIWRAP_WITHOUT_CHECK_WORLD_WRITABLE)
98
.if defined(WITHOUT_CHECK_WORLD_WRITABLE)
91
CONFIGURE_ARGS+=	--without-check-world-writable
99
CONFIGURE_ARGS+=	--without-check-world-writable
92
.endif
100
.endif
93
101
102
.if !defined(NOPORTDOCS)
103
PORTDOCS=	accesscontrol.html afs.html changes.html \
104
		chroot.html comments.html download.html faq.html \
105
		index.html install.html intro.html maillist.html \
106
		notes.html pubs.html quickref.html setup.html \
107
		thanks.html todo.html tricks.html y2k.html
108
.endif
109
110
show-options:
111
	@${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
112
94
pre-install:
113
pre-install:
95
	@${MKDIR} ${MAINCGIDIR}
114
	@${MKDIR} ${WITH_MAIN_CGIDIR}
96
115
97
post-install:
116
post-install:
98
	@${STRIP_CMD} ${MAINCGIDIR}/cgiwrap
117
	@${STRIP_CMD} ${WITH_MAIN_CGIDIR}/cgiwrap
99
	@${CHMOD} 4550 ${MAINCGIDIR}/cgiwrap
118
	@${CHMOD} 4550 ${WITH_MAIN_CGIDIR}/cgiwrap
100
.if !defined(CGIWRAP_WITH_DEBUG)
119
.if !defined(WITH_DEBUG)
101
	@${RM} ${MAINCGIDIR}/cgiwrapd ${MAINCGIDIR}/nph-cgiwrapd
120
	@${RM} ${WITH_MAIN_CGIDIR}/cgiwrapd
121
	@${RM} ${WITH_MAIN_CGIDIR}/nph-cgiwrapd
102
.endif
122
.endif
103
.if !defined(NOPORTDOCS)
123
.if !defined(NOPORTDOCS)
104
	@${MKDIR} ${DOCSDIR}
124
	@${MKDIR} ${DOCSDIR}
105
.for file in accesscontrol.html afs.html changes.html chroot.html	\
125
.for f in ${PORTDOCS}
106
		comments.html download.html faq.html index.html		\
126
	@${INSTALL_DATA} ${WRKSRC}/htdocs/${f} ${DOCSDIR}
107
		install.html intro.html maillist.html notes.html	\
108
		pubs.html quickref.html setup.html thanks.html		\
109
		todo.html tricks.html y2k.html
110
	@${INSTALL_DATA} ${WRKSRC}/htdocs/${file} ${DOCSDIR}
111
.endfor
127
.endfor
112
	@${ECHO} "Documentation installed in ${DOCSDIR}"
113
.endif
128
.endif
114
	@${CAT} ${PKGMESSAGE} | ${SED} -e's#%%PREFIX%%#${PREFIX}#g'
129
	@${SED}	-e's,%%MAIN_CGIDIR%%,${WITH_MAIN_CGIDIR},g' \
130
		-e's,%%ALLOWFILE%%,${WITH_ALLOWFILE},g' \
131
		-e's,%%DENYFILE%%,${WITH_DENYFILE},g' \
132
		${MASTERDIR}/pkg-message > ${PKGMESSAGE}
133
	@${CAT} ${PKGMESSAGE}
115
134
116
.include <bsd.port.mk>
135
.include <bsd.port.mk>
(-)cgiwrap/pkg-descr (-3 / +3 lines)
Lines 1-11 Link Here
1
This is CGIWrap - a gateway that allows more secure user access to
1
This is CGIWrap - a gateway that allows more secure user access to
2
CGI programs on an HTTPd server than is provided by the http server
2
CGI programs on an HTTPd server than is provided by the Web server
3
itself. The primary function of CGIWrap is to make certain that
3
itself. The primary function of CGIWrap is to make certain that
4
any CGI script runs with the permissions of the user who installed
4
any CGI script runs with the permissions of the user who installed
5
it, and not those of the server.
5
it, and not those of the Web server.
6
6
7
CGIWrap works with NCSA httpd, Apache, CERN httpd, NetSite Commerce
7
CGIWrap works with NCSA httpd, Apache, CERN httpd, NetSite Commerce
8
and Communications servers, and probably any other Unix based web
8
and Communications servers, and probably any other Unix-based Web
9
server software that supports CGI.
9
server software that supports CGI.
10
10
11
WWW: http://cgiwrap.sourceforge.net/
11
WWW: http://cgiwrap.sourceforge.net/
(-)cgiwrap/pkg-message (-9 / +13 lines)
Lines 1-15 Link Here
1
-----------------------------------------------------------------
1
-----------------------------------------------------------------
2
You have installed cgiwrap, a wrapper to securely execute user
2
You have installed cgiwrap, a wrapper to securely execute user
3
CGI programs.  cgiwrap is reported to work with most web servers
3
CGI programs.  cgiwrap is reported to work with most Web servers
4
that support CGI, so no one specific server has been included as
4
that support CGI, so no one specific server has been included as
5
a depend.  If you are unsure of which webserver to use, it is
5
a dependancy.  If you are unsure of which Web server to use, it
6
recommended to try the Apache web server package.
6
is recommended that you try the Apache HTTP server.
7
7
8
The cgiwrap scripts have been installed in:
8
The cgiwrap binaries have been installed in the following
9
    %%PREFIX%%/www/cgi-bin
9
directory:
10
...the default location for Apache's cgi-bin directory.
11
10
12
If cgiwrap's allow/deny control is enabled, you must create either
11
  %%MAIN_CGIDIR%%
13
%%PREFIX%%/etc/cgiwrap.allow and/or %%PREFIX%%/etc/cgiwrap.deny
12
14
before cgiwrap will function.
13
You should create/manage the following two files, otherwise
14
cgiwrap will not function as expected.  These ACL files define
15
which users can and cannot run CGI binaries via cgiwrap:
16
17
  %%ALLOWFILE%%
18
  %%DENYFILE%%
15
-----------------------------------------------------------------
19
-----------------------------------------------------------------
(-)cgiwrap/pkg-plist (-20 lines)
Lines 1-25 Link Here
1
%%PORTDOCS%%%%DOCSDIR%%/accesscontrol.html
2
%%PORTDOCS%%%%DOCSDIR%%/afs.html
3
%%PORTDOCS%%%%DOCSDIR%%/changes.html
4
%%PORTDOCS%%%%DOCSDIR%%/chroot.html
5
%%PORTDOCS%%%%DOCSDIR%%/comments.html
6
%%PORTDOCS%%%%DOCSDIR%%/download.html
7
%%PORTDOCS%%%%DOCSDIR%%/faq.html
8
%%PORTDOCS%%%%DOCSDIR%%/index.html
9
%%PORTDOCS%%%%DOCSDIR%%/install.html
10
%%PORTDOCS%%%%DOCSDIR%%/intro.html
11
%%PORTDOCS%%%%DOCSDIR%%/maillist.html
12
%%PORTDOCS%%%%DOCSDIR%%/notes.html
13
%%PORTDOCS%%%%DOCSDIR%%/pubs.html
14
%%PORTDOCS%%%%DOCSDIR%%/quickref.html
15
%%PORTDOCS%%%%DOCSDIR%%/setup.html
16
%%PORTDOCS%%%%DOCSDIR%%/thanks.html
17
%%PORTDOCS%%%%DOCSDIR%%/todo.html
18
%%PORTDOCS%%%%DOCSDIR%%/tricks.html
19
%%PORTDOCS%%%%DOCSDIR%%/y2k.html
20
www/cgi-bin/cgiwrap
1
www/cgi-bin/cgiwrap
21
%%CGIWRAPDFLAG%%www/cgi-bin/cgiwrapd
2
%%CGIWRAPDFLAG%%www/cgi-bin/cgiwrapd
22
www/cgi-bin/nph-cgiwrap
3
www/cgi-bin/nph-cgiwrap
23
%%CGIWRAPDFLAG%%www/cgi-bin/nph-cgiwrapd
4
%%CGIWRAPDFLAG%%www/cgi-bin/nph-cgiwrapd
24
@unexec rmdir %D/www/cgi-bin 2>/dev/null || true
5
@unexec rmdir %D/www/cgi-bin 2>/dev/null || true
25
%%PORTDOCS%%@dirrm %%DOCSDIR%%

Return to bug 71188