Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2012 09:59:37 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Mikolaj Golub <trociny@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov <kib@FreeBSD.org>
Subject:   Re: svn commit: r232181 - in head/sys: kern sys
Message-ID:  <20120227085937.GD1363@garage.freebsd.pl>
In-Reply-To: <864nucd5jc.fsf@in138.ua3>
References:  <201202261425.q1QEPm9g069102@svn.freebsd.org> <20120227082811.GC1363@garage.freebsd.pl> <864nucd5jc.fsf@in138.ua3>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Mon, Feb 27, 2012 at 10:49:59AM +0200, Mikolaj Golub wrote:
> 
> On Mon, 27 Feb 2012 09:28:11 +0100 Pawel Jakub Dawidek wrote:
> 
>  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
>  >> 
>  >> Log:
>  >>   Add sysctl to retrieve or set umask of another process.
> 
>  PJD> "set umask of another process"? This seems... weird. What's the purpose
>  PJD> of this change?
> 
> When we were discussing this with Kostik and Robert, and I asked if it could
> be useful to have the sysctl rw, Kostik described a real situation when he had
> had to change umask of another process: umask had not been set properly on 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 useful.

As a debugging feature it might be useful, but I wonder if we don't open
Pandora's box, as I can see the same arguments for being able to change
process current working directory, its real/effective/saved uid/gid, its
groups, etc. Application can get really confused by this. From what I
see we require the process to have permission to debug the target
process, which is fine, but wherever it is documented I'd like there be
a warning this is for debug purposes and can confuse application.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk9LRfgACgkQForvXbEpPzRxAgCgj+2KdqWT9VW3M+W5eE02ldpU
zkQAnjAykxiGlnkZjDXHZqRoT7JEL7Z6
=jAZN
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120227085937.GD1363>