summaryrefslogtreecommitdiff
path: root/debian/patches
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
parent6478e18d1d059ab3e7ad7f0a22326fb1c5387513 (diff)
add patch series
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/fix-rename0001-libdiskfs-fix-renaming-of-directories.patch44
-rw-r--r--debian/patches/fix-rename0002-fatfs-fix-error-handling.patch30
-rw-r--r--debian/patches/series2
3 files changed, 76 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
+
diff --git a/debian/patches/fix-rename0002-fatfs-fix-error-handling.patch b/debian/patches/fix-rename0002-fatfs-fix-error-handling.patch
new file mode 100644
index 00000000..974656a5
--- /dev/null
+++ b/debian/patches/fix-rename0002-fatfs-fix-error-handling.patch
@@ -0,0 +1,30 @@
+From bd54666bece0f8f130d947b4a90f81dd99c6e99b Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Tue, 19 May 2015 18:52:58 +0200
+Subject: [PATCH hurd 2/2] fatfs: fix error handling
+
+* fatfs/dir.c (diskfs_dirrewrite_hard): Fix error handling.
+---
+ fatfs/dir.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/fatfs/dir.c b/fatfs/dir.c
+index 9eea74c..66c95d2 100644
+--- a/fatfs/dir.c
++++ b/fatfs/dir.c
+@@ -728,9 +728,10 @@ diskfs_dirrewrite_hard (struct node *dp, struct node *np, struct dirstat *ds)
+ entry_key.dir_inode = dp->cache_id;
+ entry_key.dir_offset = ((int) ds->entry) - ((int) ds->mapbuf);
+ err = vi_rlookup (entry_key, &inode, &vinode, 0);
+-
+ assert (err != EINVAL);
+-
++ if (err)
++ return err;
++
+ /* Lookup the node, we already have a reference. */
+ oldnp = diskfs_cached_ifind (inode);
+
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index dbf6a3d9..0e0537e6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -63,3 +63,5 @@ bootshell0007-XXX-bootshell.patch
bootshell0008-XXX-proc-fix-build.patch
bootshell0009-fixup-more-error-handling.patch
bootshell0010-pull-code-from-livecd-XXX-document.patch
+fix-rename0001-libdiskfs-fix-renaming-of-directories.patch
+fix-rename0002-fatfs-fix-error-handling.patch