From owner-freebsd-stable@FreeBSD.ORG Sun Jul 26 12:06:25 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39ECA1065675; Sun, 26 Jul 2009 12:06:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8A0DB8FC0C; Sun, 26 Jul 2009 12:06:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n6QC68iq039514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Jul 2009 15:06:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n6QC68AT068406; Sun, 26 Jul 2009 15:06:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n6QC68UI068405; Sun, 26 Jul 2009 15:06:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 26 Jul 2009 15:06:08 +0300 From: Kostik Belousov To: Michael Butler Message-ID: <20090726120608.GE55190@deviant.kiev.zoral.com.ua> References: <4A6B0BD3.6040206@protected-networks.net> <4A6B9A60.90302@FreeBSD.org> <4A6BAC1A.5080303@protected-networks.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G2ySYTzNtMPdbLKn" Content-Disposition: inline In-Reply-To: <4A6BAC1A.5080303@protected-networks.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-stable , Jamie Gritton Subject: Re: regression with jexec? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2009 12:06:26 -0000 --G2ySYTzNtMPdbLKn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 25, 2009 at 09:06:34PM -0400, Michael Butler wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Jamie Gritton wrote: > > Michael Butler wrote: > >> imb@aaron:/home/imb> sudo jexec 5 tcsh > >> jexec: Unable to parse jail ID.: No such file or directory >=20 > >=20 > > The symptom in jexec can be fixed by this little patch: > >=20 > > Index: usr.sbin/jexec/jexec.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- usr.sbin/jexec/jexec.c (revision 195879) > > +++ usr.sbin/jexec/jexec.c (working copy) > > @@ -248,6 +248,7 @@ > > if (argc < 2) > > usage(); > > if (strlen(argv[0]) > 0) { > > + errno =3D 0; > > jid =3D (int)strtol(argv[0], NULL, 10); > > if (errno) > > err(1, "Unable to parse jail ID."); >=20 > Thanks - this certainly cures the effect. >=20 > > But the broader problem is malloc. It's leaving errno set to > > ENOENT when /etc/malloc.conf doesn't exist. This seems like > > wrong behavior to me. >=20 > Seems like a POLA violation to me, No, this is how errno generally work, it is not changed if no error happens. --G2ySYTzNtMPdbLKn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpsRq8ACgkQC3+MBN1Mb4gXRQCfcgfpWLjt7ZAb4sw3M1O49uyF VcUAni2LJXn2RVg3bbFTfKI4JI/8+nyt =fQzZ -----END PGP SIGNATURE----- --G2ySYTzNtMPdbLKn--