This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ruserok scalability with large ~/.rhosts file.

On 07/08/2015 02:30 AM, Mike Frysinger wrote:
> On 18 Jun 2015 11:50, Carlos O'Donell wrote:
>> --- a/inet/rcmd.c
>> +++ b/inet/rcmd.c
>> +	/* First check the user part.  This is an optimization, since
>> +	   one should always check the host first in order to detect
>> +	   negative host checks (which we check for later).  */
>> +	ucheck = __icheckuser (user, ruser);
> the phrasing in this comment sounds confused, or maybe misleading ?

Rewritten as:

        /* First check the user part.  In a naive implementation we
           would check the host part first, then the user.  However,
           if we check the user first and reject the entry we will
           have saved doing any host lookups to normalize the comparison
           and that likely saves several DNS queries.  Therefore we
           check the user first.  */

>> +	    /* Next check host part */
> style is incorrect (period/trailing space)


Given your review and no objections, and the testing we've done
on x86_64, i686, aarch64, s390, s390x, ppc64, and ppc64le I'm
considering this OK.

Checked in.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]