Re: getent: prefer usernames over UIDs

2018-11-01 Thread Todd C. Miller
On Fri, 02 Nov 2018 00:45:06 +0100, Klemens Nanni wrote: > On Thu, Nov 01, 2018 at 06:37:15PM -0400, Ted Unangst wrote: > > yes, this is how it should be. please fix group lookup as well. > Was in the queue for a separate diff, here it goes together. Looks good. OK millert@ - todd

Re: getent: prefer usernames over UIDs

2018-11-01 Thread Klemens Nanni
On Thu, Nov 01, 2018 at 06:37:15PM -0400, Ted Unangst wrote: > yes, this is how it should be. please fix group lookup as well. Was in the queue for a separate diff, here it goes together. Index: getent.c === RCS file:

Re: getent: prefer usernames over UIDs

2018-11-01 Thread Ted Unangst
Klemens Nanni wrote: > Prompted by tedu@'s recent reply, here's a fix for getent(1) to lookup > keys as UIDs only if the username lookup fails to prevent clobbering > numerical usernames. yes, this is how it should be. please fix group lookup as well.

getent: prefer usernames over UIDs

2018-11-01 Thread Klemens Nanni
Prompted by tedu@'s recent reply, here's a fix for getent(1) to lookup keys as UIDs only if the username lookup fails to prevent clobbering numerical usernames. $ getent passwd 1000 kn kn:*:1000:1000:Klemens Nanni:/home/kn:/bin/ksh kn:*:1000:1000:Klemens