[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: [patch #3633] Support "get the root capability" in capability serv
From: |
Bas Wijnen |
Subject: |
[Fwd: [patch #3633] Support "get the root capability" in capability server] |
Date: |
Tue, 11 Jan 2005 19:20:12 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041124) |
Ok, that worked. :-) I'm attaching the patch here for convenience.
This is the same patch I sent to the list some time ago, with a minor
adjustment to make it still compile.
Thanks,
Bas
-------- Original Message --------
Subject: [patch #3633] Support "get the root capability" in capability
server
Date: Tue, 11 Jan 2005 18:16:52 +0000
From: Bas Wijnen <address@hidden>
To: Bas Wijnen <address@hidden>, address@hidden
This is an automated notification sent by Savannah.
It relates to:
patch #3633, project The GNU Hurd
==============================================================================
OVERVIEW of patch #3633:
==============================================================================
URL:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=3633>
Summary: Support "get the root capability" in capability
server
Project: The GNU Hurd
Submitted by: shevek
Submitted on: Tue 01/11/2005 at 18:16
Category: Hurd on L4
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
_______________________________________________________
This patch implements "get the root capability"-support in the capability
server code.
2005-01-11 Bas Wijnen <address@hidden>
* bucket-manage-mt.c (struct workerinfo): added member root.
* bucket-manage-mt.c (manage_demuxer, manage_mt_worker,
hurd_cap_bucket_manage_mt): Pass root capability object to worker thread and
return it to callers when requested.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 01/11/2005 at 18:16 Name: root-cap.patch Size: 2.19KB By:
shevek
Patch for root capability support
<http://savannah.gnu.org/patch/download.php?item_id=3633&item_file_id=4025>
==============================================================================
This item URL is:
<http://savannah.gnu.org/patch/?func=detailitem&item_id=3633>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
--
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://129.125.47.90/e-mail.html
Index: libhurd-cap-server/bucket-manage-mt.c
===================================================================
RCS file: /cvsroot/hurd/hurd-l4/libhurd-cap-server/bucket-manage-mt.c,v
retrieving revision 1.15
diff -u -p -r1.15 bucket-manage-mt.c
--- libhurd-cap-server/bucket-manage-mt.c 2 Dec 2004 17:46:51 -0000
1.15
+++ libhurd-cap-server/bucket-manage-mt.c 11 Jan 2005 18:08:22 -0000
@@ -74,6 +74,9 @@ struct worker_info
/* The timeout for the worker thread as an L4 time period. */
l4_time_t timeout;
+
+ /* The root capability object */
+ hurd_cap_obj_t root;
};
@@ -125,7 +128,8 @@ lookup_client (hurd_cap_bucket_t bucket,
is returned, CTX->MSG must contain the reply message. */
static error_t
__attribute__((always_inline))
-manage_demuxer (hurd_cap_rpc_context_t ctx, _hurd_cap_list_item_t worker)
+manage_demuxer (hurd_cap_rpc_context_t ctx, _hurd_cap_list_item_t worker,
+ hurd_cap_obj_t root)
{
error_t err = 0;
hurd_cap_bucket_t bucket = ctx->bucket;
@@ -148,9 +152,17 @@ manage_demuxer (hurd_cap_rpc_context_t c
if (l4_msg_label (ctx->msg) == HURD_CAP_MSG_LABEL_GET_ROOT)
{
- /* This is the "get the root capability" RPC. FIXME: Needs to
- be implemented. */
- return ENOSYS;
+ /* This is the "get the root capability" RPC. */
+ hurd_cap_handle_t cap;
+
+ if (!root)
+ return ENOSYS;
+ err = hurd_cap_bucket_inject (bucket, root, ctx->from, &cap);
+ if (err)
+ return err;
+ l4_msg_clear (ctx->msg);
+ l4_msg_append_word (ctx->msg, cap);
+ return 0;
}
/* Every normal RPC must have at least one untyped word, which
@@ -616,7 +628,7 @@ manage_mt_worker (void *arg, bool async)
ctx.bucket = bucket;
ctx.from = from;
ctx.obj = NULL;
- err = manage_demuxer (&ctx, worker);
+ err = manage_demuxer (&ctx, worker, info->root);
}
/* Post-processing. */
@@ -932,6 +944,7 @@ hurd_cap_bucket_manage_mt (hurd_cap_buck
: l4_time_period (UINT64_C (1000000) * global_timeout_sec);
info.bucket = bucket;
+ info.root = root;
info.manager_tid = l4_myself ();
info.timeout = (worker_timeout_sec == 0) ? L4_NEVER
: l4_time_period (UINT64_C (1000000) * worker_timeout_sec);
signature.asc
Description: OpenPGP digital signature
- [Fwd: [patch #3633] Support "get the root capability" in capability server],
Bas Wijnen <=