]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 29 Mar 1998 17:03:23 +0000 (17:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 29 Mar 1998 17:03:23 +0000 (17:03 +0000)
1998-03-29 16:50  Ulrich Drepper  <drepper@cygnus.com>

* config.make.in (ldd-rewrite-script): New variable.
* configure.in: Substitute ldd-rewrite-script.
* elf/Makefile: Rewrite rules to generate ldd script.
* elf/ldd.bash.in: Allow handling of non-ELF binaries.
* elf/ldd.sh.in: Likewise.
* sysdeps/unix/sysv/linux/Makefile: Remove rule to install lddlibc4.
* sysdeps/unix/sysv/linux/configure.in: Define ldd_rewrite_script to
point to sed script for libc4 handling insertion for ix86, m68, SPARC.
* sysdeps/unix/sysv/linux/i386/Makefile: Add rule to install lddlibc4.

1998-03-26 15:20  Zack Weinberg  <zack@rabi.phys.columbia.edu>

* inet/rcmd.c (iruserok): Remain setuid to the local user
while .rhosts is actually read, to make .rhosts-over-NFS work
(PR libc/524).  Use iruserfopen() for security checks on both
hosts.equiv and .rhosts.  General cleanup.
(iruserfopen): New function, performs careful checking on
hosts.equiv/.rhosts files.  Disallows all the old forbidden
stuff plus hard links to files.

1998-03-29 09:26  Ulrich Drepper  <drepper@cygnus.com>

* setjmp/tst-setjmp.c: Don't test __setjmp, test _setjmp instead.

1998-03-29 02:02  H.J. Lu  <hjl@gnu.org>

* sysdeps/i386/i486/bits/string.h: Fix typos.

* nss/nsswitch.c (__nss_lookup): Fix the bogus checking for
"adjusted for next function".

1998-03-28 00:13  H.J. Lu  <hjl@gnu.org>

* sysdeps/unix/sysv/linux/alpha/readdir.c (__readdir64): New
strong alias.

* sysdeps/unix/sysv/linux/alpha/syscalls.list (socket): Added.

* libc.map (__ieee_get_fp_control, __ieee_set_fp_control):
Added.  Used by libm.so on alpha.

1998-03-28  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

* intl/bindtextdom.c [_LIBC]: Define strdup only if not yet
defined.

1998-03-27 07:29  H.J. Lu  <hjl@gnu.org>

* Makerules (object-suffixes-for-rules): Add .oS only for
building shared library.
Add ranlib rule for nonshared library.
(rmobjs): Fix typo.

* Makeconfig (libtype.oS, CFLAGS-.oS, CPPFLAGS-.oS): Moved
into for shared library only.
(CPPFLAGS-.oS): Add -DPIC.
(libtypes): Use $(object-suffixes-for-rules) instead of
$(object-suffixes).

1998-03-28  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/unix/sysv/linux/Makefile (inhibit-stdio_lim): Compile
and install lddlibc4.

1998-03-28 09:13  Zack Weinberg  <zack@rabi.phys.columbia.edu>

* iconvdata/gap.pl: Gobble rest of line with a scalar, not a
hash.
* iconvdata/gaptab.pl: Likewise.

21 files changed:
ChangeLog
Makeconfig
Makerules
config.make.in
configure
configure.in
elf/Makefile
elf/ldd.bash.in
elf/ldd.sh.in
iconvdata/gap.pl
iconvdata/gaptab.pl
inet/rcmd.c
intl/bindtextdom.c
libc.map
setjmp/tst-setjmp.c
sysdeps/i386/i486/bits/string.h
sysdeps/unix/sysv/linux/alpha/readdir.c
sysdeps/unix/sysv/linux/alpha/syscalls.list
sysdeps/unix/sysv/linux/configure
sysdeps/unix/sysv/linux/configure.in
sysdeps/unix/sysv/linux/i386/Makefile

index d7832876a180d60c52ecb01d8c7802eea0aee0f3..830612b015b6b91f5a4e52c0624f5841b80a39d2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,75 @@
+1998-03-29 16:50  Ulrich Drepper  <drepper@cygnus.com>
+
+       * config.make.in (ldd-rewrite-script): New variable.
+       * configure.in: Substitute ldd-rewrite-script.
+       * elf/Makefile: Rewrite rules to generate ldd script.
+       * elf/ldd.bash.in: Allow handling of non-ELF binaries.
+       * elf/ldd.sh.in: Likewise.
+       * sysdeps/unix/sysv/linux/Makefile: Remove rule to install lddlibc4.
+       * sysdeps/unix/sysv/linux/configure.in: Define ldd_rewrite_script to
+       point to sed script for libc4 handling insertion for ix86, m68, SPARC.
+       * sysdeps/unix/sysv/linux/i386/Makefile: Add rule to install lddlibc4.
+
+1998-03-26 15:20  Zack Weinberg  <zack@rabi.phys.columbia.edu>
+
+       * inet/rcmd.c (iruserok): Remain setuid to the local user
+       while .rhosts is actually read, to make .rhosts-over-NFS work
+       (PR libc/524).  Use iruserfopen() for security checks on both
+       hosts.equiv and .rhosts.  General cleanup.
+       (iruserfopen): New function, performs careful checking on
+       hosts.equiv/.rhosts files.  Disallows all the old forbidden
+       stuff plus hard links to files.
+
+1998-03-29 09:26  Ulrich Drepper  <drepper@cygnus.com>
+
+       * setjmp/tst-setjmp.c: Don't test __setjmp, test _setjmp instead.
+
+1998-03-29 02:02  H.J. Lu  <hjl@gnu.org>
+
+       * sysdeps/i386/i486/bits/string.h: Fix typos.
+
+       * nss/nsswitch.c (__nss_lookup): Fix the bogus checking for
+       "adjusted for next function".
+
+1998-03-28 00:13  H.J. Lu  <hjl@gnu.org>
+
+       * sysdeps/unix/sysv/linux/alpha/readdir.c (__readdir64): New
+       strong alias.
+
+       * sysdeps/unix/sysv/linux/alpha/syscalls.list (socket): Added.
+
+       * libc.map (__ieee_get_fp_control, __ieee_set_fp_control):
+       Added.  Used by libm.so on alpha.
+
+1998-03-28  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>
+
+       * intl/bindtextdom.c [_LIBC]: Define strdup only if not yet
+       defined.
+
+1998-03-27 07:29  H.J. Lu  <hjl@gnu.org>
+
+       * Makerules (object-suffixes-for-rules): Add .oS only for
+       building shared library.
+       Add ranlib rule for nonshared library.
+       (rmobjs): Fix typo.
+
+       * Makeconfig (libtype.oS, CFLAGS-.oS, CPPFLAGS-.oS): Moved
+       into for shared library only.
+       (CPPFLAGS-.oS): Add -DPIC.
+       (libtypes): Use $(object-suffixes-for-rules) instead of
+       $(object-suffixes).
+
+1998-03-28  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/unix/sysv/linux/Makefile (inhibit-stdio_lim): Compile
+       and install lddlibc4.
+
+1998-03-28 09:13  Zack Weinberg  <zack@rabi.phys.columbia.edu>
+
+       * iconvdata/gap.pl: Gobble rest of line with a scalar, not a
+       hash.
+       * iconvdata/gaptab.pl: Likewise.
+
 1998-03-27 22:46  Ulrich Drepper  <drepper@cygnus.com>
 
        * Rules: Allow Makefiles to specify test-static for tests which
index 18f978b90015f0af0035d0cb3bcfb03d701292a6..e20056ecd4ac73964b54400aa4bac7284d68ef8a 100644 (file)
@@ -571,7 +571,7 @@ endif
 # Various things use $(object-suffixes) to know what all to make.
 # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
 # to pass different flags for each flavor.
-libtypes = $(foreach o,$(object-suffixes),$(libtype$o))
+libtypes = $(foreach o,$(object-suffixes-for-rules),$(libtype$o))
 all-object-suffixes := .o .os .op .og .ob .oS
 object-suffixes :=
 ifeq (yes,$(build-static))
@@ -589,6 +589,13 @@ CFLAGS-.os = $(filter %frame-pointer,$(+cflags)) $(pic-ccflag)
 libtype.os := lib%_pic.a
 # This can be changed by a sysdep makefile
 pic-ccflag = -fPIC
+# Special library that contains the static-only routines for libc.
+libtype.oS = lib%_nonshared.a
+# Must build the routines as PIC, though, because they can end up in (users')
+# shared objects.  We don't want to use CFLAGS-os because users may, for
+# example, make that processor-specific.
+CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
+CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC
 endif
 ifeq (yes,$(build-profile))
 # Under --enable-profile, we will build a static library of profiled objects.
@@ -618,14 +625,6 @@ CFLAGS-.ob = -g -fbounded-pointers
 libtype.ob = lib%_b.a
 endif
 
-# Special library that contains the static-only routines for libc.
-libtype.oS = lib%_nonshared.a
-# Must build the routines as PIC, though, because they can end up in (users')
-# shared objects.  We don't want to use CFLAGS-os because users may, for
-# example, make that processor-specific.
-CFLAGS-.oS = $(CFLAGS-.o) $(pic-ccflag)
-CPPFLAGS-.oS = $(CPPFLAGS-.o)
-
 +gnu-stabs = $(shell echo>&2 '*** BARF ON ME')
 
 ifndef BUILD_CC
index 26f83980412f63375059d18e8f478c57b2b7faac..62cceac1c6fdf463dbf286374a1f92b371225478 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -172,7 +172,11 @@ endef
 $(common-objpfx)dummy.d:
        echo '# .s files cannot contain includes, so they need no deps.' > $@
 
-object-suffixes-for-rules = $(object-suffixes) .oS
+object-suffixes-for-rules := $(object-suffixes)
+
+ifeq (yes,$(build-shared))
+object-suffixes-for-rules += .oS
+endif
 
 # It matters that this set of rules, for compiling from sources in
 # the current directory (the $srcdir/$subdir) come before the
@@ -571,6 +575,15 @@ $(subdirs-stamps): subdir_lib;
 endif
 object-suffixes-left = $(object-suffixes)
 include $(o-iterator)
+ifeq (yes,$(build-shared))
+$(common-objpfx)$(patsubst %,$(libtype.oS),c)($(ar-symtab-name)): \
+       $(common-objpfx)$(patsubst %,$(libtype.oS),c)(\
+         $(patsubst %,%.oS,$(static-only-routines))) \
+       $(wildcard $(foreach d,$(subdirs),$(common-objpfx)$d/stamp.oS))
+       $(SHELL) $(..)./autolock.sh \
+         $(common-objpfx)$(patsubst %,$(libtype.oS),c).lck \
+         $(RANLIB) $(common-objpfx)$(patsubst %,$(libtype.oS),c)
+endif
 
 
 # This makes all the object files.
@@ -914,7 +927,7 @@ common-mostlyclean:
 define rmobjs
 $(foreach o,$(object-suffixes),
 -rm -f $(objpfx)stamp$o $(o-objects))
--rm -f $(objpfx)stamp.oS $(patsubst %,$(static-only-routines),$(objpfx)%.oS)
+-rm -f $(objpfx)stamp.oS $(patsubst %,$(objpfx)%.oS,$(static-only-routines))
 endef
 
 # Also remove the dependencies and generated source files.
index 8006adb45c6ef7d0dbba18bf9be6f4a1ca79cf3e..4c989c83358531d7852bb12c178507cb844252f4 100644 (file)
@@ -15,6 +15,9 @@ rootsbindir = @libc_cv_rootsbindir@
 # in GNU libc.
 has-ldconfig = @has_ldconfig@
 
+# Maybe the `ldd' script must be rewritten.
+ldd-rewrite-script = @ldd_rewrite_script@
+
 # System configuration.
 config-machine = @host_cpu@
 base-machine = @base_machine@
index 7776ef7e966b286cdd54239dc7dee2414eb90ca7..7e886b913bdd1798073909bf42e82ba741ee14ea 100755 (executable)
--- a/configure
+++ b/configure
@@ -2512,6 +2512,9 @@ esac
 libc_link_dests=
 libc_link_sources=
 
+# They also can set these variables.
+ldd_rewrite_script=no
+
 # Iterate over all the sysdep directories we will use, running their
 # configure fragments, and looking for a uname implementation.
 uname=
@@ -2547,7 +2550,7 @@ if test "$uname" = "sysdeps/generic"; then
   fi
 
   echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
-echo "configure:2551: checking OS release for uname" >&5
+echo "configure:2554: checking OS release for uname" >&5
 if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2569,7 +2572,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
   uname_release="$libc_cv_uname_release"
 
   echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
-echo "configure:2573: checking OS version for uname" >&5
+echo "configure:2576: checking OS version for uname" >&5
 if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2591,7 +2594,7 @@ else
 fi
 
 echo $ac_n "checking stdio selection""... $ac_c" 1>&6
-echo "configure:2595: checking stdio selection" >&5
+echo "configure:2598: checking stdio selection" >&5
 
 case $stdio in
 libio) cat >> confdefs.h <<\EOF
