From owner-freebsd-audit@FreeBSD.ORG Fri Apr 1 14:35:41 2005 Return-Path: Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8877B16A4CE for ; Fri, 1 Apr 2005 14:35:41 +0000 (GMT) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38F0043D2F for ; Fri, 1 Apr 2005 14:35:41 +0000 (GMT) (envelope-from thomas@FreeBSD.ORG) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 86D092C3D0; Fri, 1 Apr 2005 16:35:39 +0200 (CEST) Date: Fri, 1 Apr 2005 16:35:39 +0200 From: Thomas Quinot To: freebsd-audit@freebsd.org Message-ID: <20050401143539.GA33480@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.8i Subject: yppush_main.c yppush_exit() recursion prevention X-BeenThere: freebsd-audit@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Security Audit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 14:35:41 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I intend to commit the following to HEAD in the forthcoming days, unless there is an objection to this change. When exitting upon an abnormal signal, yppush_exit() should not attempt to clear its pending jobs list, as this could trigger another signal, and cause an infinite recursion. What yppush_exit() tests in order to determine whether to flush pending jobs is the yppush_joblist chained list, so this is what needs to be cleared in that case (not the yppush_jobs counter). Index: yppush_main.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 RCS file: /home/ncvs/src/usr.sbin/yppush/yppush_main.c,v retrieving revision 1.19 diff -u -r1.19 yppush_main.c --- yppush_main.c 17 Oct 2004 19:33:33 -0000 1.19 +++ yppush_main.c 24 Dec 2004 15:38:59 -0000 @@ -208,7 +208,7 @@ handler(int sig) { if (sig =3D=3D SIGTERM || sig =3D=3D SIGINT || sig =3D=3D SIGABRT) { - yppush_jobs =3D 0; + yppush_joblist =3D NULL; yppush_exit(1); } =20 Thomas. --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCTVw6AE1UuDk9JGkRAmHuAJ4wNnQxlJZ0bXjEd8QKhE9nqedUqgCcDMk7 YGzbL42LcB36zZmcskUO138= =dygv -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--