summaryrefslogtreecommitdiff
path: root/debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-05-19 18:53:28 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-05-19 18:53:28 +0200
commit5f9dde0caac8ce3bf38af1863c3ff8a782fec92f (patch)
tree9508fb874b5915ca8b492d57eea37eac4c0ec9cf /debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch
parent6478e18d1d059ab3e7ad7f0a22326fb1c5387513 (diff)
add patch series
Diffstat (limited to 'debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch')
-rw-r--r--debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch b/debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch
new file mode 100644
index 00000000..531d2028
--- /dev/null
+++ b/debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch
@@ -0,0 +1,44 @@
+From e2e5bc611362171ead7fbf04f65b6b4933976113 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 19 May 2015 18:12:20 +0200
+Subject: [PATCH hurd 1/2] 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 | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/libdiskfs/dir-renamed.c b/libdiskfs/dir-renamed.c
+index 9e37e23..a436e08 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)
++ goto out;
+
+ if (tnp == fnp)
+ {
+@@ -112,7 +114,7 @@ diskfs_rename_dir (struct node *fdp, struct node *fnp, const char *fromname,
+ if (tmpnp)
+ diskfs_nrele (tmpnp);
+ diskfs_drop_dirstat (fdp, tmpds);
+- if (err)
++ if (err && err != ENOENT)
+ goto out;
+
+ if (tnp)
+--
+2.1.4
+