@@ -2603,7 +2606,7 @@ esac
 echo "$ac_t""$stdio" 1>&6
 
 echo $ac_n "checking ldap selection""... $ac_c" 1>&6
-echo "configure:2607: checking ldap selection" >&5
+echo "configure:2610: checking ldap selection" >&5
 
 case $add_ons in
 *ldap*)
@@ -2620,6 +2623,7 @@ echo "$ac_t""$ldap" 1>&6
 
 
 
+
   
 if test $gnu_ld = yes; then
   cat >> confdefs.h <<\EOF
@@ -2665,7 +2669,7 @@ if test $static = no && test $shared = yes; then
 fi
 
 echo $ac_n "checking whether -fPIC is default""... $ac_c" 1>&6
-echo "configure:2669: checking whether -fPIC is default" >&5
+echo "configure:2673: checking whether -fPIC is default" >&5
 if eval "test \"`echo '$''{'pic_default'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2892,6 +2896,7 @@ s%@libc_cv_slibdir@%$libc_cv_slibdir%g
 s%@libc_cv_sysconfdir@%$libc_cv_sysconfdir%g
 s%@libc_cv_rootsbindir@%$libc_cv_rootsbindir%g
 s%@has_ldconfig@%$has_ldconfig%g
+s%@ldd_rewrite_script@%$ldd_rewrite_script%g
 s%@gnu_ld@%$gnu_ld%g
 s%@gnu_as@%$gnu_as%g
 s%@elf@%$elf%g
