svn commit: r232181 - in head/sys: kern sys
kostikbel at gmail.com
Mon Feb 27 09:30:00 UTC 2012
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.
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 possible,
having the straighforward kernel facility is justified.
Patch puts the same restrictions on the caller as ptrace().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120227/f1c11379/attachment.pgp
More information about the svn-src-all