[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 46/61: trans/fakeroot: override fshelp_isowner
From: |
Samuel Thibault |
Subject: |
[hurd] 46/61: trans/fakeroot: override fshelp_isowner |
Date: |
Tue, 27 May 2014 08:32:13 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 353fe33eb2481a14dc324c7c2e52b2032df86465
Author: Justus Winter <address@hidden>
Date: Mon May 19 16:46:33 2014 +0200
trans/fakeroot: override fshelp_isowner
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 c4b95de..4175b55 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -479,6 +479,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)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 39/61: trans/fakeroot: remove spurious semicolon, (continued)
- [hurd] 39/61: trans/fakeroot: remove spurious semicolon, Samuel Thibault, 2014/05/27
- [hurd] 36/61: libihash: use an integer hash function on the keys, Samuel Thibault, 2014/05/27
- [hurd] 41/61: trans/fakeroot: use C99-style struct initialization, Samuel Thibault, 2014/05/27
- [hurd] 40/61: trans/fakeroot: fix comparison between signed and unsigned, Samuel Thibault, 2014/05/27
- [hurd] 32/61: fatfs: use two distinct pager buckets for the disk and file pager, Samuel Thibault, 2014/05/27
- [hurd] 24/61: ext2fs: simplify expression, Samuel Thibault, 2014/05/27
- [hurd] 47/61: include: install refcount.h, Samuel Thibault, 2014/05/27
- [hurd] 50/61: exec: add missing includes, Samuel Thibault, 2014/05/27
- [hurd] 23/61: ext2fs: fix type of inum, Samuel Thibault, 2014/05/27
- [hurd] 22/61: exec: abbreviate the task name if necessary, Samuel Thibault, 2014/05/27
- [hurd] 46/61: trans/fakeroot: override fshelp_isowner,
Samuel Thibault <=
- [hurd] 37/61: libihash: use linear probing and fast modulo operation, Samuel Thibault, 2014/05/27
- [hurd] 44/61: libihash: add hurd_ihash_get_load, Samuel Thibault, 2014/05/27
- [hurd] 52/61: libdiskfs: fix type of dir_cache_id, node_cache_id, Samuel Thibault, 2014/05/27
- [hurd] 54/61: term: fix memory leak, Samuel Thibault, 2014/05/27
- [hurd] 48/61: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/05/27
- [hurd] 25/61: libports: reduce malloc overhead in _ports_bucket_class_iterate, Samuel Thibault, 2014/05/27
- [hurd] 42/61: proc: move translation functions to mig-decls.h, Samuel Thibault, 2014/05/27
- [hurd] 31/61: libports: unlock _ports_lock on malloc failure, Samuel Thibault, 2014/05/27
- [hurd] 61/61: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/05/27
- [hurd] 43/61: libihash: fix typo, Samuel Thibault, 2014/05/27