index adc3381cba7e37c1b9c7fdba5bd1db00ac612c37..fa8231931c8c2b2f956ea85fa17a7f3d9d0911e5 100644 (file)
@@ -1000,6 +1000,9 @@ esac
 libc_link_dests=
 libc_link_sources=
 
+# They also can set these variables.
+ldd_rewrite_script=no
+
 # Iterate over all the sysdep directories we will use, running their
 # configure fragments, and looking for a uname implementation.
 uname=
@@ -1108,6 +1111,7 @@ AC_SUBST(libc_cv_sysconfdir)
 AC_SUBST(libc_cv_rootsbindir)
 
 AC_SUBST(has_ldconfig)
+AC_SUBST(ldd_rewrite_script)
 
 AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf)
 if test $gnu_ld = yes; then
index 5e221ec352ecf961dc0db328fe1f43c358272c58..33f60c52f1c69ea1938985e508009620871c0795 100644 (file)
@@ -164,23 +164,34 @@ $(inst_slibdir)/$(rtld-installed-name): \
 .PHONY: ldso_install
 ldso_install: $(inst_slibdir)/$(rtld-installed-name)
 
+
+sh-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
+                -e 's%@VERSION@%$(version)%g'
+bash-ldd-rewrite = $(sh-ldd-rewrite) -e 's%@BASH@%$(BASH)%g' \
+                  -e 's%@TEXTDOMAINDIR@%$(localedir)%g'
+
 ifneq ($(have-bash2),yes)
