bug-hurd
[Top][All Lists]
Advanced

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

PATCH -> Re: Filesystem corruption bug in libdiskfs


From: M.P.Anand Babu
Subject: PATCH -> Re: Filesystem corruption bug in libdiskfs
Date: 09 Dec 2002 08:31:21 -0800

,---- "Alfred M. Szmidt" <ams@kemisten.nu> writes:
| ,----
| | This bug is fixed in the CVS version already.
| `----
| Erm, no it is _not_ fixed in CVS.  2001-10-11 does not touch this
| particular assert.
`----

Your are right, BUG is still there. 

Here is the patch
===========================================================================
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);

===========================================================================

-- 
 _.|_ 
(_||_)
Free as in Freedom <www.gnu.org>



reply via email to

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