Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 09:57:13 -0500 (EST)
From:      Dan Langille <dan@freebsddiary.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        Anton Voronin <anton@urc.ac.ru>
Subject:   ports/34451: security/drweb-sendmail: check that a variable exists before testing it
Message-ID:  <200201301457.g0UEvD722613@gus.unixathome.org>

next in thread | raw e-mail | index | archive | help

>Number:         34451
>Category:       ports
>Synopsis:       security/drweb-sendmail: check that a variable exists before testing it
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 30 07:00:04 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dan Langille
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
The FreeBSD Diary
>Environment:
System: FreeBSD gus.unixathome.org 4.5-STABLE FreeBSD 4.5-STABLE #0: Tue Jan 29 00:15:38 EST 2002 dan@xeon.unixathome.org:/usr/obj/usr/src/sys/GUS i386


>Description:
	
	See 200201301409.g0UE9mq13155@lists.unixathome.org in freebsd-ports
	for original message.

	Variable are being tested which may not exist.  Therefore, check
	that they are defined first.

	See also http://www.freebsd.org/cgi/query-pr.cgi?pr=34032

	My thanks to Alan Eldridge for pointing out the above PR.

>How-To-Repeat:
	Testing may be difficult as you need a machine on which the variables
	are not defined.  Here is the result:

>Fix:

--- /home/lists-test/Makefile	Wed Jan 30 09:50:03 2002
+++ Makefile	Wed Jan 30 09:47:10 2002
@@ -59,10 +59,10 @@
 	${MKDIR} ${WRKSRC}/libmilter ${WRKSRC}/libsmutil
 	${CP} ${FILESDIR}/Makefile.libmilter ${WRKSRC}/libmilter/Makefile
 	${CP} ${FILESDIR}/Makefile.libsmutil ${WRKSRC}/libsmutil/Makefile
-.if ${SENDMAIL_VERSION} == "8.11.1"
+.if defined(SENDMAIL) && ${SENDMAIL_VERSION} == "8.11.1"
 	${CP} ${WITH_DRWEBSMF_SENDMAIL_DIR}/libmilter/listener.c ${WRKSRC}/libmilter
 	cd ${WRKSRC}/libmilter && ${PATCH} < ${WRKSRC}/../sendmail/listener-8.11.1.patch
-.elif ${SENDMAIL_VERSION} == "8.12.0"
+.elif defined(SENDMAIL) && ${SENDMAIL_VERSION} == "8.12.0"
 	${CP} ${WITH_DRWEBSMF_SENDMAIL_DIR}/libmilter/listener.c ${WRKSRC}/libmilter
 	cd ${WRKSRC}/libmilter && ${PATCH} < ${WRKSRC}/../sendmail/listener-8.12.0.patch
 .endif
>Release-Note:
>Audit-Trail:
>Unformatted:
 >[root@gus:/usr/ports/security/drweb-sendmail] #  make -V PORTVERSION
 "Makefile", line 62: Malformed conditional (${SENDMAIL_VERSION} == 
 "8.11.1")
 "Makefile", line 62: Need an operator
 "Makefile", line 65: if-less elif
 "Makefile", line 65: Need an operator
 "Makefile", line 68: if-less endif
 "Makefile", line 68: Need an operator
 make: fatal errors encountered -- cannot continue
 
 After applying the supplied patch:
 
 #  make -V PORTVERSION
 4.27
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201301457.g0UEvD722613>