-$(objpfx)ldd: ldd.sh.in $(common-objpfx)version.mk \
-             $(common-objpfx)soversions.mk $(common-objpfx)config.make
-       sed -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
-           -e 's%@VERSION@%$(version)%g' < $< > $@.new
-       chmod 555 $@.new
-       mv -f $@.new $@
+ldd-shell = bash
+else
+ldd-shell = sh
+endif
+
+ifeq ($(ldd-rewrite-script),no)
+define gen-ldd
+sed $($(ldd-shell)-ldd-rewrite) < $< > $@.new
+endef
 else
-$(objpfx)ldd: ldd.bash.in $(common-objpfx)version.mk \
+define gen-ldd
+sed $($(ldd-shell)-ldd-rewrite) < $< | sed -f $(ldd-rewrite-script) > $@.new
+endef
+endif
+
+$(objpfx)ldd: ldd.$(ldd-shell).in $(common-objpfx)version.mk \
              $(common-objpfx)soversions.mk $(common-objpfx)config.make
-       sed -e 's%@BASH@%$(BASH)%g' \
-           -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
-           -e 's%@VERSION@%$(version)%g' \
-           -e 's%@TEXTDOMAINDIR@%$(localedir)%g' < $< > $@.new
+       $(gen-ldd)
        chmod 555 $@.new
        mv -f $@.new $@
