[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 04/12: Make fakeroot forward send errors instead of crashing
From: |
Samuel Thibault |
Subject: |
[hurd] 04/12: Make fakeroot forward send errors instead of crashing |
Date: |
Tue, 23 Feb 2016 23:53:24 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit d0716c74b5fa2aead849fc4132a0f7fdfce02575
Author: Samuel Thibault <address@hidden>
Date: Mon Feb 15 20:46:12 2016 +0100
Make fakeroot forward send errors instead of crashing
* trans/fakeroot.c (netfs_demuxer): When forwarding an unknown request fail,
forward the error instead of crashing.
---
trans/fakeroot.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 64f3208..cb4f818 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -1032,10 +1032,12 @@ netfs_demuxer (mach_msg_header_t *inp,
err = mach_msg (inp, MACH_SEND_MSG, inp->msgh_size, 0,
MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE,
MACH_PORT_NULL);
- assert_perror (err); /* XXX should synthesize reply */
+ if (err)
+ ((mig_reply_header_t *) outp)->RetCode = err;
+ else
+ /* We already sent the message, so the server loop shouldn't do it
again. */
+ ((mig_reply_header_t *) outp)->RetCode = MIG_NO_REPLY;
ports_port_deref (cred);
- /* We already sent the message, so the server loop shouldn't do it
again. */
- ((mig_reply_header_t *) outp)->RetCode = MIG_NO_REPLY;
return 1;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (ffaff64 -> 3294609), Samuel Thibault, 2016/02/23
- [hurd] 06/12: trans/crash: fix suspending task, Samuel Thibault, 2016/02/23
- [hurd] 07/12: utils/mount: start translators with stderr closed, Samuel Thibault, 2016/02/23
- [hurd] 09/12: procfs: adapt to kernel interface change, Samuel Thibault, 2016/02/23
- [hurd] 04/12: Make fakeroot forward send errors instead of crashing,
Samuel Thibault <=
- [hurd] 12/12: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into upstream, Samuel Thibault, 2016/02/23
- [hurd] 08/12: fix Xioctl-proto.defs creation, Samuel Thibault, 2016/02/23
- [hurd] 10/12: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into upstream, Samuel Thibault, 2016/02/23
- [hurd] 11/12: libports: preserve the complex message flag, Samuel Thibault, 2016/02/23
- [hurd] 03/12: libnetfs: remove unused fields., Samuel Thibault, 2016/02/23
- [hurd] 05/12: nfs: fix deallocation of struct node., Samuel Thibault, 2016/02/23
- [hurd] 02/12: libdiskfs: fix and improve locking in nrefs/nput., Samuel Thibault, 2016/02/23
- [hurd] 01/12: nfs: Use libihash for the node cache., Samuel Thibault, 2016/02/23