From owner-freebsd-ports@FreeBSD.ORG Sat Jan 22 00:56:13 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2200D16A4CE for ; Sat, 22 Jan 2005 00:56:13 +0000 (GMT) Received: from sushi.quinn.com (dsl081-244-007.sfo1.dsl.speakeasy.net [64.81.244.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB5F543D1D for ; Sat, 22 Jan 2005 00:56:12 +0000 (GMT) (envelope-from fcondo@quinn.com) Received: from [10.0.0.15] (dsl081-244-060.sfo1.dsl.speakeasy.net [64.81.244.60]) (authenticated bits=0) by sushi.quinn.com (8.12.11/8.12.11) with ESMTP id j0M0uBK2009459 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Fri, 21 Jan 2005 16:56:12 -0800 (PST) (envelope-from fcondo@quinn.com) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <672DC1EE-6C10-11D9-9754-003065C7DFE8@quinn.com> Content-Transfer-Encoding: 7bit From: Fred Condo Date: Fri, 21 Jan 2005 16:56:09 -0800 To: freebsd-ports@freebsd.org X-Mailer: Apple Mail (2.619) cc: Michael Collette Subject: Re: MySQL 4.0.23a on 5-STABLE has a startup glitch X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2005 00:56:13 -0000 On Jan 21, 2005, at 2:43 PM, Michael Collette wrote: > On 5-STABLE I am unable to get mysql-server-4.0.23a to start with the > rcng script. Upon launching the script it dumps me to a prompt owned > by the mysql user. I have run into one other user on the mailing > lists with the same exact problem. > > Details: > In /etc/rc.conf the following is set: > mysql_enable="YES" > > I am able to start up mysqld_safe manually. > > I am also able to use the old rc script to get a proper startup for > MySQL. Only the rcng script fails in this manner. > > This leads me to a couple of concerns beyond just getting MySQL to > run, as I've just switched on over to the old rc script. > > Is everyone having this problem with the rcng script or is it just a > few of us? > How is the mysql user able to drop to a command prompt at all? Are > there some security issues here? > Should the port be modified back to the old rc script until this > problem is corrected? I'm seeing identical behavior under FreeBSD 4.10-p5 with MySQL 4.1.9. I finally traced the execution of the startup script by invoking it as: sh -x /usr/local/etc/rc.d/mysql-server.sh start The resulting output showed this detail: + su -m mysql -c sh -c "/usr/local/bin/mysqld_safe --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/OBFUSCATED.pid > /dev/null &" bash: no job control in this shell (I'll make the entire trace available on request.) Googling for "bash: no job control in this shell" comes up with a lot of discussions about buffer overrun exploits. That plus the fact that I did not expect bash to be involved in running the startup script has me concerned that the machine has been compromised. I built a fresh 4.10-p5 box and installed MySQL 4.1.9. That box does not exhibit the misbehavior. The misbehaving machine has been running MySQL 3.x and started life on FreeBSD 4.8 or possibly earlier. Has anyone got thoughts about where else to look for relevant differences between a fresh installation and an upgraded installation? I'll be glad to respond to specific queries about configurations.