bug-hurd
[Top][All Lists]
Advanced

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

ext2fs assert still not fixed


From: Alfred M. Szmidt
Subject: ext2fs assert still not fixed
Date: Fri, 09 May 2003 14:52:14 +0200

Could some nice soul please fix this bug?  A patch that looks sane is
already out there; if it is not sane, please come up with another
approach.

This is what can be used to reproduce it (snatched from the original
message from Richard Smith):

$ sudo chown -R tla.tla /src/hurd
$ mv /src/hurd /home/tla
ext2fs.static: ..../libdiskfs/dir-renamed.c:202: diskfs_rename_dir:
Assertion `tmpnp == fnp' failed.

And the patch:

libdiskfs/ChangeLog
2002-12-09  M.P. Anand Babu  <ab@bogus.example.com>

        * dir-renamed.c (diskfs_rename_dir): check if fromcred->user
        has enough permissions to unlink node fnp from its parent fdp
        before moving.

diff -pruN hurd/libdiskfs/dir-renamed.c hurd-ab/libdiskfs/dir-renamed.c
--- hurd/libdiskfs/dir-renamed.c        2001-10-11 19:49:17.000000000 -0700
+++ hurd-ab/libdiskfs/dir-renamed.c     2002-12-08 23:54:17.000000000 -0800
@@ -91,6 +91,11 @@ diskfs_rename_dir (struct node *fdp, str
   if (fdp != tdp)
     mutex_lock (&tdp->lock);

+  /* Check if we are allowed to modify "ftp" with respect to "fnp" */
+  err = fshelp_checkdirmod (&fdp->dn_stat, &fnp->dn_stat, fromcred->user);
+  if (err)
+    goto out;
+
   /* 1: Lookup target; if it exists, make sure it's an empty directory. */
   ds = buf;
   err = diskfs_lookup (tdp, toname, RENAME, &tnp, ds, tocred);





reply via email to

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