[patch] Incorrect umask in FreeBSD

Damien Miller djm at mindrot.org
Fri Mar 15 11:23:02 EST 2013

On Wed, 13 Mar 2013, Dag-Erling Sm?rgrav wrote:

> Normally, in the !UseLogin case on a system with login classes, the
> umask is set implicitly by the first setusercontext() call in
> do_setusercontext() in session.c.  However, FreeBSD treats the umask
> differently from other login settings: unless running with the target
> user's UID, it will only apply the value from /etc/login.conf, not that
> from the user's ~/.login.conf.  The patch below addresses this (although
> not in the most efficient manner, which would be to add LOGIN_SETUMASK
> to the LOGIN_SETUSER call).  It is harmless on systems (such as OpenBSD)
> which have login classes but do not share this particular idiosyncrasy
> with FreeBSD.

Committed - this will be in the 20130316 snapshot too.


More information about the openssh-unix-dev mailing list