From yasu@home.utahime.org  Fri Jun 18 05:09:57 2004
Return-Path: <yasu@home.utahime.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B287F16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Jun 2004 05:09:57 +0000 (GMT)
Received: from utahime.as.wakwak.ne.jp (utahime.as.wakwak.ne.jp [61.205.238.40])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3D2AF43D2F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Jun 2004 05:09:57 +0000 (GMT)
	(envelope-from yasu@home.utahime.org)
Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1])
	by utahime.as.wakwak.ne.jp (Postfix) with ESMTP id 85DEBA970
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 18 Jun 2004 14:08:43 +0900 (JST)
Received: from localhost.home.utahime.org (localhost.home.utahime.org [127.0.0.1])
	by localhost-backdoor.home.utahime.org (Postfix) with ESMTP id 59E13551C;
	Fri, 18 Jun 2004 14:08:43 +0900 (JST)
Received: from eastasia.home.utahime.org (localhost.home.utahime.org [127.0.0.1])
	by localhost.home.utahime.org (AvMailGate-2.0.2-5) id 62053-49966214;
	Fri, 18 Jun 2004 14:08:43 +0900
Received: by eastasia.home.utahime.org (Postfix, from userid 1000)
	id 3EE7E54EF; Fri, 18 Jun 2004 14:08:43 +0900 (JST)
Message-Id: <20040618050843.3EE7E54EF@eastasia.home.utahime.org>
Date: Fri, 18 Jun 2004 14:08:43 +0900 (JST)
From: KIMURA Yasuhiro <yasu@utahime.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] net/socks5 Current startup script doesn't check if configuration file for socks5 daemon exists
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         68067
>Category:       ports
>Synopsis:       [PATCH] net/socks5 Current startup script doesn't check if configuration file for socks5 daemon exists
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 18 05:10:25 GMT 2004
>Closed-Date:    Sat Jun 19 10:54:39 GMT 2004
>Last-Modified:  Sat Jun 19 10:54:39 GMT 2004
>Originator:     KIMURA Yasuhiro
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
>Environment:
System: FreeBSD eastasia.home.utahime.org 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Fri May 28 04:49:31 JST 2004 root@eastasia.home.utahime.org:/usr/obj/usr1/cvsup/releng_4_10/src/sys/EASTASIA i386


	
>Description:
	

	Current startup script doesn't check if ${PREFIX}/etc/socks5.conf
        exist and starts daemon even if there is no configuration file,
        which results in following error message.

	Jun 18 13:47:46 eastasia Socks5[247]: Config: Error opening config file (/usr/local/etc/socks5.conf): No such file or directory

>How-To-Repeat:
	
>Fix:

	

	Apply the patch below.

--- socks5.patch begins here ---
diff -ruN socks5.dist/Makefile socks5/Makefile
--- socks5.dist/Makefile	Wed Apr  7 12:24:10 2004
+++ socks5/Makefile	Fri Jun 18 13:42:35 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	socks5
 PORTVERSION=	1.0.11
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	net security
 DISTNAME=	socks5-v1.0r11
 
diff -ruN socks5.dist/files/socks5.sh.sample socks5/files/socks5.sh.sample
--- socks5.dist/files/socks5.sh.sample	Sat Apr  3 04:39:10 2004
+++ socks5/files/socks5.sh.sample	Fri Jun 18 13:48:56 2004
@@ -7,7 +7,7 @@
 
 case "$1" in
 start)
-	[ -x ${PREFIX}/bin/socks5 ] && ${PREFIX}/bin/socks5 && echo -n ' socks5'
+	[ -x ${PREFIX}/bin/socks5 -a -f ${PREFIX}/etc/socks5.conf ] && ${PREFIX}/bin/socks5 && echo -n ' socks5'
 	;;
 stop)
 	killall socks5 && echo -n ' socks5'
--- socks5.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: vs 
State-Changed-When: Sat Jun 19 10:53:26 GMT 2004 
State-Changed-Why:  
Committed with modifications, thanks! 
(No need to bump PORTREV; get additional points for rcNGifying the script :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=68067 
>Unformatted:
