Patch for a group problem
The following patch fix one group problem in glibc 2.1 that I had:
Displaying Nonsense :-)
id aj gave the following output for me - due to corrupted memory :-(.
uid=207(aj) gid=100(users) groups=0((¶p@(¶p@:root),4(adm),10(),14(),101(),102((¶p@(¶p@02:aj),104(¸¹p@¸¹p@4:aj),0(),4(),10(),14(),101(),102((¶p@(¶p@02:aj),104(¸¹p@¸¹p@4:aj)
This should be fixed. I can't reproduce the problem some of you
mentioned with root in the group list. It might be the same problem.
Please tell me if this helps or not.
Andreas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: db-XXX.c
===================================================================
RCS file: /egcs/carton/cvsfiles/libc/nss/nss_db/db-XXX.c,v
retrieving revision 1.11
diff -d -u -p -r1.11 db-XXX.c
--- db-XXX.c 1998/01/20 18:15:36 1.11
+++ db-XXX.c 1998/03/11 18:52:37
@@ -1,5 +1,5 @@
/* Common code for DB-based databases in nss_db module.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 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
@@ -176,10 +176,19 @@ lookup (const DBT *key, struct STRUCTURE
H_ERRNO_SET (HOST_NOT_FOUND);
status = NSS_STATUS_NOTFOUND;
}
+ else if (buflen < value.size)
+ {
+ /* No room to copy the data to. */
+ *errnop = ERANGE;
+ H_ERRNO_SET (NETDB_INTERNAL);
+ status = NSS_STATUS_TRYAGAIN;
+ }
else
{
+ /* Copy the result to a safe place. */
+ p = (char *) memcpy (buffer, value.data, value.size);
+
/* Skip leading blanks. */
- p = (char *) value.data;
while (isspace (*p))
++p;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@alma.student.uni-kl.de
--
E-mail the word "unsubscribe" to debian-sparc-request@lists.debian.org
TO UNSUBSCRIBE FROM THIS MAILING LIST. Trouble? E-mail to listmaster@debian.org .
Reply to: