[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 61/98: trans: fix transparent reauthentication in fakeroot
From: |
Samuel Thibault |
Subject: |
[hurd] 61/98: trans: fix transparent reauthentication in fakeroot |
Date: |
Tue, 14 Jan 2014 02:00:02 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 93976a816e6d690a6c7d77801e31ce6ee5bc4899
Author: Justus Winter <address@hidden>
Date: Wed Dec 4 10:43:04 2013 +0100
trans: fix transparent reauthentication in fakeroot
When looking up files, fakeroot intercepts reauthentication requests
and executes io_reauthenticate and auth_user_authenticate
transparently for the client. This, however, makes the client
incorrectly assume that the lookup is finished (assuming
/media/scratch is a translator):
% cd /media/scratch && fakeroot-hurd pwd
pwd: reading directory `..': Bad file descriptor
Make the reauthentication completely transparent to the client by
re-doing the lookup ourselves.
* trans/fakeroot.c (netfs_S_dir_lookup): Fix transparent reauthentication.
---
trans/fakeroot.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index b6938dc..24d3a4f 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -235,7 +235,10 @@ netfs_S_dir_lookup (struct protid *diruser,
return EOPNOTSUPP;
dnp = diruser->po->np;
- err = dir_lookup (dnp->nn->file, filename,
+
+ mach_port_t dir = dnp->nn->file;
+ redo_lookup:
+ err = dir_lookup (dir, filename,
flags & (O_NOLINK|O_RDWR|O_EXEC|O_CREAT|O_EXCL|O_NONBLOCK),
mode, do_retry, retry_name, &file);
if (err)
@@ -252,14 +255,14 @@ netfs_S_dir_lookup (struct protid *diruser,
mach_port_deallocate (mach_task_self (), file);
err = auth_user_authenticate (fakeroot_auth_port, ref,
MACH_MSG_TYPE_MAKE_SEND,
- retry_port);
+ &dir);
}
mach_port_destroy (mach_task_self (), ref);
if (err)
return err;
}
- *do_retry = FS_RETRY_NORMAL;
- /*FALLTHROUGH*/
+ filename = retry_name;
+ goto redo_lookup;
case FS_RETRY_NORMAL:
case FS_RETRY_MAGICAL:
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 94/98: trans/mtab: do not include non-filesystem translators by default, (continued)
- [hurd] 94/98: trans/mtab: do not include non-filesystem translators by default, Samuel Thibault, 2014/01/13
- [hurd] 96/98: libdiskfs: register passive translator startups, Samuel Thibault, 2014/01/13
- [hurd] 92/98: trans/mtab: properly lock mtab objects, Samuel Thibault, 2014/01/13
- [hurd] 03/98: libports: fix the thread counts in case the thread creation fails, Samuel Thibault, 2014/01/13
- [hurd] 76/98: utils/settrans: fix the teardown of chrooted environments, Samuel Thibault, 2014/01/13
- [hurd] 16/98: libshouldbeinlibc: fix reference counting in port_name_xlator_create, Samuel Thibault, 2014/01/13
- [hurd] 95/98: libfshelp: fix the api of fshelp_set_active_translator, Samuel Thibault, 2014/01/13
- [hurd] 98/98: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2014/01/13
- [hurd] 17/98: utils: implement portinfo --search, Samuel Thibault, 2014/01/13
- [hurd] 10/98: auth: fix use of uninitialized variable err, Samuel Thibault, 2014/01/13
- [hurd] 61/98: trans: fix transparent reauthentication in fakeroot,
Samuel Thibault <=
- [hurd] 01/98: pfinet: fix emission on the loopback device, Samuel Thibault, 2014/01/13
- [hurd] 63/98: libfshelp: use a hash table in get-identity.c, Samuel Thibault, 2014/01/13
- [hurd] 90/98: trans/mtab: populate mtab objects on demand, Samuel Thibault, 2014/01/13
- [hurd] 09/98: init: fix memory leak, Samuel Thibault, 2014/01/13
- [hurd] 88/98: libports: remove the threadvars stack size hack, Samuel Thibault, 2014/01/13
- [hurd] 02/98: Normalize whitespace at the end of each file to '\n', Samuel Thibault, 2014/01/13
- [hurd] 84/98: utils/rpctrace: handle MACH_MSG_TYPE_PORT_SEND rights in trace_and_forward, Samuel Thibault, 2014/01/13
- [hurd] 82/98: utils/rpctrace: generalize code in rewrite_right, Samuel Thibault, 2014/01/13
- [hurd] 86/98: utils/rpctrace: fix output so that replies can be attributed to requests, Samuel Thibault, 2014/01/13
- [hurd] 81/98: utils/mount: fix autodetection of fat file systems, Samuel Thibault, 2014/01/13