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]
Other format: [Raw text]

[PATCH] Fix ether/netgroup/publikey nss lookups


Hi!

2002-03-15 patch added internal_function to DB_LOOKUP_FCT, but unfortunately
some __nss_*_lookup calls are not done from within getXXbyYY_r.c, so
we ended up with crashes because caller put arguments on the stack while
callee expected them in registers.

2002-04-02  Jakub Jelinek  <jakub@redhat.com>

	* inet/ether_ntoh.c (__nss_ethers_lookup): Add internal_function.
	* inet/ether_hton.c (__nss_ethers_lookup): Likewise.
	* inet/getnetgrent_r.c (__nss_netgroup_lookup): Likewise.
	* sunrpc/netname.c (__nss_publickey_lookup): Likewise.
	* sunrpc/publickey.c (__nss_publickey_lookup): Likewise.

--- libc/inet/ether_ntoh.c.jj	Thu Aug 23 18:47:43 2001
+++ libc/inet/ether_ntoh.c	Tue Apr  2 19:56:41 2002
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -31,7 +31,7 @@ typedef int (*lookup_function) (const st
 
 /* The lookup function for the first entry of this service.  */
 extern int __nss_ethers_lookup (service_user **nip, const char *name,
-				void **fctp);
+				void **fctp) internal_function;
 
 
 int
--- libc/inet/getnetgrent_r.c.jj	Fri Feb  8 12:04:02 2002
+++ libc/inet/getnetgrent_r.c	Tue Apr  2 20:01:20 2002
@@ -38,7 +38,7 @@ static struct __netgrent dataset;
 
 /* The lookup function for the first entry of this service.  */
 extern int __nss_netgroup_lookup (service_user **nip, const char *name,
-				  void **fctp);
+				  void **fctp) internal_function;
 
 
 /* Set up NIP to run through the services.  If ALL is zero, use NIP's
--- libc/inet/ether_hton.c.jj	Thu Aug 23 18:47:43 2001
+++ libc/inet/ether_hton.c	Tue Apr  2 19:55:52 2002
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -30,7 +30,7 @@ typedef int (*lookup_function) (const ch
 
 /* The lookup function for the first entry of this service.  */
 extern int __nss_ethers_lookup (service_user **nip, const char *name,
-				void **fctp);
+				void **fctp) internal_function;
 
 
 int
--- libc/sunrpc/netname.c.jj	Mon Jul 23 12:56:01 2001
+++ libc/sunrpc/netname.c	Tue Apr  2 20:03:35 2002
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -135,7 +135,7 @@ typedef int (*netname2user_function) (co
 				      uid_t *, gid_t *, int *, gid_t *);
 /* The lookup function for the first entry of this service.  */
 extern int __nss_publickey_lookup (service_user ** nip, const char *name,
-				   void **fctp);
+				   void **fctp) internal_function;
 
 int
 netname2user (const char netname[MAXNETNAMELEN + 1], uid_t * uidp, gid_t * gidp,
--- libc/sunrpc/publickey.c.jj	Mon Jul 23 12:56:01 2001
+++ libc/sunrpc/publickey.c	Tue Apr  2 20:04:11 2002
@@ -1,5 +1,5 @@
 /* Get public or secret key from key server.
-   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -33,7 +33,7 @@ typedef int (*secret_function) (const ch
 
 /* The lookup function for the first entry of this service.  */
 extern int __nss_publickey_lookup (service_user **nip, const char *name,
-				   void **fctp);
+				   void **fctp) internal_function;
 
 
 int

	Jakub


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