From owner-freebsd-hackers@freebsd.org Wed Dec 23 21:35:29 2015 Return-Path: Delivered-To: freebsd-hackers@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 66680A50F7B; Wed, 23 Dec 2015 21:35:29 +0000 (UTC) (envelope-from vsasjason@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 066A81510; Wed, 23 Dec 2015 21:35:29 +0000 (UTC) (envelope-from vsasjason@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id p187so160961372wmp.1; Wed, 23 Dec 2015 13:35:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0F2IHeRQ64w18PCpVPEB53eoRa0dGT+Q71C17iBbv9o=; b=KA976zFCzf6zc1JAKmjYWv8JXl23clMvR5GETp4weMipOkLB1/RMUOqddb4nrdT8pr juh8Ve4TS3403duYN98OKnof/Mr+2UR/chXlBMK2CNtT/t9pGMX/aewQGJcEj//+8ll2 gMCw25vWtuPsf3pbfxB0wkPyuwB43Yc7A0c32eHWzqXHJsEXyih950m/oUB1hKOoeyHT HAbRTcdf36jHKJ7gHk1RL/zi8SrNI1/hvVT1fBt7VexoIZN/KhQTIzf91LHMdOTBkrzQ oJYeloQoQzkKuFTXSseM76fKzzzXC1voOXVrNXSeE7ud6UqHGEuaU1B/wNb1o9ZJF+Yq 3cog== MIME-Version: 1.0 X-Received: by 10.28.141.140 with SMTP id p134mr36500239wmd.6.1450906527390; Wed, 23 Dec 2015 13:35:27 -0800 (PST) Received: by 10.194.76.207 with HTTP; Wed, 23 Dec 2015 13:35:26 -0800 (PST) Received: by 10.194.76.207 with HTTP; Wed, 23 Dec 2015 13:35:26 -0800 (PST) In-Reply-To: <20151223213351.GA1304@becker.bs.l> References: <20151221164338.GB33124@becker.bs.l> <20151223213351.GA1304@becker.bs.l> Date: Thu, 24 Dec 2015 00:35:26 +0300 Message-ID: Subject: Re: PATH variable in lpd's process From: Anton Sayetsky To: FreeBSD Questions , freebsd-hackers@freebsd.org X-Mailman-Approved-At: Wed, 23 Dec 2015 22:19:01 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 21:35:29 -0000 23 =D0=B4=D0=B5=D0=BA. 2015 =D0=B3. 23:34 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0= =BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Bertram Scharpf" < lists@bertram-scharpf.de> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > > Hi, > > On Monday, 21. Dec 2015, 17:43:38 +0100, Bertram Scharpf wrote: > > in my "/etc/printcap", the "if" field points to an input > > filter I wrote in Ruby. There, the first line is a shebang > > saying > > > > #!/usr/bin/env ruby > > > > Further there is > > > > # procstat -e `pgrep lpd` > > PID COMM ENVIRONMENT > > 940 lpd PATH=3D/sbin:/bin:/usr/sbin:/usr/bin PWD=3D/ HOME=3D/ RC_PID=3D20 > > > > As you can easily see, I will receive a mail saying the > > print job failed because of > > > > env: ruby: No such file or directory > > > > When I restart "lpd" from the command line, the new process > > receives the environment variables from the shell process > > and everything ist fine. > > > > [...] > > > > "/etc/crontab" allows to reset the PATH variable but I do > > not see a way to do the same in "/etc/printcap". > > I decided unhesitatingly to extend the lpd printcap > mechanism and I added a filter-path variable that will be > put into the filter processes before calling exec there. > > I think this should be part of the official FreeBSD release. > Where is the right place to propose it? http://bugs.FreeBSD.org