summaryrefslogtreecommitdiff
path: root/debian/patches/0006-trans-fakeroot-override-fshelp_isowner.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0006-trans-fakeroot-override-fshelp_isowner.patch')
-rw-r--r--debian/patches/0006-trans-fakeroot-override-fshelp_isowner.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/debian/patches/0006-trans-fakeroot-override-fshelp_isowner.patch b/debian/patches/0006-trans-fakeroot-override-fshelp_isowner.patch
new file mode 100644
index 00000000..9d63e430
--- /dev/null
+++ b/debian/patches/0006-trans-fakeroot-override-fshelp_isowner.patch
@@ -0,0 +1,50 @@
+From ce90f0add260f7d8fb248b9ab688d86b282e8200 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Mon, 19 May 2014 16:46:33 +0200
+Subject: [PATCH 06/18] trans/fakeroot: override fshelp_isowner
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+As of recently, fakeroot would fail to create symlinks:
+
+% fakeroot-hurd ln -s foo a
+ln: failed to create symbolic link ‘a’: Operation not permitted
+
+Fix this by overriding fshelp_isowner.
+
+Various netfs functions will call fshelp_isowner to check whether USER
+is allowed to do some operation. As fakeroot is not running within
+the fakeauth'ed environment, USER contains the real user.
+
+I have no explanation why this ever worked.
+
+* trans/fakeroot.c (fshelp_isowner): New function.
+---
+ trans/fakeroot.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/trans/fakeroot.c b/trans/fakeroot.c
+index d3addc1..32a34ec 100644
+--- a/trans/fakeroot.c
++++ b/trans/fakeroot.c
+@@ -469,6 +469,16 @@ netfs_validate_stat (struct node *np, struct iouser *cred)
+ return 0;
+ }
+
++/* Various netfs functions will call fshelp_isowner to check whether
++ USER is allowed to do some operation. As fakeroot is not running
++ within the fakeauth'ed environment, USER contains the real
++ user. Hence, we override this check. */
++error_t
++fshelp_isowner (struct stat *st, struct iouser *user)
++{
++ return 0;
++}
++
+ error_t
+ netfs_attempt_chown (struct iouser *cred, struct node *np,
+ uid_t uid, uid_t gid)
+--
+2.0.0.rc2
+