mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-29 10:18:30 +00:00
Instead of marking this port FORBIDDEN, show a security warning and ask
if the user wants to proceed (unless BATCH is set) at pre-fetch and pre-install. Make the same query at pkg_add time. While I'm at it, - Move the URI to DESCR from Makefile. - Replace a few = with ?= - Instead of using echo in Makefile to create the sample startup script, use a template.
This commit is contained in:
parent
4b63006991
commit
5534fb1e60
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=21480
@ -1,5 +1,4 @@
|
||||
# New ports collection makefile for: youbin
|
||||
# http://www.agusa.nuie.nagoya-u.ac.jp/software/youbin/youbin-e.html
|
||||
# Version required: 2.13
|
||||
# Date created: 09 Aug 1996
|
||||
# Whom: Masafumi NAKANE <max@FreeBSD.org>
|
||||
@ -16,11 +15,9 @@ MAINTAINER= max@FreeBSD.org
|
||||
|
||||
LIB_DEPENDS= Xpm.4:${PORTSDIR}/graphics/xpm
|
||||
|
||||
FORBIDDEN= see PR# 6180 about exploitable security hole
|
||||
|
||||
USE_IMAKE= yes
|
||||
PREFIX= ${LOCALBASE}
|
||||
MTREE_FILE= /etc/mtree/BSD.local.dist
|
||||
PREFIX?= ${LOCALBASE}
|
||||
MTREE_FILE?= /etc/mtree/BSD.local.dist
|
||||
|
||||
MAN1= youbin.1
|
||||
MAN3= youbin_sub.3
|
||||
@ -28,16 +25,18 @@ MAN8= youbind.8
|
||||
|
||||
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/youbind.sh.sample
|
||||
|
||||
pre-fetch:
|
||||
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGDIR}/REQ ${PKGNAME} BUILD
|
||||
|
||||
pre-install:
|
||||
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGDIR}/REQ ${PKGNAME} INSTALL
|
||||
|
||||
post-install:
|
||||
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
|
||||
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
|
||||
${ECHO} "Creating startup script '${STARTUP_SCRIPT}'" ; \
|
||||
${ECHO} "#!/bin/sh" > ${STARTUP_SCRIPT} ; \
|
||||
${ECHO} "if [ -f ${PREFIX}/sbin/youbind ]; then" \
|
||||
>> ${STARTUP_SCRIPT} ; \
|
||||
${ECHO} " ${PREFIX}/sbin/youbind ; ${ECHO} -n ' youbind'" \
|
||||
>> ${STARTUP_SCRIPT} ; \
|
||||
${ECHO} "fi" >> ${STARTUP_SCRIPT} ; \
|
||||
${CHMOD} 755 ${STARTUP_SCRIPT} ; \
|
||||
${SED} s:@PREFIX@:${PREFIX}: ${FILESDIR}/youbind.sh.sample \
|
||||
> ${STARTUP_SCRIPT} ; \
|
||||
${CHMOD} 755 ${STARTUP_SCRIPT} ; \
|
||||
fi
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
|
||||
|
||||
|
10
mail/youbin/files/youbind.sh.sample
Normal file
10
mail/youbin/files/youbind.sh.sample
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# CAUTION:
|
||||
# Youbin has potentail security problem.
|
||||
# If this program is used on your system, great care must be taken
|
||||
# to avoid any security problem.
|
||||
#
|
||||
if [ -x @PREFIX@/sbin/youbind ]; then
|
||||
@PREFIX@/sbin/youbind ; echo -n ' youbind'
|
||||
fi
|
@ -12,4 +12,5 @@ Since youbin is designed with event driven, the user is promptly
|
||||
informed of status change of mail spool caused by arrival of new
|
||||
message and/or reading messages.
|
||||
|
||||
- Masafumi
|
||||
WWW: http://www.agusa.nuie.nagoya-u.ac.jp/software/youbin/youbin-e.html
|
||||
- Max
|
||||
|
23
mail/youbin/pkg-req
Normal file
23
mail/youbin/pkg-req
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
case "$2" in
|
||||
INSTALL|BUILD)
|
||||
echo '**********************************************************************'
|
||||
echo '* WARNING!!! *'
|
||||
echo '* Youbin has potential security problem!! *'
|
||||
echo '* It is discouraged to use this program to avoid any security *'
|
||||
echo '* problem. *'
|
||||
echo '**********************************************************************'
|
||||
if [ "X${BATCH}" = "Xyes" ]; then
|
||||
exit 0
|
||||
fi
|
||||
read -p 'Would you like to proceed (y/n)? ' ans
|
||||
case "X$ans" in
|
||||
Xy*|XY*)
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user