[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#47254: marked as done (libc6: realpath: resolving circular symlinks should return ELOOP, not dump core)



Your message dated Tue, 12 Oct 1999 14:55:02 -0700
with message-id <v04205507b4295e42c89f@[206.163.71.146]>
and subject line Bug#47254: libc6: realpath: resolving circular symlinks  should return ELOOP, not dump core
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Oct 1999 21:16:17 +0000
Received: (qmail 11727 invoked from network); 12 Oct 1999 21:16:13 -0000
Received: from 209-122-226-210.s464.tnt1.nyw.ny.dialup.rcn.com (HELO eden-hda7) (mail@209.122.226.210)
  by master.debian.org with SMTP; 12 Oct 1999 21:16:13 -0000
Received: from jeff by eden-hda7 with local (Exim 2.05 #1 (Debian))
	id 11b6d1-0001qj-00; Tue, 12 Oct 1999 14:26:27 -0400
From: Jeff Sheinberg <jeffsh@erols.com>
Subject: libc6: realpath: resolving circular symlinks should return ELOOP, not dump core
To: submit@bugs.debian.org
X-Mailer: bug 3.1.7
Message-Id: <[🔎] E11b6d1-0001qj-00@eden-hda7>
Date: Tue, 12 Oct 1999 14:26:27 -0400

Package: libc6
Version: 2.0.7.19981211-6

Hi,

These simple circular symlinks, when passed to realpath C
function, cause a core dump, instead ELOOP should be returned.

    23 jeff /project/save/jeff/try $ realpath bb
    Segmentation fault (core dumped)

The program `symlinks' has no problem handling these same circular
symlinks. 

    24 jeff /project/save/jeff/try $ ls -l bb dd/aa
    lrwxrwxrwx   1 jeff     jeff            5 Sep 22 17:26 bb -> dd/aa
    lrwxrwxrwx   1 jeff     jeff            5 Sep 22 17:26 dd/aa -> ../bb

    25 jeff /project/save/jeff/try $ symlinks -rtv bb
    /project/save/jeff/try/bb: Too many levels of symbolic links

Here is what gdb says about core, the program listing is included,

    27 jeff /project/save/jeff/try $ gdb realpath core
    GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat
    Copyright 1998 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License,
    and you are
    welcome to change it and/or distribute copies of it under certain
    conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for
    details.
    This GDB was configured as "i486-pc-linux-gnu"...
    Core was generated by `realpath bb'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /lib/libc.so.6...done.
    Reading symbols from /lib/ld-linux.so.2...done.
    #0  0x400396ae in realpath ()
    (gdb) bt
    #0  0x400396ae in realpath ()
    #1  0x80485ad in main (argc=2, argv=0xbffff39c)
        at /home/jss/locl/src/realpath/realpath.c:37
    (gdb) list 17,51 
    17      #include <sys/param.h>
    18      #include <unistd.h>
    19      #include <stdio.h>
    20
    21      char *realpath (const char *path, char *resolved_path);
    22      char *strerror (int errnum);
    23
    24      static char resolved[MAXPATHLEN];
    25      static int errcnt;
    26      static char *errstr;
    27      extern int errno;
    28
    29      int
    30      main (int argc, char *argv[])
    31      {
    32        int i;
    33        char *realstr;
    34
    35        for (i = 1; i < argc; i++)
    36          {
    37            realstr = realpath (argv[i], &resolved[0]);
    38            if (realstr == NULL)
    39              {
    40                errstr = strerror (errno);
    41                fprintf (stderr, "%s: %s: %s\n", argv[0], argv[i], errstr);
    42                errcnt++;
    43              }
    44            else
    45              {
    46                printf ("%s  %s\n", argv[i], realstr);
    47              }
    48          }
    49
    50        return (errcnt ? 1 : 0);
    51      }


Thanks,
-- 
Jeff Sheinberg  <jeffsh@erols.com>


-- System Information
Debian Release: 2.1
Kernel Version: Linux eden-hda7 2.0.36 #5 Sat Oct 2 22:18:12 EDT 1999 i586 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.10-1       The Linux dynamic linker, library and utilit

---------------------------------------
Received: (at 47254-done) by bugs.debian.org; 12 Oct 1999 21:55:48 +0000
Received: (qmail 13849 invoked from network); 12 Oct 1999 21:55:47 -0000
Received: from cerberus.espy.org (mail@206.163.71.145)
  by master.debian.org with SMTP; 12 Oct 1999 21:55:47 -0000
Received: from hercules.espy.org [206.163.71.146] 
	by cerberus.espy.org with esmtp (Exim 3.03 #1 (Debian GNU/Linux))
	id 11b9ta-0007iF-00; Tue, 12 Oct 1999 14:55:46 -0700
Mime-Version: 1.0
X-Sender: jk@mail.espy.org
Message-Id: <v04205507b4295e42c89f@[206.163.71.146]>
In-Reply-To: <[🔎] E11b6d1-0001qj-00@eden-hda7>
References: <[🔎] E11b6d1-0001qj-00@eden-hda7>
Date: Tue, 12 Oct 1999 14:55:02 -0700
To: 47254-done@bugs.debian.org
From: Joel Klecker <jk@espy.org>
Subject: Re: Bug#47254: libc6: realpath: resolving circular symlinks
 should return ELOOP, not dump core
Content-Type: text/plain; charset="us-ascii" ; format="flowed"

At 14:26 -0400 1999-10-12, Jeff Sheinberg wrote:
>Package: libc6
>Version: 2.0.7.19981211-6

This is fixed in unstable libc6, glibc 2.0 is no longer supported by 
upstream or by me.
-- 
Joel Klecker (aka Espy)       <URL:mailto:espy@debian.org>
Debian Package Maintainer for the GNU C Library.


Reply to: