Re: [patch] getdef.c and login.defs

Tomasz Kłoczko <[email protected]> Mon, 9 May 2005 12:46:45 +0200 (CEST)
Newsgroups gmane.linux.pld.shadow.general
Message-ID <[email protected]>
On Fri, 6 May 2005, Lucas Correia Villa Real wrote:

> Hi,
> 
> getdef.c has a table to search for tokens used on login.defs. This table 
> (def_table) must be sorted, since def_find() uses a binary search to look for 
> these tokens.
> 
> However, the table is not sorted, and doing that will require putting a lot of 
> #ifdefs, making the code very ugly.
> 
> This patch is not optimal -- it just leaves the table as it is, and changes 
> from the binary search to a sequential one. Since the list is very small, the 
> overhead is very short.
> 
> Feel free to use or modify it to use a better algorithm. I just wanted to 
> provide a quick fix to that problem.

Thank you. Commited to CVS tree.

kloczek
-- 
-----------------------------------------------------------
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
-----------------------------------------------------------
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*