From owner-svn-src-head@FreeBSD.ORG Mon Feb 27 09:30:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3843E106566B; Mon, 27 Feb 2012 09:30:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9DCCE8FC0C; Mon, 27 Feb 2012 09:29:58 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q1R9TpnX056319; Mon, 27 Feb 2012 11:29:51 +0200 (EET) (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.5/8.14.5) with ESMTP id q1R9Tp0Q032962; Mon, 27 Feb 2012 11:29:51 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q1R9Tpv0032961; Mon, 27 Feb 2012 11:29:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 27 Feb 2012 11:29:51 +0200 From: Konstantin Belousov To: Mikolaj Golub Message-ID: <20120227092951.GB55074@deviant.kiev.zoral.com.ua> References: <201202261425.q1QEPm9g069102@svn.freebsd.org> <20120227082811.GC1363@garage.freebsd.pl> <864nucd5jc.fsf@in138.ua3> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y7P0gPYVJgs55uY0" Content-Disposition: inline In-Reply-To: <864nucd5jc.fsf@in138.ua3> 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.0 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: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek Subject: Re: svn commit: r232181 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2012 09:30:00 -0000 --Y7P0gPYVJgs55uY0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2012 at 10:49:59AM +0200, Mikolaj Golub wrote: >=20 > On Mon, 27 Feb 2012 09:28:11 +0100 Pawel Jakub Dawidek wrote: >=20 > PJD> On Sun, Feb 26, 2012 at 02:25:48PM +0000, Mikolaj Golub wrote: > >> Author: trociny > >> Date: Sun Feb 26 14:25:48 2012 > >> New Revision: 232181 > >> URL: http://svn.freebsd.org/changeset/base/232181 > >>=20 > >> Log: > >> Add sysctl to retrieve or set umask of another process. >=20 > PJD> "set umask of another process"? This seems... weird. What's the pur= pose > PJD> of this change? >=20 > When we were discussing this with Kostik and Robert, and I asked if it co= uld > be useful to have the sysctl rw, Kostik described a real situation when h= e had > had to change umask of another process: umask had not been set properly o= n an > aplication start but it could not be restarted until the end of the day. > Kostik was able to fix it using gdb but having an easier way looked usefu= l. kgdb, not gdb. It is indeed possible to write a ptrace-based utility that inject a code payload that would change umask. Since this is very risky but indeed possib= le, having the straighforward kernel facility is justified. Patch puts the same restrictions on the caller as ptrace(). --Y7P0gPYVJgs55uY0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9LTQ8ACgkQC3+MBN1Mb4hLYwCgh2jXh1tdvHOXqfJCry0ZkJPM kE4AoMz88aIr1aT7ZpoevFODTzVhiw63 =KTy8 -----END PGP SIGNATURE----- --Y7P0gPYVJgs55uY0--