-endif
+
 
 ifeq ($(build-shared),yes)
 $(objpfx)sprof: $(objpfx)libdl.so$(libdl.so-version)
index 54dc837d3e23eb71b62abb8d2f27767f130197c4..5d4bb3ccccee53c7a35680a34468e965ee77ac9a 100644 (file)
@@ -87,6 +87,12 @@ Report bugs using the \`glibcbug' script to <bugs@gnu.org>."
   esac
 done
 
+nonelf ()
+{
+  # Maybe extra code for non-ELF binaries.
+  return 1;
+}
+
 add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
 add_env="$add_env LD_VERBOSE=$verbose"
 case $# in
@@ -115,6 +121,8 @@ case $# in
       eval $add_env exec '"$file"' || exit 1
       ;;
     1)
+      # This can be a non-ELF binary or no binary at all.
+      nonelf $file ||
       echo $"  not a dynamic executable"
       exit 1
       ;;
@@ -154,8 +162,11 @@ warning: you do not have execution permission for" "\`$file'"
        eval $add_env '"$file"' || result=1
        ;;
       1)
-       echo $" not a dynamic executable"
-       result=1
+       # This can be a non-ELF binary or no binary at all.
+       nonelf $file || {
+         echo $"       not a dynamic executable"
+         result=1
+       }
        ;;
       2)
         eval $add_env ${RTLD} '"$file"' || result=1
index 884472f654acc8d41082ffee64ee5e656bdbe1f3..a82deb5cb717be523066d7e5d9559a59781177ed 100644 (file)
@@ -83,6 +83,12 @@ Try \`ldd --help' for more information."
   esac
 done
 
+nonelf ()
+{
+  # Maybe extra code for non-ELF binaries.
+  return 1;
+}
+
 add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
 add_env="$add_env LD_VERBOSE=$verbose"
 case $# in
@@ -113,6 +119,7 @@ Try \`ldd --help' for more information."
        eval $add_env exec '"$file"' || exit 1
        ;;
       1)
+        nonelf $file ||
        echo '  not a dynamic executable'
        exit 1
        ;;
@@ -155,6 +162,7 @@ ldd: warning: you do not have execution permission for \`$file'"
          eval $add_env '"$file"' || result=1
          ;;
        1)
+          nonelf $file ||
          echo '        not a dynamic executable'
          result=1
          ;;
index 01ee9b28298f2f84b5d991e4f992d982cc3237ae..ed2d295c904bf20894fc625f404edfc047776a34 100644 (file)
@@ -1,6 +1,6 @@
 $first=$last=$idx=0;
 while (<>) {
-  local($ucs,%rest) = split;
+  local($ucs,$rest) = split;
   local($u)=hex($ucs);
   if ($u - $last > 6) {
     if ($last != 0) {
index 34eb2f94082c9b25de82221c7d2055fcd7c9b432..77df1c3aea6cfd0933057334b961bb383bbbb43a 100644 (file)
@@ -6,7 +6,7 @@ sub fmt {
   printf (" '\\x%02x',", $val);
 }
 while (<>) {
-  local($ucs,$char,%rest) = split;
+  local($ucs,$char,$rest) = split;
   local($u)=hex($ucs);
   local($c)=hex($char);
   if ($u - $last > 6) {
index d496a7a8fa5118decd836609fbcdfe68ac6f33a6..05bd1d5e8b7acbbb69a39e71153ad9c7aff95d88 100644 (file)
@@ -287,6 +287,49 @@ ruserok(rhost, superuser, ruser, luser)
        return -1;
 }
 
+/* Extremely paranoid file open function. */
+static FILE *
+iruserfopen (char *file, uid_t okuser)
+{
+  struct stat st;
+  char *cp = NULL;
+  FILE *res = NULL;
+
+  /* If not a regular file, if owned by someone other than user or
+     root, if writeable by anyone but the owner, or if hardlinked
+     anywhere, quit.  */
+  cp = NULL;
+  if (__lxstat (_STAT_VER, file, &st))
+    cp = _("lstat failed");
+  else if (!S_ISREG (st.st_mode))
+    cp = _("not regular file");
+  else
+    {
+      res = fopen (file, "r");
+      if (!res)
+       cp = _("cannot open");
+      else if (__fxstat (_STAT_VER, fileno (res), &st) < 0)
+       cp = _("fstat failed");
+      else if (st.st_uid && st.st_uid != okuser)
+       cp = _("bad owner");
+      else if (st.st_mode & (S_IWGRP|S_IWOTH))
+       cp = _("writeable by other than owner");
+      else if (st.st_nlink > 1)
+       cp = _("hard linked somewhere");
+    }
+
+  /* If there were any problems, quit.  */
+  if (cp != NULL)
+    {
+      __rcmd_errstr = cp;
+      if (res)
+       fclose (res);
+      return NULL;
+    }
+
+  return res;
+}
+
 /*
  * New .rhosts strategy: We are passed an ip address. We spin through
  * hosts.equiv and .rhosts looking for a match. When the .rhosts only
@@ -297,83 +340,60 @@ ruserok(rhost, superuser, ruser, luser)
  * Returns 0 if ok, -1 if not ok.
  */
 int
-iruserok(raddr, superuser, ruser, luser)
-       u_int32_t raddr;
-       int superuser;
-       const char *ruser, *luser;
+iruserok (raddr, superuser, ruser, luser)
+     u_int32_t raddr;
+     int superuser;
+     const char *ruser, *luser;
 {
-       register char *cp;
-       struct stat sbuf;
-       struct passwd pwdbuf, *pwd;
-       FILE *hostf;
-       int first;
-
-       first = 1;
-       hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
-again:
-       if (hostf) {
-               if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
-                       (void)fclose(hostf);
-                       return 0;
-               }
-               (void)fclose(hostf);
-       }
-       if (first == 1 && (__check_rhosts_file || superuser)) {
-               char *pbuf;
-               size_t dirlen;
-               size_t buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
-               char *buffer = __alloca (buflen);
-
-               first = 0;
-               if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
-                       return -1;
+  FILE *hostf;
+  int isbad;
 
-               dirlen = strlen (pwd->pw_dir);
-               pbuf = alloca (dirlen + sizeof "/.rhosts");
-               __mempcpy (__mempcpy (pbuf, pwd->pw_dir, dirlen),
-                          "/.rhosts", sizeof "/.rhosts");
-
-               /*
-                * Change effective uid while opening .rhosts.  If root and
-                * reading an NFS mounted file system, can't read files that
-                * are protected read/write owner only.
-                */
-               if (__access (pbuf, R_OK) != 0)
-                 hostf = NULL;
-               else
-                 {
-                   uid_t uid = geteuid ();
-                   seteuid (pwd->pw_uid);
-                   hostf = fopen (pbuf, "r");
-                   seteuid (uid);
-                 }
-
-               if (hostf == NULL)
-                       return -1;
-               /*
-                * If not a regular file, or is owned by someone other than
-                * user or root or if writeable by anyone but the owner, quit.
-                */
-               cp = NULL;
-               if (lstat(pbuf, &sbuf) < 0)
-                       cp = _(".rhosts lstat failed");
-               else if (!S_ISREG(sbuf.st_mode))
-                       cp = _(".rhosts not regular file");
-               else if (fstat(fileno(hostf), &sbuf) < 0)
-                       cp = _(".rhosts fstat failed");
-               else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
-                       cp = _("bad .rhosts owner");
-               else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
-                       cp = _(".rhosts writeable by other than owner");
-               /* If there were any problems, quit. */
-               if (cp) {
-                       __rcmd_errstr = cp;
-                       (void)fclose(hostf);
-                       return -1;
-               }
-               goto again;
-       }
+  if (!superuser)
+    hostf = iruserfopen (_PATH_HEQUIV, 0);
+
+  if (hostf)
+    {
+      isbad = __ivaliduser (hostf, raddr, luser, ruser);
+      fclose (hostf);
+
+      if (!isbad)
+       return 0;
+    }
+
+  if (__check_rhosts_file || superuser)
+    {
+      char *pbuf;
+      struct passwd pwdbuf, *pwd;
+      size_t dirlen;
+      size_t buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
+      char *buffer = __alloca (buflen);
+      uid_t uid;
+
+      if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd))
        return -1;
+
+      dirlen = strlen (pwd->pw_dir);
+      pbuf = alloca (dirlen + sizeof "/.rhosts");
+      __mempcpy (__mempcpy (pbuf, pwd->pw_dir, dirlen),
+                "/.rhosts", sizeof "/.rhosts");
+
+       /* Change effective uid while reading .rhosts.  If root and
+         reading an NFS mounted file system, can't read files that
+         are protected read/write owner only.  */
+       uid = geteuid ();
+       seteuid (pwd->pw_uid);
+       hostf = iruserfopen (pbuf, pwd->pw_uid);
+
+       if (hostf != NULL)
+        {
+           isbad = __ivaliduser (hostf, raddr, luser, ruser);
+           fclose (hostf);
+        }
+
+       seteuid (uid);
+       return isbad;
+    }
+  return -1;
 }
 
 /*
index 0540d1e1626e7526bbcebd7a78b4a5b371e9cfb8..38625445756cf189edfbffc803db631961ac393c 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the bindtextdomain(3) function
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.  Its master source is NOT part of
    the C library, however.
@@ -65,7 +65,9 @@ extern struct binding *_nl_domain_bindings;
    prefix.  So we have to make a difference here.  */
 #ifdef _LIBC
 # define BINDTEXTDOMAIN __bindtextdomain
-# define strdup(str) __strdup (str)
+# ifndef strdup
+#  define strdup(str) __strdup (str)
+# endif
 #else
 # define BINDTEXTDOMAIN bindtextdomain__
 #endif
index 4ecb0f888497f95b144a6424ff35c7147ec433a3..e4a289de1ef43917c935e9a23d74e650c9decf47 100644 (file)
--- a/libc.map
+++ b/libc.map
@@ -104,6 +104,7 @@ GLIBC_2.0 {
     _dl_debug_message;
     __ffs;
     __close; __connect; __fcntl; __lseek; __open; __read; __send; __wait;
+    __ieee_get_fp_control; __ieee_set_fp_control;
 
     # Exception handling support functions from libgcc
     __register_frame; __register_frame_table; __deregister_frame;
index b4cba1177df493269f5f794fa467049b1f418847..3eb1516830a265da80078f0ba500dd9eb81f4aad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 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
@@ -83,13 +83,14 @@ main (void)
 
   if (!lose && value == 10)
     {
-      /* And again for the `__setjmp' function.  */
-      extern int __setjmp (jmp_buf);
-
+      /* And again for the `_setjmp' function.  */
+#ifndef _setjmp
+      extern int _setjmp (jmp_buf);
+#endif
       last_value = -1;
       lose = 0;
 
