Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2012 07:45:23 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        arch@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>
Subject:   Re: Increasing MAXLOGNAME from 17 to 33
Message-ID:  <20121114054523.GU73505@kib.kiev.ua>
In-Reply-To: <75177878-EA36-4472-BAEA-984A59F91057@bsdimp.com>
References:  <20121113111806.GE62533@ithaqua.etoilebsd.net> <20121113115034.GJ73505@kib.kiev.ua> <20121113183412.GA75103@ithaqua.etoilebsd.net> <20121113184238.GO73505@kib.kiev.ua> <20121113184512.GP73505@kib.kiev.ua> <20121113225905.GB75103@ithaqua.etoilebsd.net> <75177878-EA36-4472-BAEA-984A59F91057@bsdimp.com>

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

--QJR8KKzOCBB+4dVz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 13, 2012 at 04:04:33PM -0700, Warner Losh wrote:
>=20
> On Nov 13, 2012, at 3:59 PM, Baptiste Daroussin wrote:
>=20
> > On Tue, Nov 13, 2012 at 08:45:12PM +0200, Konstantin Belousov wrote:
> >> On Tue, Nov 13, 2012 at 08:42:38PM +0200, Konstantin Belousov wrote:
> >>> On Tue, Nov 13, 2012 at 07:34:12PM +0100, Baptiste Daroussin wrote:
> >>>> On Tue, Nov 13, 2012 at 01:50:34PM +0200, Konstantin Belousov wrote:
> >>>>> On Tue, Nov 13, 2012 at 12:18:06PM +0100, Baptiste Daroussin wrote:
> >>>>>> Hi,
> >>>>>>=20
> >>>>>> I want to increase MAXLOGNAME in sys/param.h from 17 to 33 to allo=
w 32-character
> >>>>>> long usernames, the PR: misc/161091 and misc/133926 already reques=
ted for it.
> >>>>>>=20
> >>>>>> utmpx already allow 32 character long user names.
> >>>>>>=20
> >>>>>> I plan to bump the __FreeBSD_version at the same time because of t=
he ABI
> >>>>>> breakage.
> >>>>>>=20
> >>>>>> This is simplify life of lots administrator, this value, is a comm=
on value for
> >>>>>> other operating systems.
> >>>>>>=20
> >>>>>> Do anyone have objections about it?
> >>>>>=20
> >>>>> Yes, I have. Do not break the ABI, it is plain prohibited.
> >>>>> You might consider increasing the constant only if providing ABI
> >>>>> compatibility shims.
> >>>>>=20
> >>>>> In fact, the cursory look over the whole base system indicates that=
 ABI
> >>>>> breakage might be not that big and could be mitigated with relative=
ly
> >>>>> limited amount of the efforts.
> >>>>=20
> >>>> Thanks cognet for the help on the following.
> >>>>=20
> >>>> After auditing base, it seems like this patch is enough
> >>>> http://people.freebsd.org/~bapt/maxlogname-33.diff
> >>> Regarding the patch, the dereferencing of p->p_session should be done
> >>> under the proc lock to guarantee stability of p_pgrp, and under sessi=
on
> >>> mutex to prevent s_login modifications. Altogether, this means that t=
he
> >>> if() shall be moved down right before bcopy and locks unlocked on ret=
urn.
> >>>=20
> >> Sorry, sent the reply too early.
> >>=20
> >> The alternative is to check for the length of the local 'login' variab=
le
> >> after unlocks, right before copyout.
> >>=20
> > like this?
> > http://people.freebsd.org/~bapt/report-erange-if-login-is-larger-then-M=
AXLOGNAME.diff
>=20
> Isn't that check too late?
>=20

No, it is not, The uap->namelen is clamped before the block shown in the
patch. I think that the patch is fine and should be merged into stable
branches as well.

While there, you could add a space between 'return' and '(' in the last
line of the sys_getlogin(), in separate commit.

Thanks.

--QJR8KKzOCBB+4dVz
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEUEARECAAYFAlCjL/MACgkQC3+MBN1Mb4jsuwCfbB3jKttSWxgygkBP/zLgaxJO
s5EAmIZmvAqICNYDa/xakg5L29cO9Cc=
=V9cY
-----END PGP SIGNATURE-----

--QJR8KKzOCBB+4dVz--



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