bug-hurd
[Top][All Lists]
Advanced

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

Bug#68417: marked as done (isofs and symlink brokeness)


From: Debian Bug Tracking System
Subject: Bug#68417: marked as done (isofs and symlink brokeness)
Date: Mon, 27 Nov 2000 14:06:06 -0600

Your message dated Mon, 27 Nov 2000 20:59:44 +0100
with message-id <20001127205944.D5341@ulysses.dhis.net>
and subject line eh
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; 2 Aug 2000 17:02:41 +0000
>From Marcus.Brinkmann@ruhr-uni-bochum.de Wed Aug 02 12:02:41 2000
Return-path: <Marcus.Brinkmann@ruhr-uni-bochum.de>
Received: from sunu450.rz.ruhr-uni-bochum.de [134.147.64.5] 
        by master.debian.org with smtp (Exim 3.12 2 (Debian))
        id 13K1ui-0007ZH-00; Wed, 02 Aug 2000 12:02:41 -0500
Received: (qmail 17099 invoked from network); 2 Aug 2000 17:02:32 -0000
Received: from dialppp-3-173.rz.ruhr-uni-bochum.de (HELO localhost) 
(mail@134.147.3.173)
  by mailhost.rz.ruhr-uni-bochum.de with SMTP; 2 Aug 2000 17:02:32 -0000
Received: from marcus by localhost with local (Exim 3.12 #1 (Debian))
        for submit@bugs.debian.org
        id 13K1tJ-00005U-00; Wed, 02 Aug 2000 19:01:13 +0200
Date: Wed, 2 Aug 2000 19:01:12 +0200
From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
To: submit@bugs.debian.org
Subject: isofs and symlink brokeness
Message-ID: <20000802190111.A277@ulysses.dhis.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.1.4i
Organization: Marcus Brinkmann's Home
Delivered-To: submit@bugs.debian.org

Package: hurd
Version: 2000-08-02

Hi,

isofs died on some symlinks. I found out that it used to realloc a double
sized buffer when adding a path component, but this might not be enough:
The old path plus the new component can be longer than the current alloced
buffer mulitplied with 2.

Then I noticed all targets start with garbage, because after malloc() some
space is already claimed by setting targused to a non-zero value.

Then I noticed that it didn't even recognized there were symlinks, because
VALID_SL is not set.

Then I noticed that it dies on me, because read_diskinode uses the name
field and not the target field to get the link target, which might be 0x0.

Then it worked :) I can check it in if you like, it's tested and all.

Thanks,
Marcus

2000-08-02  Marcus Brinkmann  <marcus@gnu.org>

        * rr.c (rrip_work): In helper function add_comp
        set targused to zero after malloc, and loop over
        realloc in case doubling is not enough.
        After finalizing the link, set VALID_SL valid flag.
        * inode.c (read_disknode): For links use rl->target
        instead rl->name.

diff -ru hurd/isofs/inode.c 
/mnt/marcus/gnu/hurd/hurd/hurd-20000726/isofs/inode.c
--- hurd/isofs/inode.c  Sun Dec 27 11:19:38 1998
+++ /mnt/marcus/gnu/hurd/hurd/hurd-20000726/isofs/inode.c       Wed Aug  2 
18:44:55 2000
@@ -410,8 +410,8 @@
     {
       if (rl->valid & VALID_SL)
        {
-         np->dn->link_target = rl->name;
-         rl->name = 0;
+         np->dn->link_target = rl->target;
+         rl->target = 0;
          st->st_size = strlen (np->dn->link_target);
        }
       else
diff -ru hurd/isofs/rr.c /mnt/marcus/gnu/hurd/hurd/hurd-20000726/isofs/rr.c
--- hurd/isofs/rr.c     Sun Nov 21 05:28:48 1999
+++ /mnt/marcus/gnu/hurd/hurd/hurd-20000726/isofs/rr.c  Wed Aug  2 18:26:03 2000
@@ -363,10 +363,10 @@
              if (rr->target == 0)
                {
                  rr->target = malloc (cnamelen * 2);
-                 targused = cnamelen;
+                 targused = 0;
                  targalloced = cnamelen * 2;
                }
-             else if (targused + cnamelen > targalloced)
+             else while (targused + cnamelen > targalloced)
                rr->target = realloc (rr->target, targalloced *= 2);
              assert (rr->target);
 
@@ -434,6 +434,8 @@
            rr->target[targused - 1] = '\0';
          else
            add_comp ("", 1);
+
+         rr->valid |= VALID_SL;
 
          free (slbuf);
          goto next_field;

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org

---------------------------------------
Received: (at 68417-done) by bugs.debian.org; 27 Nov 2000 19:58:06 +0000
>From Marcus.Brinkmann@ruhr-uni-bochum.de Mon Nov 27 13:58:06 2000
Return-path: <Marcus.Brinkmann@ruhr-uni-bochum.de>
Received: from sunu450.rz.ruhr-uni-bochum.de [134.147.64.5] 
        by master.debian.org with smtp (Exim 3.12 1 (Debian))
        id 140UPd-00046V-00; Mon, 27 Nov 2000 13:58:06 -0600
Received: (qmail 2354 invoked from network); 27 Nov 2000 19:58:09 -0000
Received: from dialppp-7-133.rz.ruhr-uni-bochum.de (HELO localhost) 
(mail@134.147.7.133)
  by mailhost.rz.ruhr-uni-bochum.de with SMTP; 27 Nov 2000 19:58:09 -0000
Received: from marcus by localhost with local (Exim 3.16 #1 (Debian))
        id 140URE-0001Sl-00; Mon, 27 Nov 2000 20:59:44 +0100
Date: Mon, 27 Nov 2000 20:59:44 +0100
From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
To: 68417-done@bugs.debian.org, 68626-done@bugs.debian.org,
        69281-done@bugs.debian.org, 72319-done@bugs.debian.org,
        75734-done@bugs.debian.org
Subject: eh
Message-ID: <20001127205944.D5341@ulysses.dhis.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.1.4i
Organization: Marcus Brinkmann's Home
Delivered-To: 68417-done@bugs.debian.org

I *am* the maintainer

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]