-      value = __setjmp (env);
+      value = _setjmp (env);
       if (value != last_value + 1)
        {
          fputs("Shouldn't have ", stdout);
index 6690066d944dc614889377b050ca5680556fbdcd..60148b7da59b52ce76f975111d49f0d4f07ac917 100644 (file)
@@ -235,7 +235,7 @@ __memset_cc_by2 (void *__s, int __c, size_t __n)
      "jnz      1b\n"
      "2:\n\t"
      "movw     %w2,(%0)"
-     : "=&r" (__tmp), "=&r" (__dummy)
+     : "=&r" (__tmp), "=&r" (__d0)
      : "q" (0x01010101UL * (unsigned char) __c), "0" (__tmp), "1" (__n / 2)
      : "memory", "cc");
   return __s;
@@ -1516,6 +1516,7 @@ __strstr_g (__const char *__haystack, __const char *__needle)
 __STRING_INLINE char *
 __strstr_g (__const char *__haystack, __const char *__needle)
 {
+  register unsigned long int __d0, __d1, __d2, __d3;
   register char *__res;
   __asm__ __volatile__
     ("cld\n\t"
index 96a6a7694522d02769ae25a7bf15d4f1d74352f6..300ebb26297cb5a24aa5154acd8a64cca12ba337 100644 (file)
@@ -1,4 +1,7 @@
 #define readdir64 __no_readdir64_decl
+#define __readdir64 __no___readdir64_decl
 #include <sysdeps/unix/readdir.c>
+#undef __readdir64
+strong_alias (__readdir, __readdir64)
 #undef readdir64
 weak_alias (__readdir, readdir64)
index 8b593a016239e6f967a18b8138048fd7f5622242..ea3c9452d27c96c02cfb689d9d26aabdb86487db 100644 (file)
@@ -51,6 +51,7 @@ sendmsg               -       sendmsg         3       __libc_sendmsg  __sendmsg sendmsg
 sendto         -       sendto          6       __libc_sendto   __sendto sendto
 setsockopt     -       setsockopt      5       __setsockopt    setsockopt
 shutdown       -       shutdown        2       __shutdown      shutdown
+socket         -       socket          3       __socket        socket
 socketpair     -       socketpair      4       __socketpair    socketpair
 sysctl         -       _sysctl         6       sysctl
 
index 79dbf169120162549c696544d353a531b38c9949..dfee18f4ebdd4d3c56057d34b7af40a479020d03 100644 (file)
@@ -98,3 +98,14 @@ fi
 if test -f $srcdir/elf/ldconfig.c; then
   has_ldconfig=yes
 fi
+
+# We need some extensions to the `ldd' script.
+
+case "$machine" in
+  i[3456]86* | m68k | sparc/sparc32)
+    ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
+    ;;
+  *)
+    ;;
+esac
+
index 18bb6dc4696cf4342d91740863b73cfa8a5b63b2..fc332876bb9a0631e6c9b9462dc3fcd7594599e1 100644 (file)
@@ -83,3 +83,14 @@ fi
 if test -f $srcdir/elf/ldconfig.c; then
   has_ldconfig=yes
 fi
+
+# We need some extensions to the `ldd' script.
+changequote(,)
+case "$machine" in
+  i[3456]86* | m68k | sparc/sparc32)
+    ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
+    ;;
+  *)
+    ;;
+esac
+changequote([,])
index 2ecedd4b150c5c50fb962a335cf402eb46e3196b..d54c4cadbca5172a634e371644b0b223c1e4e799 100644 (file)
@@ -2,3 +2,8 @@ ifeq ($(subdir),misc)
 sysdep_routines += ioperm iopl vm86
 sysdep_headers += sys/perm.h sys/vm86.h
 endif
+
+ifeq ($(subdir),elf)
+others      += lddlibc4
+install-bin += lddlibc4
+endif