commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 15/20: libdiskfs: fix renaming of directories


From: Samuel Thibault
Subject: [hurd] 15/20: libdiskfs: fix renaming of directories
Date: Sat, 23 May 2015 05:09:42 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit e840329de670757720cec729556b9b1f7d655ab5
Author: Justus Winter <address@hidden>
Date:   Tue May 19 18:12:20 2015 +0200

    libdiskfs: fix renaming of directories
    
    Previously, file permissions and ownership of the target directory
    were ignored when renaming a directory:
    
        % mkdir a b
        % chmod 555 a
        % mv b a
        % ls a
        b
    
    * libdiskfs/dir-renamed.c (diskfs_rename_dir): Fix error handling.
---
 libdiskfs/dir-renamed.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
index 9e37e23..a4878f3 100644
--- a/libdiskfs/dir-renamed.c
+++ b/libdiskfs/dir-renamed.c
@@ -94,6 +94,8 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, const 
char *fromname,
   ds = buf;
   err = diskfs_lookup (tdp, toname, RENAME, &tnp, ds, tocred);
   assert (err != EAGAIN);      /* <-> assert (TONAME != "..") */
+  if (err && err != ENOENT)
+    goto out;
 
   if (tnp == fnp)
     {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

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