Subject: Re: magic symlinks: uid keyword translation
To: Dr R.S. Brooks <R.S.Brooks@liverpool.ac.uk>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 10/30/2006 16:29:31
--chE8DYtGH5bd9Y2b
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 30, 2006 at 03:24:10PM +0000, Dr R.S. Brooks wrote:
> On Mon, 30 Oct 2006, Quentin Garnier wrote:
>=20
> >On Mon, Oct 30, 2006 at 04:57:51PM +0200, Elad Efrat wrote:
> >>Quentin Garnier wrote:
> >>>On Mon, Oct 30, 2006 at 02:50:14PM +0200, Elad Efrat wrote:
> >>>>hi,
> >>>>
> >>>>attached diff adds a "uid" keyword translation for magic symlinks.
> >>>>
> >>>>any objections?
> >>>
> >>>s/16/LOGIN_NAME_MAX/
> >>
> >>why?
> >
> >1. raw numbers like this are wrong.
> >2. the best example of 1. is that LOGIN_NAME_MAX is 17.
> >3. someone might wish to run a system with a different LOGIN_NAME_MAX,
> >  for whatever reason (although it's not recommended, and not made
> >  easy either).
>=20
> But unless I'm mistaken, the code below will substitute the numeric UID
> (as a string of ASCII digits).  And trying to do a numeric UID to login

Hum, right.  I was mislead by the "16", which in that case is a bit
much (UID_MAX is 10 digit long).

1. still holds, then.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--chE8DYtGH5bd9Y2b
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iQEVAwUBRUYaWtgoQloHrPnoAQKrgQf8DhfyOrWtZw6vcY5Dx9b1os7ZKzfyDkB0
R1WC8Ig/AY67cFDWLkPGHobg/egZp+wpJTDD+Zkvl6xyqgXVr67T2WVAP3TeouyK
rGk7QxL4PUnT7lLYaJwVaW/L97ECXpF36JTenBdAZX3upe3cAQgenG9+b1cJyv1z
RT9koXw4qnmYz+35FVuuPx8KJC1ly6n7A3xKhFyuWl2QB4qGkUbUv5IVV1Xs1J4w
dWQAWrZ0v3qiLHNz8q4q/xx2KDIWMQYnffe8odYTBDxqv6J2zHDKgbjPwgubHdKS
n3tqQh5ten7ohDxSXQd8+AMrWriwMlNTlAita6wYAejkTkSfuWcoMw==
=Z/WE
-----END PGP SIGNATURE-----

--chE8DYtGH5bd9Y2b--