From owner-freebsd-bugs@freebsd.org Thu Sep 8 18:02:06 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF4A6BD2177 for ; Thu, 8 Sep 2016 18:02:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D48CA7CD for ; Thu, 8 Sep 2016 18:02:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u88I261T036404 for ; Thu, 8 Sep 2016 18:02:06 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 212493] /etc/rc.subr's new limits + chdir will cause limits to run on chdir instead of _doit Date: Thu, 08 Sep 2016 18:02:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: needs-qa, patch-ready X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: Ultima1252@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 18:02:07 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212493 Bug ID: 212493 Summary: /etc/rc.subr's new limits + chdir will cause limits to run on chdir instead of _doit Product: Base System Version: 11.0-STABLE Hardware: Any OS: Any Status: New Keywords: needs-qa, patch-ready Severity: Affects Only Me Priority: --- Component: misc Assignee: freebsd-bugs@FreeBSD.org Reporter: Ultima1252@gmail.com Created attachment 174540 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174540&action= =3Dedit rc.subr.diff Recently I was having issues with a port after upgrading from 10.3 to 11. (= This bug also exists on head) When the chdir var is used, the limits command wil= l be prepended to chdir instead of the prog. This can, and in my case caused the= cd command to fail and the program will fail to start. i'm going to omit much of the debugging info and paste the useful points. Current rc.subr: + _doit=3D'limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak /usr/local/libexec/ts3server dbsqlpath=3D/usr/local/share/teamspeak/server/= sql/ inifile=3D/usr/local/etc/teamspeak/ts3server.ini licensepath=3D/usr/local/etc/teamspeak/ logpath=3D/var/log/teamspeak' + _run_rc_doit 'limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon = -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak /usr/local/libexec/ts3server dbsqlpath=3D/usr/local/share/teamspeak/server/= sql/ inifile=3D/usr/local/etc/teamspeak/ts3server.ini licensepath=3D/usr/local/etc/teamspeak/ logpath=3D/var/log/teamspeak' + debug 'run_rc_command: doit: limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak /usr/local/libexec/ts3server dbsqlpath=3D/usr/local/share/teamspeak/server/= sql/ inifile=3D/usr/local/etc/teamspeak/ts3server.ini licensepath=3D/usr/local/etc/teamspeak/ logpath=3D/var/log/teamspeak' + eval 'limits -C daemon cd /var/db/teamspeak && /usr/sbin/daemon -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak /usr/local/libexec/ts3server dbsqlpath=3D/usr/local/share/teamspeak/server/= sql/ inifile=3D/usr/local/etc/teamspeak/ts3server.ini licensepath=3D/usr/local/etc/teamspeak/ logpath=3D/var/log/teamspeak' + limits -C daemon cd /var/db/teamspeak + /usr/sbin/daemon -fp /var/db/teamspeak/teamspeak_server.pid -u teamspeak /usr/local/libexec/ts3server 'dbsqlpath=3D/usr/local/share/teamspeak/server= /sql/' 'inifile=3D/usr/local/etc/teamspeak/ts3server.ini' 'licensepath=3D/usr/local/etc/teamspeak/' 'logpath=3D/var/log/teamspeak' Attached, I have created a small change to rc.subr that fixes this issue. --=20 You are receiving this mail because: You are the assignee for the bug.=