This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Fix for PR libc/1833



PR libc/1833 reported some problems with /etc/ethers.  I've reproduced
them and have now committed the appended patch.

Andreas

2000-08-01  Andreas Jaeger  <aj@suse.de>

	* nss/nss_files/files-ethers.c: Use case-insensitive lookup.
	(LINE_PARSER): Allow any number of spaces between ip address and number.
	Fixes PR libc/1833, reported by rp010gf@voruta.vu.lt.

============================================================
Index: nss/nss_files/files-ethers.c
--- nss/nss_files/files-ethers.c	1997/02/15 04:28:53	1.5
+++ nss/nss_files/files-ethers.c	2000/08/01 16:07:01
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@
        if (cnt < 5)
 	 INT_FIELD (number, ISCOLON , 0, 16, (unsigned int))
        else
-	 INT_FIELD (number, isspace, 0, 16, (unsigned int))
+	 INT_FIELD (number, isspace, 1, 16, (unsigned int))
 
        if (number > 0xff)
 	 return 0;
@@ -60,7 +60,7 @@
 
 DB_LOOKUP (hostton, 1 + strlen (name), (".%s", name),
 	   {
-	     if (strcmp (result->e_name, name) == 0)
+	     if (__strcasecmp (result->e_name, name) == 0)
 	       break;
 	   }, const char *name)
 

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

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