cygheap_pwdgrp: Handle invalid db_* entries correctly

If the first scheme in db_* was invalid, the code would think there
were no schemes specified and replace the second scheme with
NSS_SCHEME_DESC.

Signed-off-by: David Macek <david.macek.0@gmail.com>
This commit is contained in:
David Macek via Cygwin-patches 2020-04-16 23:09:07 +02:00 committed by Corinna Vinschen
parent 1fac24078a
commit 5951b3e600
1 changed files with 4 additions and 1 deletions

View File

@ -823,7 +823,10 @@ cygheap_pwdgrp::nss_init_line (const char *line)
c, e - c);
}
else
{
debug_printf ("Invalid nsswitch.conf content: %s", line);
--idx;
}
c += strcspn (c, " \t");
c += strspn (c, " \t");
++idx;