Index: linux/libc/ChangeLog diff -u linux/libc/ChangeLog:1.202 linux/libc/ChangeLog:1.203 --- linux/libc/ChangeLog:1.202 Sun Jun 7 19:16:01 1998 +++ linux/libc/ChangeLog Sat Jun 20 15:21:57 1998 @@ -1,3 +1,50 @@ +Sat Jun 20 15:10:37 1998 H.J. Lu (hjl@gnu.org) + + * version 5.4.46 is released. + + * <_G_config.h>: change version to 5.4.46. + + * elf/libc/jump.params: set version to 5.4.46. + + * release.libc: update. + +Fri Jun 19 21:53:24 1998 H.J. Lu (hjl@gnu.org) + + * (SYS_syscall_lchown): Alias for SYS_lchown. + + * sysdeps/linux/chown.c: Return old chown, aka new lchown. + + * sysdeps/linux/__lchown.S: Removed. + + * sysdeps/linux/__syscall_lchown.S: New. + + * sysdeps/linux/Makefile (SRC2S): Rename __lchown.S to + __syscall_lchown.S. + +Fri Jun 19 20:30:06 1998 H.J. Lu (hjl@gnu.org) + + * rpc/svc_tcp.c (svctcp_recv): Back out the change on Sun Jun + 7 09:34:13 1998 by H.J. Lu (hjl@gnu.org). + * rpc/xdr_rec.c (set_input_fragment): Likewise. + +Fri Jun 19 01:31:02 1998 Pavel Kankovsky + + * nys/nsw/src/dns/dns_hosts.c (getanswer): Add safety bandage + for stupid programs trusting h_length. Add handling for CNAME + records in reverse zones. + + * locale/Makefile (localedef): Add -L../elfshared + (locale): Likewise. + +Tue Jun 16 08:33:30 1998 Wolfram Gloger + + * dl-malloc/malloc (malloc_extend_top): Fix a mixing + malloc()/free() and sbrk() bug. + +Thu Jun 11 12:14:52 1998 Greg Wolodkin + + * sysdeps/linux/i386/readdir_r.c: Fix a memory leak. + Sun Jun 7 19:13:05 1998 H.J. Lu (hjl@gnu.org) * version 5.4.45 is released. @@ -10,8 +57,8 @@ Sun Jun 7 09:34:13 1998 H.J. Lu (hjl@gnu.org) - * sunrpc/svc_tcp.c (svctcp_recv): Add FreeBSD DoS patch. - * sunrpc/xdr_rec.c (set_input_fragment): Likewise. + * rpc/svc_tcp.c (svctcp_recv): Add FreeBSD DoS patch. + * rpc/xdr_rec.c (set_input_fragment): Likewise. Tue May 26 05:43:07 1998 Pavel Kankovsky Index: linux/libc/config.in diff -u linux/libc/config.in:1.41 linux/libc/config.in:1.42 --- linux/libc/config.in:1.41 Mon May 4 12:14:57 1998 +++ linux/libc/config.in Sat Jun 20 15:21:59 1998 @@ -16,5 +16,5 @@ TARGET_ARCH_x86=5 MALLOC=dl-malloc OLD_GCC=true -GCCVERSION=egcs-2.90.28 -GCC_ARCH_INC_DIR=/usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/egcs-2.90.28/include +GCCVERSION=egcs-2.90.29 +GCC_ARCH_INC_DIR=/usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/egcs-2.90.29/include Index: linux/libc/release.libc diff -u linux/libc/release.libc:1.65 linux/libc/release.libc:1.66 --- linux/libc/release.libc:1.65 Mon May 4 12:14:58 1998 +++ linux/libc/release.libc Sat Jun 20 15:22:00 1998 @@ -1,43 +1,26 @@ Hi, Gals and Guys, -I updated libio from glibc 2. libg++ 2.7.2.8 or above should be used -with this release. +The Linux C library 5 is phasing out. I am only maintaining it for +very serious bug fixes only. People who want new features and other +improvements should use the Linux C library 6, aka, the GNU C library +2. Please check the glibc 2 web site for details. -md5 support is added. +http://www.gnu.org/software/libc/libc.html -I have modified the NIS support in libc, which is not compatible -with the previous version, but is compatible with SunOS, Solaris, ... -except for those brain dead xxxBSD. Please make sure you have the -same ypclients as the one at where you get this C library. Otherwise -your NIS won't work with the modified NIS code in this libc. If you -use a different yp client other than those in my YP clients package, -you may need a patch. Please send me a note and I will fix it for -you as soon as possible. - -Binaries of locale and localedef are included in the binary release. - -I added the support for larger PATH_MAX in linux 2.1.x. The old binaries -should run fine with the new shared library compiled with the new -PATH_MAX in linux 2.1.x. Let me know if you find any problems. - -I added some libc 6.x/glibc 2.x compatibility codes for libc 5.4.14 -so that the old XFree86 binaries will run fine with the new XFree86 -shared librraries compiled with libc 6.x/glibc 2.x. - -If you use linux 2.1.x, you need libc 5.4.45 or above to compile libc -yourself. The pre-compiled libc should run fine under linux 2.1.x. -Also this library is compiled with -D_REENTRANT so that errno is MT -safe. +The main changes from libc 5.4.44 are: +1. Security fixes. +2. Malloc fix. + The shared libraries are now compiled with -g1 which can provide minimum information when core dump happens. You can strip -libc.so.5.4.45 if you want. +libc.so.5.4.46 if you want. -Due to the new, improved locale, the Linux C library 5.4.45 is binary +Due to the new, improved locale, the Linux C library 5.4.46 is binary compatible with libc 5.3.12 but not vice versa. The binaries -compiled/linked with libc.so.5.4.45 may not run with libc.so.5.3.12. +compiled/linked with libc.so.5.4.46 may not run with libc.so.5.3.12. You may need to regenerate locale files for the new locale in libc -5.4.45 if you use locales other tha C/POSIX which are the defaults. +5.4.46 if you use locales other tha C/POSIX which are the defaults. The locale sources are at @@ -46,7 +29,7 @@ There are many security bug fixes. Please consult ChangeLog for details. Please let me know if there are more security bugs remains. -This is the beta release of the Linux C library 5.4.45. Please read +This is the beta release of the Linux C library 5.4.46. Please read the ChangeLog for details regarding changes/bug fixes. DISTRIBUTION SITES: @@ -66,11 +49,11 @@ DISTRIBUTION FILES: -1. libc-5.4.45.bin.tar.gz +1. libc-5.4.46.bin.tar.gz REQUIRED. This package contains the header files for libc, shared and static ELF libraries libc and libm, and the static ELF library libbsd.a. -The header files in libc-5.4.45.bin.tar.gz are not complete. You need to +The header files in libc-5.4.46.bin.tar.gz are not complete. You need to install the kernel source tree for the system-dependent header files. The header files are in lib-x.y.z.bin.tar.gz and libc-x.y.z.tar.gz. You @@ -81,11 +64,11 @@ to extract the header files without the binaries files. A separate tar file for the header files may cause unnecessary confusion. -2. libc-5.4.45.tar.gz +2. libc-5.4.46.tar.gz Source tree for libc and header files. -3. libc-5.4.44-5.4.45.diff.gz +3. libc-5.4.45-5.4.46.diff.gz Context diffs against the source tree from the previous libc release. Please make sure the empty libc/regex/rx.h is deleted. @@ -124,7 +107,7 @@ Linux kernel source code 1.99.10. You can comment out pthreads in DIRS in libc/sysdeps/Makefile. * gcc-2.7.2 or above and binutils-2.7.0.3 or above. -* ld.so-1.9.5 or above. The latest version can be obtained from +* ld.so-1.9.9 or above. The latest version can be obtained from ftp://ftp.ods.com/pub/linux * libg++ 2.7.2.8 or above. This is only necessary for development using c++. @@ -156,7 +139,7 @@ rm -f /usr/include/wcstr.h /usr/include/mbstr.h rm -f /usr/include/ld_so_config.h /usr/include/localeinfo.h rm -rf /usr/include/netinet /usr/include/net /usr/include/pthread -gzip -dc libc-5.4.45.bin.tar.gz | tar xvf - +gzip -dc libc-5.4.46.bin.tar.gz | tar xvf - SOURCE INSTALLATION: @@ -222,4 +205,4 @@ H.J. hjl@gnu.org -05/05/98 +06/21/98 Index: linux/libc/dl-malloc/malloc.c diff -u linux/libc/dl-malloc/malloc.c:1.13 linux/libc/dl-malloc/malloc.c:1.14 --- linux/libc/dl-malloc/malloc.c:1.13 Sun Jun 7 19:16:04 1998 +++ linux/libc/dl-malloc/malloc.c Sat Jun 20 15:22:03 1998 @@ -2020,11 +2020,11 @@ /* Also keep size a multiple of MALLOC_ALIGNMENT */ old_top_size = (old_top_size - 3*SIZE_SZ) & ~MALLOC_ALIGN_MASK; + set_head_size(old_top, old_top_size); chunk_at_offset(old_top, old_top_size )->size = SIZE_SZ|PREV_INUSE; chunk_at_offset(old_top, old_top_size + SIZE_SZ)->size = SIZE_SZ|PREV_INUSE; - set_head_size(old_top, old_top_size); /* If possible, release the rest. */ if (old_top_size >= MINSIZE) fREe(chunk2mem(old_top)); Index: linux/libc/elf/libc/jump.params diff -u linux/libc/elf/libc/jump.params:1.98 linux/libc/elf/libc/jump.params:1.99 --- linux/libc/elf/libc/jump.params:1.98 Mon May 4 12:15:02 1998 +++ linux/libc/elf/libc/jump.params Sat Jun 20 15:22:06 1998 @@ -1 +1 @@ -Version=5.4.45 +Version=5.4.46 Index: linux/libc/locale/Makefile diff -u linux/libc/locale/Makefile:1.12 linux/libc/locale/Makefile:1.13 --- linux/libc/locale/Makefile:1.12 Thu Jul 10 08:43:51 1997 +++ linux/libc/locale/Makefile Sat Jun 20 15:22:08 1998 @@ -48,10 +48,10 @@ programs: localedef locale localedef: $(LDEFSRCS:.c=.o) $(PROGLIBS:.c=.o) - $(CC) -o $@ $^ + $(CC) -o $@ $^ -L../elfshared locale: $(LOCSRCS:.c=.o) $(PROGLIBS:.c=.o) - $(CC) -o $@ $^ + $(CC) -o $@ $^ -L../elfshared programs/error.o: programs/error.c $(CC) $(CFLAGS) -c programs/error.c -o programs/error.o Index: linux/libc/nys/nsw/src/dns/dns_hosts.c diff -u linux/libc/nys/nsw/src/dns/dns_hosts.c:1.4 linux/libc/nys/nsw/src/dns/dns_hosts.c:1.5 --- linux/libc/nys/nsw/src/dns/dns_hosts.c:1.4 Wed May 31 22:12:30 1995 +++ linux/libc/nys/nsw/src/dns/dns_hosts.c Sat Jun 20 15:22:12 1998 @@ -146,6 +146,7 @@ int haveanswer, had_error; int toobig = 0; char tbuf[MAXDNAME+1]; + const char *tname = qname; host.h_name = NULL; eom = answer->buf + anslen; @@ -239,6 +240,25 @@ buflen -= n; continue; } + if (qtype == T_PTR && type == T_CNAME) { + n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf); + if (n < 0) { + had_error++; + continue; + } + cp += n; + /* Get canonical name. */ + n = strlen(tbuf) + 1; /* for the \0 */ + if (n > buflen) { + had_error++; + continue; + } + strcpy(bp, tbuf); /* cannot overflow */ + tname = bp; + bp += n; + buflen -= n; + continue; + } if (type != qtype) { syslog(LOG_NOTICE|LOG_AUTH, "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"", @@ -249,7 +269,7 @@ } switch (type) { case T_PTR: - if (strcasecmp(qname, bp) != 0) { + if (strcasecmp(tname, bp) != 0) { syslog(LOG_NOTICE|LOG_AUTH, AskedForGot, qname, bp); cp += n; @@ -293,6 +313,14 @@ } } else { register int nn; + + if (class == C_IN && n != INT32SZ) { + cp += n; + syslog(LOG_NOTICE|LOG_AUTH, + "gethostby*.getanswer: got strange A record (size=%d) for \"%s\"\n", + n, host.h_name); + continue; + } host.h_length = n; host.h_addrtype = (class == C_IN) Index: linux/libc/rpc/svc_tcp.c diff -u linux/libc/rpc/svc_tcp.c:1.6 linux/libc/rpc/svc_tcp.c:1.7 --- linux/libc/rpc/svc_tcp.c:1.6 Sun Jun 7 19:16:13 1998 +++ linux/libc/rpc/svc_tcp.c Sat Jun 20 15:22:14 1998 @@ -514,7 +514,6 @@ cd->x_id = msg->rm_xid; return (TRUE); } - cd->strm_stat = XPRT_DIED; /* From FreeBSD */ return (FALSE); } Index: linux/libc/rpc/xdr_rec.c diff -u linux/libc/rpc/xdr_rec.c:1.3 linux/libc/rpc/xdr_rec.c:1.4 --- linux/libc/rpc/xdr_rec.c:1.3 Sun Jun 7 19:16:14 1998 +++ linux/libc/rpc/xdr_rec.c Sat Jun 20 15:22:15 1998 @@ -264,12 +264,6 @@ return (FALSE); header = (long)ntohl(header); rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE; - /* - * Sanity check. Try not to accept wildly incorrect record - * sizes. - */ - if ((header & (~LAST_FRAG)) > rstrm->recvsize) - return(FALSE); rstrm->fbtbc = header & (~LAST_FRAG); return (TRUE); } Index: linux/libc/sysdeps/linux/Makefile diff -u linux/libc/sysdeps/linux/Makefile:1.26 linux/libc/sysdeps/linux/Makefile:1.27 --- linux/libc/sysdeps/linux/Makefile:1.26 Sun Jun 7 19:16:16 1998 +++ linux/libc/sysdeps/linux/Makefile Sat Jun 20 15:22:19 1998 @@ -71,7 +71,7 @@ sched_getscheduler.S sched_yield.S sched_get_priority_max.S \ sched_get_priority_min.S sched_rr_get_interval.S fdatasync.S \ nanosleep.S __syscall_poll.S quotactl.S __nfsservctl.S \ - __setresgid.S __getresgid.S __prctl.S __lchown.S + __setresgid.S __getresgid.S __prctl.S __syscall_lchown.S SRC3S= fstatfs.c statfs.c uname.c __vfork.c vfork.c SRCS=$(SRC1S) $(SRC2S) $(SRC3S) Index: linux/libc/sysdeps/linux/__lchown.S diff -u linux/libc/sysdeps/linux/__lchown.S:1.1 linux/libc/sysdeps/linux/__lchown.S:removed --- linux/libc/sysdeps/linux/__lchown.S:1.1 Sun Jun 7 19:16:19 1998 +++ linux/libc/sysdeps/linux/__lchown.S Sat Jun 20 15:56:22 1998 @@ -1,22 +0,0 @@ -/* Copyright (C) 1991, 1992 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 -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - -SYSCALL__ (lchown, 3) - ret Index: linux/libc/sysdeps/linux/__syscall_lchown.S diff -u /dev/null linux/libc/sysdeps/linux/__syscall_lchown.S:1.1 --- /dev/null Sat Jun 20 15:56:24 1998 +++ linux/libc/sysdeps/linux/__syscall_lchown.S Sat Jun 20 15:22:22 1998 @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 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 +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + +SYSCALL__ (syscall_lchown, 3) + ret Index: linux/libc/sysdeps/linux/chown.c diff -u linux/libc/sysdeps/linux/chown.c:1.1 linux/libc/sysdeps/linux/chown.c:1.2 --- linux/libc/sysdeps/linux/chown.c:1.1 Sun Jun 7 19:16:19 1998 +++ linux/libc/sysdeps/linux/chown.c Sat Jun 20 15:22:22 1998 @@ -22,22 +22,9 @@ #include #include -extern int __lchown __P ((const char *path, uid_t owner, gid_t group)); -extern int __syscall_chown __P ((const char *path, uid_t owner, gid_t group)); +extern int __syscall_lchown __P ((const char *path, uid_t owner, gid_t group)); int chown (const char *path, uid_t owner, gid_t group) { - int retval; - static int old_kernel = 0; - - if (!old_kernel) - { - int errno_saved = errno; - - retval = __syscall_chown (path, owner, group); - if ( (retval == 0) || (errno != ENOSYS) ) return retval; - old_kernel = 1; - errno = errno_saved; - } - return __lchown (path, owner, group); + return __syscall_lchown (path, owner, group); } Index: linux/libc/sysdeps/linux/i386/readdir_r.c diff -u linux/libc/sysdeps/linux/i386/readdir_r.c:1.3 linux/libc/sysdeps/linux/i386/readdir_r.c:1.4 --- linux/libc/sysdeps/linux/i386/readdir_r.c:1.3 Fri Oct 4 15:53:32 1996 +++ linux/libc/sysdeps/linux/i386/readdir_r.c Sat Jun 20 15:22:25 1998 @@ -130,7 +130,7 @@ /* We copy the dirent entry to entry. */ memcpy (entry, ((char *)dir->dd_buf) + dir->dd_nextloc, - sizeof(struct dirent)); + ((struct dirent *)(((char *)dir->dd_buf)+dir->dd_nextloc))->d_reclen); *ret = entry; /* Am I right? H.J. */ Index: linux/include/_G_config.h diff -u linux/include/_G_config.h:1.104 linux/include/_G_config.h:1.105 --- linux/include/_G_config.h:1.104 Mon May 4 16:44:45 1998 +++ linux/include/_G_config.h Sat Jun 20 15:22:27 1998 @@ -2,10 +2,10 @@ #ifndef _G_config_h #define _G_config_h -#define _LINUX_C_LIB_VERSION "5.4.45" +#define _LINUX_C_LIB_VERSION "5.4.46" #define _LINUX_C_LIB_VERSION_MAJOR 5 #define _LINUX_C_LIB_VERSION_MINOR 4 -#define _LINUX_C_LIB_VERSION_SUBMINOR 45 +#define _LINUX_C_LIB_VERSION_SUBMINOR 46 #define _G_LIB_VERSION "2.7.2" Index: linux/include/sys/syscall.h diff -u linux/include/sys/syscall.h:1.13 linux/include/sys/syscall.h:1.14 --- linux/include/sys/syscall.h:1.13 Sun Jun 7 19:16:26 1998 +++ linux/include/sys/syscall.h Sat Jun 20 15:22:30 1998 @@ -187,7 +187,8 @@ #define SYS_rt_sigsuspend 179 #define SYS_pread 180 #define SYS_pwrite 181 -#define SYS_chown 182 -#define SYS_syscall_chown SYS_chown +#define SYS_chown 182 +#define SYS_syscall_chown SYS_chown +#define SYS_syscall_lchown SYS_lchown #endif /* */